PhoenicisOrg / scripts

Phoenicis scripts
GNU Lesser General Public License v3.0
64 stars 49 forks source link

NWN2: Case study #879

Closed SanZamoyski closed 5 years ago

SanZamoyski commented 5 years ago

Expected behavior

Installing and playing the game ;)

Actual behavior

Game installs (manual) but makes no shortcut. Unable to make shortcut manualy (in Library), does nothing. Hitting create gives no response, no info in terminal. Running game is bit tricky: running from Containers -> Tools -> Run executable, gives crash with no useful information. BUT! Running through engine tools -> Command prompt -> dir to directory -> nwn2.exe runs the game.

Steps to reproduce

I have original Polish DVD version, copied that on external drive (i have no CD-ROM on my system) and run installation from.

System information

I know, that this is more than one issue, but i'm not sure where to start...

Also, running Local install takes ages to "download wine?os=linux", why is that? (it starts very slowly)

madoar commented 5 years ago

How did you install Phoenicis? Via the deb installer of via the flatpak?

plata commented 5 years ago

The wine download issue is a separate problem. Can you open a new issue for it?

SanZamoyski commented 5 years ago

Via standalone from https://www.playonlinux.com/en/comments-1368.html.

Why issue? Installing from deb works fine, installing game also.

plata commented 5 years ago

I was referring to

Also, running Local install takes ages to "download wine?os=linux", why is that? (it starts very slowly)

SanZamoyski commented 5 years ago

Any ideas on other problems?

plata commented 5 years ago

Not really currently. Can you check if you can create shortcuts manually for other applications?

SanZamoyski commented 5 years ago

Same story here. I've run from source POL5:

[WARNING] 
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
        at java.base/java.lang.String.charAt(String.java:693)
        at org.phoenicis.javafx.views.mainwindow.library.LibraryView.createShortcut(LibraryView.java:301)
        at org.phoenicis.javafx.components.library.skin.ShortcutCreationDetailsPanelSkin.lambda$createContent$0(ShortcutCreationDetailsPanelSkin.java:120)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3564)
        at javafx.scene.Scene$ClickGenerator.access$8200(Scene.java:3492)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3860)
        at javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
        at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
        at com.sun.glass.ui.View.notifyMouse(View.java:942)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Thread.java:834)
qparis commented 5 years ago

Phoenicis is crashing at final String engine = (Character.toUpperCase(engineContainer.charAt(0)) + engineContainer.substring(1)).replace("prefix", "");

Seems that the engine name is empty. Anyway, this needs to be replaced with StringUtils.capitalize()

SanZamoyski commented 5 years ago

I belive You ;) Let me know when it is time to test solution.

plata commented 5 years ago

I've tried to reproduce the issue but without success. Can you describe step by step what exactly you do do create this behavior?

SanZamoyski commented 5 years ago

OK. Run Phoenicis from source with command (+log):

mvn exec:java
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building phoenicis-javafx 5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://jitpack.io/org/phoenicis/phoenicis-configuration/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-repository/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-entities/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-multithreading/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-tools/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-win32/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-scripts/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-library/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-engines/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-containers/5.0-SNAPSHOT/maven-metadata.xml
Downloading: https://jitpack.io/org/phoenicis/phoenicis-settings/5.0-SNAPSHOT/maven-metadata.xml
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ phoenicis-javafx ---
[INFO ] org.springframework.context.annotation.ConfigurationClassParser (l.458) - Properties location [file:${application.user.settings}] not resolvable: /home/san/.Phoenicis/config.properties (Nie ma takiego pliku ani katalogu)
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.74) - Setting theme to 'Dark theme'
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.110) - Refreshing currently shown theme
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.116) - Loading standard theme at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/standard/main.css'
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.120) - Loading 'Dark theme' theme at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/dark/main.css'
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.125) - Loading WebView stylesheet at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/dark/description.css'
[INFO ] org.phoenicis.repository.DefaultRepositoryManager (l.85) - Adding repositories: [org.phoenicis.repository.location.GitRepositoryLocation@57509203[https://github.com/PhoenicisOrg/scripts,master], org.phoenicis.repository.location.ClasspathRepositoryLocation@685981d7[/org/phoenicis/repository]] at index 0
[INFO ] org.phoenicis.repository.types.MultipleRepository (l.46) - Fetching applications for: org.phoenicis.repository.types.MultipleRepository@5ab6d4ef[repositories=[git-repository https://github.com/PhoenicisOrg/scripts, local folder: /home/san/.Phoenicis/cache/git-331995911, branch: master, org.phoenicis.repository.types.ClasspathRepository@547131c9[packagePath=/org/phoenicis/repository]]]
[INFO ] org.phoenicis.repository.types.GitRepository (l.76) - Begin fetching process of git-repository https://github.com/PhoenicisOrg/scripts, local folder: /home/san/.Phoenicis/cache/git-331995911, branch: master
[INFO ] org.phoenicis.repository.types.GitRepository (l.145) - Opening git-repository https://github.com/PhoenicisOrg/scripts, local folder: /home/san/.Phoenicis/cache/git-331995911, branch: master
[INFO ] org.phoenicis.repository.types.GitRepository (l.149) - Pulling new commits from git-repository https://github.com/PhoenicisOrg/scripts, local folder: /home/san/.Phoenicis/cache/git-331995911, branch: master
[INFO ] org.phoenicis.repository.types.LocalRepository (l.76) - Reading directory : /home/san/.Phoenicis/cache/git-331995911
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.110) - Refreshing currently shown theme
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.116) - Loading standard theme at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/standard/main.css'
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.120) - Loading 'Dark theme' theme at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/dark/main.css'
[INFO ] org.phoenicis.javafx.views.common.ThemeManager (l.125) - Loading WebView stylesheet at 'file:/media/KingstonExt2/Src/phoenicis-master/phoenicis-javafx/target/classes/org/phoenicis/javafx/themes/dark/description.css'

I hit some enters in commandline, so i know where am i. Select "create shortcut" from library menu. Fill name ("CS"), category ("Games"), Description ("cs"), Miniature left empty, executable ("/media/KingstonExt2/Phoenicis/containers/wineprefix/CS/drive_c/Program Files/Counter-Strike 1.6/cstrike.exe"). Hit create and got error in console:

[WARNING] 
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
        at java.base/java.lang.String.charAt(String.java:693)
        at org.phoenicis.javafx.views.mainwindow.library.LibraryView.createShortcut(LibraryView.java:301)
        at org.phoenicis.javafx.components.library.skin.ShortcutCreationDetailsPanelSkin.lambda$createContent$0(ShortcutCreationDetailsPanelSkin.java:120)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3564)
        at javafx.scene.Scene$ClickGenerator.access$8200(Scene.java:3492)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3860)
        at javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
        at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
        at com.sun.glass.ui.View.notifyMouse(View.java:942)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
        at java.base/java.lang.Thread.run(Thread.java:834)
SanZamoyski commented 5 years ago

Current Git clone:

Warning: Nashorn engine is planned to be removed from a future JDK release
[ERROR] org.phoenicis.repository.types.Repository (l.89) - Could not find CategoryDTO with ID ""
[ERROR] org.phoenicis.repository.types.Repository (l.134) - Could not find ScriptDTO with ID ""
[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.63) - java.lang.ClassCastException: class java.lang.String cannot be cast to class jdk.nashorn.api.scripting.ScriptObjectMirror (java.lang.String is in module java.base of loader 'bootstrap'; jdk.nashorn.api.scripting.ScriptObjectMirror is in module jdk.scripting.nashorn of loader 'platform')
        at org.phoenicis.javafx.views.mainwindow.library.LibraryView.lambda$createShortcut$7(LibraryView.java:315)
        at org.phoenicis.scripts.nashorn.NashornInteractiveSession.eval(NashornInteractiveSession.java:34)
        at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:43)
        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)

[WARNING] 
java.lang.ClassCastException: class java.lang.String cannot be cast to class jdk.nashorn.api.scripting.ScriptObjectMirror (java.lang.String is in module java.base of loader 'bootstrap'; jdk.nashorn.api.scripting.ScriptObjectMirror is in module jdk.scripting.nashorn of loader 'platform')
        at org.phoenicis.javafx.views.mainwindow.library.LibraryView.lambda$createShortcut$7(LibraryView.java:315)
        at org.phoenicis.scripts.nashorn.NashornInteractiveSession.eval(NashornInteractiveSession.java:34)
        at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:43)
        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)

Clean installation.

SanZamoyski commented 5 years ago

Can anyone provide me shortcut file, so i can create it manually?

plata commented 5 years ago

shortcut looks like this:

{"type":"WINE","wineDebug":"","winePrefix":"Age of Empires II HD","arguments":["-silent","-applaunch",221380],"workingDirectory":"/home/user/.Phoenicis/containers/wineprefix/Age of Empires II HD/drive_c/Program Files/Steam","executable":"/home/user/.Phoenicis/containers/wineprefix/Age of Empires II HD/drive_c/Program Files/Steam/Steam.exe"}

Maybe it is because your Phoenicis home is not in your home directory? Could you try if you get the same behavior with ~/.Phoenicis?

SanZamoyski commented 5 years ago

or maybe this: [INFO ] org.springframework.context.annotation.ConfigurationClassParser (l.458) - Properties location [file:${application.user.settings}] not resolvable: /home/san/.Phoenicis/config.properties (Nie ma takiego pliku ani katalogu)

.Phoenicis is a symlink. I have not enough place in home directory for those games ;)

Any chance You tell me how to call file this file? ;)

By the way, I've made translation few hours ago, how to enable it?

plata commented 5 years ago

Maybe it's a better idea to simply specify a different directory instead of using a symlink.

We will review the translations and then merge them at some point in time.

SanZamoyski commented 5 years ago

Where/how and why does it make difference? How to call shortcut file?

plata commented 5 years ago

Where/how and why does it make difference?

I'm not sure if it does really. Just trying to track down the error.

How to call shortcut file?

Here's some documentation: https://phoenicisorg.github.io/phoenicis/Users/shortcuts/. However, it's probably easier if you install a simple app (like Notepad++) and use it as example.

SanZamoyski commented 5 years ago

Installing Notepad++ worked, shortcut was created. I've copied it and renamed and it works fine, editing works too. Creating still does not work.

Some ideas btw.:

plata commented 5 years ago

Please open new issues for the ideas (otherwise they will be lost).

Regarding the original problem: I have currently no idea why it doesn't work. In the end, the same code is used regardless if the script does it or you do it manually.

SanZamoyski commented 5 years ago

Please open new issues for the ideas (otherwise they will be lost).

Done

Regarding the original problem: I have currently no idea why it doesn't work. In the end, the same code is used regardless if the script does it or you do it manually.

I see two potential problems: [ERROR] org.phoenicis.repository.types.Repository (l.89) - Could not find CategoryDTO with ID "" There is some problem with translating "games" to ID? Or variable holding category is "bad named". and java.lang.ClassCastException: class java.lang.String cannot be cast to class jdk.nashorn.api.scripting.ScriptObjectMirror (java.lang.String is in module java.base of loader 'bootstrap'; jdk.nashorn.api.scripting.ScriptObjectMirror is in module jdk.scripting.nashorn of loader 'platform') I have some wrong modules/jdk-version installed?

plata commented 5 years ago

Oh yeah. Now that you say it: You should use Java 10+ like stated in the README.

SanZamoyski commented 5 years ago
san@lati ~ $ java --version
openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu116.04ppa1, mixed mode, sharing)
plata commented 5 years ago

Did you update to Java 11 now or did you have this before? Still the same behavior?

SanZamoyski commented 5 years ago

I upgraded when i started to using Phoenicis from source, something about 5 days ago.

plata commented 5 years ago

I'm asking because the issue description states OpenJDK 1.8.

SanZamoyski commented 5 years ago

Just to be sure, i've cloned git, build and run. Same error.

plata commented 5 years ago

Mh. Could you create a script for the application and try if that works?

SanZamoyski commented 5 years ago

Oh, I'm going for holidays now, but I'll try after. Anyway installing Notepad++ works fine - it creates shortcut automatically.

plata commented 5 years ago

Ok, let me know what you figured out. Maybe we can track down the issue.

plata commented 5 years ago

Closed due to inactivity. @SanZamoyski feel free to re-open if you have any new findings.