Running IDE sikulixide-2.0.5.jar hangs

Asked by Roger F Borrello Jr

Using Linux Mint 20.1, which is using Ubuntu 20.04 code base, the IDE never displays. There are 2 Java processes starting. The first is the original java-jar, and the jstack indicates it is running a Unix process:
"main" #1 prio=5 os_prio=0 tid=0x00007f2a9c00a800 nid=0x176c3 in Object.wait() [0x00007f2aa08ac000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x000000071dcedfa8> (a java.lang.UNIXProcess)
 at java.lang.Object.wait(Object.java:502)
 at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
 - locked <0x000000071dcedfa8> (a java.lang.UNIXProcess)
 at org.sikuli.script.runners.ProcessRunner.runBlocking(ProcessRunner.java:187)
 at org.sikuli.script.support.RunTime.start(RunTime.java:193)
 at org.sikuli.ide.Sikulix.main(Sikulix.java:13)

The other is stuck showing the window, which never appears:
"main" #1 prio=5 os_prio=0 tid=0x00007fee8400b000 nid=0x176e8 waiting on condition [0x00007fee89b5b000]
   java.lang.Thread.State: WAITING (parking)
 at sun.misc.Unsafe.park(Native Method)
 - parking to wait for <0x00000005d59e4040> (a java.util.concurrent.FutureTask)
 at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
 at java.util.concurrent.FutureTask.get(FutureTask.java:191)
 at org.GNOME.Accessibility.AtkUtil.invokeInSwing(AtkUtil.java:68)
 at org.GNOME.Accessibility.AtkObject.hashCode(AtkObject.java:234)
 at org.GNOME.Accessibility.AtkWrapper.emitSignal(Native Method)
 at org.GNOME.Accessibility.AtkWrapper$5.propertyChange(AtkWrapper.java:545)
 at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
 at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
 at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
 at javax.accessibility.AccessibleContext.firePropertyChange(AccessibleContext.java:768)
 at javax.swing.JScrollPane$AccessibleJScrollPane.stateChanged(JScrollPane.java:1506)
 at javax.swing.JViewport.fireStateChanged(JViewport.java:1369)
 at javax.swing.JViewport.reshape(JViewport.java:839)
 at java.awt.Component.setBounds(Component.java:2261)
 at java.awt.Component.setBounds(Component.java:2405)
 at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:890)
 at java.awt.Container.layout(Container.java:1513)
 at java.awt.Container.doLayout(Container.java:1502)
 at java.awt.Container.validateTree(Container.java:1698)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validateTree(Container.java:1707)
 at java.awt.Container.validate(Container.java:1633)
 - locked <0x00000005d5680170> (a java.awt.Component$AWTTreeLock)
 at java.awt.Container.validateUnconditionally(Container.java:1670)
 - locked <0x00000005d5680170> (a java.awt.Component$AWTTreeLock)
 at java.awt.Window.show(Window.java:1033)
 at java.awt.Component.show(Component.java:1671)
 at java.awt.Component.setVisible(Component.java:1623)
 at java.awt.Window.setVisible(Window.java:1014)
 at org.sikuli.ide.SikulixIDE.initSikuliIDE(SikulixIDE.java:335)
 at org.sikuli.ide.SikulixIDE.main(SikulixIDE.java:88)

I have Java 8 as the default jre, and Java 11 is also installed, but is not primary, as you can see from the command line of the 2nd java process:
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dfile.encoding=UTF-8 -Dsikuli.IDE_should_run -cp /home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar:lib/sikulixide-2.0.5.jar org.sikuli.ide.SikulixIDE -d3 -c

The debug output is:
[38 debug] RunTime:temp folder ok: /tmp/Sikulix_1143884152
Options: *** options dump
Options: testing =
Options: OptionsFile = /home/rfb/.Sikulix/SikulixStore/SikulixOptions.txt
Options: *** options dump end
***** show environment for 2.0.5 IDE
user.home: /home/rfb
work dir: /home/rfb/projects/sikuli
running on Linux 5.11.0-22-generic from a jar
running Java Private Build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10
java.io.tmpdir: /tmp
app data folder: /home/rfb/.Sikulix
executing jar: /home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
*** classpath dump sikulix
  0: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
  1: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
*** classpath dump end
***** show environment end
[134 debug] IDE: running with Locale: en_US
[DEBUG]startUp: IDE: --- Sikuli parameters ---
[DEBUG]startUp: IDE: 1: -d
[DEBUG]startUp: IDE: 2: 3
[DEBUG]startUp: IDE: 3: -c
[139 debug] RunTime:loadlib: trying JXGrabKey
[142 debug] RunTime:libsExport: folder exists: /home/rfb/.Sikulix/SikulixLibs (2.0.5 - 202103030910)
[143 debug] RunTime:loadLib: libJXGrabKey.so (success)
[144 debug] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[147 debug] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[148 debug] IDE: Init ScriptingSupport
[152 debug] IDESupport: enter
[1500 debug] Runner: added: PackedSikulix [zip] application/zip
[1501 debug] Runner: added: SikulixExecutableJar [executablejar] text/jar
[1501 debug] Runner: added: NetworkRunner [] NET
[1502 debug] Runner: added: PackedSikulix [skl] text/skl
[1502 debug] Runner: added: Sikulix [] directory/sikulix
[1503 debug] Runner: added: Text [txt] text/text
[1504 debug] Runner: init: class org.sikuli.script.runners.AbstractLocalFileScriptRunner: warning: not possible
[1504 debug] Runner: added: SikulixJar [jar] text/jar
[1509 debug] Runner: added: Jython [py] text/jython
[1510 debug] IDESupport: added: Jython
[1510 debug] IDESupport: added: Text
[1511 debug] IDESupport: exit: defaultrunner: Jython (py)
[1513 debug] IDE: Reading Preferences
[1513 debug] IDE: Adding components to window
[1521 debug] IDE: [I18N] menuRecent
[1541 debug] IDE: [I18N] menuToolAndroid
[1545 debug] IDE: creating tabbed editor
[1662 debug] IDE: creating message area
[1715 debug] IDE: creating combined work window
[1718 debug] IDE: Putting all together
[1718 debug] IDE: Putting all together - after main pane
[1756 debug] IDE: Putting all together - after toolbar
[1759 debug] IDE: Putting all together - before layout
[1787 debug] IDE: Putting all together - after layout
[1788 debug] IDE: Putting all together - Restore last Session
[1800 debug] EditorPane: created 1625523921045
[1810 debug] JythonRunner: starting initialization
[1839 debug] EditorPane: InitTab: (text/jython)
[1845 debug] ImagePath: new BundlePath: /tmp/Sikulix_1143884152/SikulixIDETempTab1625523921045
[1854 debug] Screen: initScreens: starting
[1855 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment()
[1855 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
[1855 debug] Screen: Monitor 0: (0, 153) 1920 x 1080
[1857 debug] Screen: Monitor 1: (1920, 0) 1920 x 1080
[1857 debug] Screen: No ScreenDevice has (0,0) --- using 0 as primary: java.awt.Rectangle[x=0,y=153,width=1920,height=1080]
[1861 debug] Screen: initScreens: monitor mouse check
[1866 debug] Screen: *** checking: R[0,153 1920x1080]@S(0) center: (960, 693) --- OK
[1869 debug] Screen: *** checking: R[1920,0 1920x1080]@S(1) center: (2880, 540) --- OK
[1870 debug] Device: Mouse: moved externally: now (2873,533) was (2880,540) (mouseMovedResponse 0)
[1872 debug] Screen: initScreens: ending
[1873 debug] IDE startup: 1.9 seconds
[debug] Jython: added as Jython::sys.path[0]:
/home/rfb/.Sikulix/Lib/site-packages
[debug] Jython: ***** sys.path
 0: /tmp/Sikulix_1143884152/SikulixIDETempTab1625523921045
 1: /home/rfb/.Sikulix/Lib/site-packages
 2: /home/rfb/.Sikulix/Lib
 3: /home/rfb/projects/sikuli/lib/Lib
 4: /home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar/Lib
[3179 debug] JythonRunner: ready: version 2.7.2
<<< Control-C Pressed at this point >>>
[debug] RunTime:***** final cleanup at System.exit() *****
[debug] HotkeyManager: reset: removed all SikuliX hotkeys.
[debug] FileManager: deleteFileOrFolder:
/tmp/Sikulix_1143884152

I tried cleaning off the ~/.Sikilix folder and restarting, but no change in the behavior.

The ~/.Sikulix/SikulixLibs/ directory contains
2.0.5_202103030910_MadeForSikuliX64L.txt libJXGrabKey.so libopencv_java430.so

I copied in the libopencv_java452.so that I had built (which I also built tesseract and leptonica):
rfb@rfb:~/projects/sikuli$ tesseract -v
tesseract 4.1.1
 leptonica-1.79.0
  libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 2.0.3) : libpng 1.6.37 : libtiff 4.1.0 : zlib 1.2.11 : libwebp 0.6.1 : libopenjp2 2.3.1
 Found AVX2
 Found AVX
 Found FMA
 Found SSE

Any help getting this running would be appreciated!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Running Ubu20 in VirtualBox on Windows 10 I had no problem to start and use the 2.0.5 IDE with

java -jar sikulixide....jar -v -c

using "sudo apt install" I installed the default jre (which is 11).

I only had a startup problem with some canberra-gtk stuff, which could be solved by installing the stuff.

I think that this is a problem with your GUI-manger in your environment.

... but I have no idea how to help you.

Revision history for this message
Roger F Borrello Jr (mydoll) said :
#2

Some more information... even though you don't think you can help me, I believe you know the code better than I.

I was able to run the IDE when I forced the java to be Java 11, instead of the default Java 8 on my system. I also went back to an old laptop I am trying to replace, and saw that Java 8 was being used, and the IDE loads fine. So I compared the debug output from the old to the new:
Old (using Java 8) has:
executing jar: /home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
*** classpath dump sikulix
  0: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
  1: file:/home/rfb/.Sikulix/Extensions/jruby-complete-9.2.0.0.jar
  2: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
*** classpath dump end

The new (using Java 8) has:
*** classpath dump sikulix
  0: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
  1: file:/home/rfb/projects/sikuli/lib/sikulixide-2.0.5.jar
*** classpath dump end

So what determines if jruby-complete should be deployed to the .Sikulix directory?

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

jruby does not matter, if you do not need it.

If you have it in the same folder as the sikulix jar, it is moved to the extensions folder at first run and used (hence on class path).

So if it works with Java 11, then use it.

I think this can be closed.

Revision history for this message
Roger F Borrello Jr (mydoll) said :
#4

Thanks RaiMan, that solved my question.