scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Phoenicis does not find directories that are obviously there

Open Zemogiter opened this issue 5 years ago • 20 comments

When the script executes the mfc42 verb I get this error:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/system32/mfc42.dll" does not exist
	at org.phoenicis.tools.files.FileUtilities.remove(FileUtilities.java:165)
	at <js> remove(Unnamed:101:2289-2318)
	at <js> Wine.mfc42(Unnamed:21:722-768)
	at <js> install(Unnamed:57:1669-1680)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy44.install(Unknown Source)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:73)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by host exception: java.lang.IllegalArgumentException: Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/system32/mfc42.dll" does not exist

Exception in thread "pool-3-thread-4" Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/system32/mfc42.dll" does not exist
	at org.phoenicis.tools.files.FileUtilities.remove(FileUtilities.java:165)
	at <js> remove(Unnamed:101:2289-2318)
	at <js> Wine.mfc42(Unnamed:21:722-768)
	at <js> install(Unnamed:57:1669-1680)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy44.install(Unknown Source)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:73)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by host exception: java.lang.IllegalArgumentException: Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/system32/mfc42.dll" does not exist

Seems like the script is expecting that file to be here so it can remove it and continue. UPDATE: Tahoma verb is having similiar issues:

Extracting to: /home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/tahoma/
/home/jonasz/.Phoenicis/resources///IELPKTH.CAB: WARNING; possible 5592 extra bytes at end of file.
Extracting cabinet: /home/jonasz/.Phoenicis/resources///IELPKTH.CAB

All done, no errors.
[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/Fonts" does not exist
	at org.phoenicis.tools.files.FileUtilities.copy(FileUtilities.java:139)
	at <js> cp(Unnamed:56:1321-1354)
	at <js> Wine.tahoma(Unnamed:27:865-943)
	at <js> install(Unnamed:52:1568-1580)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy44.install(Unknown Source)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:73)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by host exception: java.lang.IllegalArgumentException: Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/Fonts" does not exist

Exception in thread "pool-3-thread-4" Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/Fonts" does not exist
	at org.phoenicis.tools.files.FileUtilities.copy(FileUtilities.java:139)
	at <js> cp(Unnamed:56:1321-1354)
	at <js> Wine.tahoma(Unnamed:27:865-943)
	at <js> install(Unnamed:52:1568-1580)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
	at com.sun.proxy.$Proxy44.install(Unknown Source)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:73)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by host exception: java.lang.IllegalArgumentException: Path "/home/jonasz/.Phoenicis/containers//wineprefix//The Sims 3//drive_c/windows/Fonts" does not exist

UPDATE 2: dotnet20 also fails:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - java.lang.UnsupportedOperationException: Unsupported operation Value.newInstance(Object...) for '{}'(language: JavaScript, type: Object). You can ensure that the operation is supported using Value.canInstantiate().
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue.unsupported(PolyglotValue.java:389)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue.newInstanceUnsupported(PolyglotValue.java:208)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$NewInstanceNode.doCached(PolyglotValue.java:1496)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueFactory$InteropCodeCacheFactory$NewInstanceNodeGen.executeAndSpecialize(PolyglotValueFactory.java:2545)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueFactory$InteropCodeCacheFactory$NewInstanceNodeGen.executeImpl(PolyglotValueFactory.java:2496)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:94)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:328)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:318)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:305)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:287)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:230)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:217)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropValue.newInstance(PolyglotValue.java:2023)
	at org.graalvm.sdk/org.graalvm.polyglot.Value.newInstance(Value.java:388)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:70)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Exception in thread "pool-3-thread-4" java.lang.UnsupportedOperationException: Unsupported operation Value.newInstance(Object...) for '{}'(language: JavaScript, type: Object). You can ensure that the operation is supported using Value.canInstantiate().
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue.unsupported(PolyglotValue.java:389)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue.newInstanceUnsupported(PolyglotValue.java:208)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropCodeCache$NewInstanceNode.doCached(PolyglotValue.java:1496)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueFactory$InteropCodeCacheFactory$NewInstanceNodeGen.executeAndSpecialize(PolyglotValueFactory.java:2545)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValueFactory$InteropCodeCacheFactory$NewInstanceNodeGen.executeImpl(PolyglotValueFactory.java:2496)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.HostToGuestRootNode.execute(HostToGuestRootNode.java:94)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:328)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:318)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:305)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:287)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:230)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:217)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotValue$InteropValue.newInstance(PolyglotValue.java:2023)
	at org.graalvm.sdk/org.graalvm.polyglot.Value.newInstance(Value.java:388)
	at org.phoenicis.engines.VerbsManager.lambda$installVerb$0(VerbsManager.java:70)
	at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Zemogiter avatar Aug 24 '19 16:08 Zemogiter

@ImperatorS79 I think you're more knowledgeable than me about how the verb scripts should work. Can you take a look at this?

madoar avatar Aug 24 '19 16:08 madoar

I will add some fileExists check then.

ImperatorS79 avatar Aug 24 '19 16:08 ImperatorS79

The Fonts directory should exist and I do not understand dotnet20 error.

ImperatorS79 avatar Aug 24 '19 16:08 ImperatorS79

And the Fonts directory does exist in system32. Weird. I also do not get the dotnet20 error.

Zemogiter avatar Aug 24 '19 16:08 Zemogiter

Fixed by #1116

Zemogiter avatar Sep 09 '19 13:09 Zemogiter

I will reopen this because I got the same kind of error:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - Path "/home/vmachine/.Phoenicis/containers//wineprefix//Adobe Photoshop//drive_c/windows/system32" does not exist
        at org.phoenicis.tools.files.FileUtilities.copy(FileUtilities.java:139)
        at <js> cp(Unnamed:56:1251-1284)
        at <js> go(Unnamed:64:2597-2692)
        at <js> :anonymous(Unnamed:29:1264-1285)
        at <js> go(Unnamed:42:1206-1240)
        at org.graalvm.truffle/com.oracle.truffle.polyglot.ObjectProxyHandler.invoke(HostInteropReflect.java:678)
        at com.sun.proxy.$Proxy43.go(Unknown Source)
        at org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:237)
        at org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
        at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:835)

I just checked and system 32 is obviously there.

ImperatorS79 avatar Sep 11 '19 14:09 ImperatorS79

Does this happen only sporadic for you, if not which script (chain) leads to this?

madoar avatar Sep 11 '19 18:09 madoar

I have just tested it again running adobe photoshop script. It did not detect system32 despite the directory exists (the container was created before).

ImperatorS79 avatar Sep 11 '19 21:09 ImperatorS79

Can you add a debug print in the Adobe script before the verb that does the check is called? Maybe even print all existing directory with ls. It would be useful to know what the script actually "sees" at that moment.

madoar avatar Sep 12 '19 18:09 madoar

How can I print the output of ls ?

ImperatorS79 avatar Sep 12 '19 20:09 ImperatorS79

Try print(ls(<folder>))

madoar avatar Sep 12 '19 20:09 madoar

[Ljava.lang.String;@665bec15

ImperatorS79 avatar Sep 12 '19 20:09 ImperatorS79

Then try ls(<folder>).forEach(file => print(file))

madoar avatar Sep 12 '19 20:09 madoar

system32 exists:

Microsoft.NET
Resources
twain_32
win.ini
temp
mono
winsxs
winhelp.exe
command
hh.exe
Fonts
help
Installer
winhlp32.exe
tasks
regedit.exe
notepad.exe
rundll.exe
system.ini
explorer.exe
system32
logs
system
inf
twain.dll
twain_32.dll

ImperatorS79 avatar Sep 12 '19 20:09 ImperatorS79

Do you know which verb produces the error?

madoar avatar Sep 12 '19 20:09 madoar

gdiplus I guess

ImperatorS79 avatar Sep 12 '19 20:09 ImperatorS79

If this is the case the following line produces the error:

https://github.com/PhoenicisOrg/scripts/blob/a10b795632f09ebe8283e5c41cf0f648af7b3cc2/Engines/Wine/Verbs/gdiplus/script.js#L55

This in turn means that system64directory links to system32? Is this correct?

madoar avatar Sep 12 '19 20:09 madoar

Impossible. The prefix is 32 bits.

On a 64 bits prefix 64 bits libs go to system32 and 32 bits libs to sysWoW64

ImperatorS79 avatar Sep 12 '19 20:09 ImperatorS79

But that is where the error message seems to link to. You can try by adding a debug output to line 54 and 56 (i.e. before and after the cp call) to see if it is maybe somewhere else where the crash occurs

madoar avatar Sep 12 '19 20:09 madoar

OH I know it is my fault.

ImperatorS79 avatar Sep 12 '19 22:09 ImperatorS79