SikuliX1 icon indicating copy to clipboard operation
SikuliX1 copied to clipboard

Exception in thread "Thread-##" java.lang.ExceptionInInitializerError

Open mustafa237 opened this issue 3 years ago • 2 comments

I'm having the Exception on title cant find any solution on google. I will try to explain it as much as i can. Thread number ## changes everytime i run the app. I just freshly installed my OS Lubuntu 21.10 installed java

java -version openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-Ubuntu-0ubuntu3)
OpenJDK 64-Bit Server VM (build 11.0.12+7-Ubuntu-0ubuntu3, mixed mode, sharing)

and then downloaded Sikulix IDE 2.0.5

run with command

java -jar sikulix-2.0.5.jar -v &

Debug logs on terminal are(which looks ok):

[DEBUG]startUp: IDE: Running: /home/mustafa/sikulixide-2.0.5.jar [DEBUG]startUp: IDE: AppData: /home/mustafa/.Sikulix [DEBUG]startUp: IDE: starting with classpath: sikulixide-2.0.5.jar ... [DEBUG]startUp: IDE: no extensions.txt nor valid content [734 debug] RunTime:temp folder ok: /tmp/Sikulix_369851535 Options: *** options dump Options: testing = Options: OptionsFile = /home/mustafa/.Sikulix/SikulixStore/SikulixOptions.txt Options: *** options dump end ***** show environment for 2.0.5 API user.home: /home/mustafa work dir: /home/mustafa running on Linux 5.13.0-19-generic from a jar running Java Ubuntu 11.0.12+7-Ubuntu-0ubuntu3 java.io.tmpdir: /tmp app data folder: /home/mustafa/.Sikulix executing jar: /home/mustafa/sikulixide-2.0.5.jar *** classpath dump sikulix 0: sikulixide-2.0.5.jar *** classpath dump end ***** show environment end [DEBUG]startUp: IDE: *********************** leaving start [89 debug] Sikulix: starting IDE [115 debug] RunTime:temp folder ok: /tmp/Sikulix_1282704768 Options: *** options dump Options: testing = Options: OptionsFile = /home/mustafa/.Sikulix/SikulixStore/SikulixOptions.txt Options: *** options dump end ***** show environment for 2.0.5 IDE user.home: /home/mustafa work dir: /home/mustafa running on Linux 5.13.0-19-generic from a jar running Java Ubuntu 11.0.12+7-Ubuntu-0ubuntu3 java.io.tmpdir: /tmp app data folder: /home/mustafa/.Sikulix executing jar: /home/mustafa/sikulixide-2.0.5.jar *** classpath dump sikulix 0: /home/mustafa/sikulixide-2.0.5.jar 1: sikulixide-2.0.5.jar *** classpath dump end ***** show environment end [755 debug] IDE: running with Locale: tr_TR [DEBUG]startUp: IDE: --- Sikuli parameters --- [DEBUG]startUp: IDE: 1: -v [788 debug] RunTime:loadlib: trying JXGrabKey [794 debug] RunTime:libsExport: folder exists: /home/mustafa/.Sikulix/SikulixLibs (2.0.5 - 202103030910) [797 debug] RunTime:loadLib: libJXGrabKey.so (success) [800 debug] HotkeyManager: add Capture Hotkey: CTRL+SHİFT 2 (50, 3) [904 debug] HotkeyManager: add Abort Hotkey: ALT+SHİFT C (67, 9) [906 debug] IDE: Init ScriptingSupport [912 debug] IDESupport: enter [6214 debug] Runner: added: Jython [py] text/jython [6218 debug] Runner: added: NetworkRunner [] NET [6223 debug] Runner: added: PackedSikulix [skl] text/skl [6230 debug] Runner: added: SikulixJar [jar] text/jar [6237 debug] Runner: added: SikulixExecutableJar [executablejar] text/jar [6239 debug] Runner: added: Sikulix [] directory/sikulix [6244 debug] Runner: init: class org.sikuli.script.runners.AbstractLocalFileScriptRunner: warning: not possible [6247 debug] Runner: added: PackedSikulix [zip] application/zip [6248 debug] Runner: added: Text [txt] text/text [6253 debug] IDESupport: added: Jython [6256 debug] IDESupport: added: Text [6262 debug] IDESupport: exit: defaultrunner: Jython (py) [6294 debug] IDE: Reading Preferences [6297 debug] IDE: Adding components to window [6391 debug] IDE: [I18N] menuRecent [6541 debug] IDE: [I18N] menuToolAndroid [6562 debug] IDE: creating tabbed editor mustafa@mustafa:~$ [7075 debug] IDE: creating message area [7275 debug] EditorConsolePane: starting redirection to message area


Redirected logs on IDE (Exception happens here):

[7278 debug] EditorConsolePane: redirection for Jython [7278 debug] Jython: Initiate IO redirect [7281 debug] EditorConsolePane: redirection for NetworkRunner [7281 debug] NetworkRunner: Initiate IO redirect [7285 debug] EditorConsolePane: redirection for PackedSikulix [7285 debug] PackedSikulix: Initiate IO redirect [7287 debug] EditorConsolePane: redirection for SikulixJar [7287 debug] SikulixJar: Initiate IO redirect [7288 debug] EditorConsolePane: redirection for SikulixExecutableJar [7290 debug] SikulixExecutableJar: Initiate IO redirect [7291 debug] EditorConsolePane: redirection for Sikulix [7291 debug] Sikulix: Initiate IO redirect [7292 debug] EditorConsolePane: redirection for PackedSikulix [7292 debug] PackedSikulix: Initiate IO redirect [7292 debug] EditorConsolePane: redirection for Text [7293 debug] Text: Initiate IO redirect [7299 debug] IDE: creating combined work window [7311 debug] IDE: Putting all together [7315 debug] IDE: Putting all together - after main pane [7403 debug] IDE: Putting all together - after toolbar [7409 debug] IDE: Putting all together - before layout [7716 debug] IDE: Putting all together - after layout [7717 debug] IDE: Putting all together - Restore last Session [7717 debug] IDE: Restore scripts from last session [7746 debug] EditorPane: created 1650403704262 [7772 debug] JythonRunner: starting initialization [8047 debug] EditorPane: InitTab: (text/jython) [8271 debug] ImagePath: new BundlePath: /tmp/Sikulix_1282704768/SikulixIDETempTab1650403704262 [8301 debug] Screen: initScreens: starting [8302 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment() [8302 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices() [8308 debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0) [8308 debug] Screen: Monitor 0: (0, 0) 1920 x 1080 [8310 debug] Screen: initScreens: monitor mouse check [8400 debug] Screen: *** checking: R[0,0 1920x1080]@S(0) center: (960, 540) --- OK [8440 debug] Screen: initScreens: ending [8441 debug] IDE startup: 8,4 seconds *** Running on Java 9+ Exception in thread "Thread-21" java.lang.ExceptionInInitializerError at org.python.util.PythonInterpreter.(PythonInterpreter.java:99) at org.python.util.PythonInterpreter.(PythonInterpreter.java:93) at org.python.util.PythonInterpreter.(PythonInterpreter.java:70) at org.sikuli.script.runnerSupport.JythonSupport.init(JythonSupport.java:93) at org.sikuli.script.runnerSupport.JythonSupport.get(JythonSupport.java:66) at org.sikuli.script.runners.JythonRunner.doInit(JythonRunner.java:87) at org.sikuli.script.runners.AbstractScriptRunner.init(AbstractScriptRunner.java:70) at org.sikuli.ide.EditorPane$2.run(EditorPane.java:360) Caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value at org.python.core.PyString.(PyString.java:57) at org.python.core.PyString.(PyString.java:70) at org.python.core.PyString.(PyString.java:74) at org.python.core.Py.newString(Py.java:643) at org.python.core.PyJavaType.init(PyJavaType.java:543) at org.python.core.PyType$Registry.createType(PyType.java:477) at org.python.core.PyType$Registry.addFromClass(PyType.java:426) at org.python.core.PyType$Registry.resolveType(PyType.java:352) at org.python.core.PyType$Registry$1.computeValue(PyType.java:208) at org.python.core.PyType$Registry$1.computeValue(PyType.java:202) at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228) at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210) at java.base/java.lang.ClassValue.get(ClassValue.java:116) at org.python.core.PyType.fromClass(PyType.java:2137) at org.python.core.PyObject.(PyObject.java:85) at org.python.core.PySingleton.(PySingleton.java:9) at org.python.core.PyNotImplemented.(PyNotImplemented.java:10) at org.python.core.Py.(Py.java:66) ... 8 more


This is before i even try running any script

After i run basically any script like one only contains one line print("Test")

###I get these Exceptions:


org.sikuli.script.SikuliXception: Cannot initialize Script runner Jython at org.sikuli.script.runners.AbstractScriptRunner.init(AbstractScriptRunner.java:78) at org.sikuli.script.runners.AbstractScriptRunner.runSynchronized(AbstractScriptRunner.java:374) at org.sikuli.script.runners.AbstractScriptRunner.runScript(AbstractScriptRunner.java:167) at org.sikuli.ide.SikulixIDE$ButtonRun$1.run(SikulixIDE.java:2547) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.NullPointerException at org.sikuli.script.runnerSupport.JythonSupport.interpreterExecString(JythonSupport.java:306) at org.sikuli.script.runners.JythonRunner.doInit(JythonRunner.java:94) at org.sikuli.script.runners.AbstractScriptRunner.init(AbstractScriptRunner.java:70) ... 4 more [debug] JythonRunner: starting initialization [debug] Jython: added as Jython::sys.path[0]: /home/mustafa/.Sikulix/Lib/site-packages [debug] Jython: ***** sys.path 0: /home/mustafa/sts.sikuli 1: /home/mustafa/.Sikulix/Lib/site-packages 2: /home/mustafa/.Sikulix/Lib [error] IDE: Run Script: internal error: [debug] RunTime:*** running cleanUp *******


I thought exception is about Jython and installed Jython too but nothing changed nothing on the internet worked for me so far havent tried install again suggestions as i mentioned i just freshly installed everything. I tried to download code and check line 360 on EditorPane class but cause of Exception wasn't there.

Let me know if any more info needed.

mustafa237 avatar Apr 19 '22 22:04 mustafa237

I had java 8 on my windows os. So i just tried running it with java 8 on ubuntu just for the sake of trying current java -version openjdk version "1.8.0_302" OpenJDK Runtime Environment (build 1.8.0_302-8u302-b08-0ubuntu2-b08) OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)

mustafa237 avatar Apr 19 '22 22:04 mustafa237

Update: Just reinstalled Lubuntu 21.10 again on another drive exactly same configurations with the exception of language. Installed OS in english this time. Sikuli works now. Note: Sikuli didn't work on a windows 10 pc with Turkish language tried on a PC windows 10 english worked there too. What could be causing this. I paid special attention to directory names on both Turkish OS there was no invalid characters like "ŞÇĞ" etc.

mustafa237 avatar Apr 19 '22 23:04 mustafa237

@mustafa237 If you get a chance, please test with 2.0.6 and come back with a new issue in case of crash.

RaiMan avatar Feb 28 '23 16:02 RaiMan