Stuck in Sikulix-IDE 2.0.5 is starting on Java 8

Asked by Parsawit Deshwattanatham

Thanks for stopping by. Let me explain, this startup problem occurred when I plugged in my new display. I got built-in display on my laptop (1920*1080) and I plugged another display via HDMI which resolution is 1366*768 and I only display the new display which I make it as my main desktop. I ran sikulix-ide and Sikulix-IDE 2.0.5 is starting on Java 8 showed up but it stuck right there. No error or anything just Stuck Sikulix-IDE 2.0.5 is starting on Java 8. I have been waiting for an hour but no luck. Any suggestion to get it working on my new display?

I have not test whether if I unplug the new desktop will solve the problem.

Sorry my English kinda bad

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
Chetan (cshamdas) said :
#1

can you try the same with java 14 once

Revision history for this message
Parsawit Deshwattanatham (therealunixmad) said :
#2

Thanks for the answer, Chetan! But I tried but it still stuck on in Sikulix-IDE 2.0.5 is starting on Java 14.

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

I received the same hang on my Linux workstation, and was also told to move from Java 8 to a newer Java. I tried Java 11, and it was successful.

Later I tried to take my testcases to my Windows 10 workstation, so that I could determine how much work might be involved in creating testcases on one platform, and running on another. The WIndows 10 workstation had Java 8, and it worked just fine. However, I found an issue with findText not behaving the same as on my Linux. So I attempted to add tesseract-ocr for Windows to the WIndows 10 workstation. Now I get the same hang trying to start as I did on Linux.

So I believe there's something more going on than just the wrong version of Java. Is there more that Parsawit and I could attempt? Perhaps there are some temporary files to remove?

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

@Roger F Borello

--- about Java version
generally it is recommended to use Java 11 (current LTS version) from now on, because it has better support for special screen situations.
Using interim versions 11+ only makes sense, if you need the new features (not needed for SikuliX).
From September on we will have Java 17 as the latest LTS (on Azul there is a 17ea version available for testing Java features)

--- about Tesseract
On Windows you do not have to do anything extra, since everything is bundled.

--- OCR (findText) behaving differently
Thats normal, since the pixel structures on Linux and Windows are dramatically different (mainly fonts and background differ).
You have to do some testing, to find the optimal setup

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

Update the Java on the Windows 10 desktop to OpenJDK 11, and the same problem of the IDE hanging after the splash screen.

I tried removing the appdata\roaming\sikuli directory, and still hangs. tried relocating the sikulixapi-2.0.5.jar and sikulixide-2.0.5.jar to a different directory (C:\sikulix instead of C:\sikuli) and still hangs at the splash screen.

I didn't mean to hijack Parsawit's thread, but there is something that hangs up the IDE waiting for something to initialize and multiple people have reported this. If we cannot get past the loading of the IDE, we won't be able to really explore the capabilities of this.

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

@Roger F Borello

In a commandline window:

<folder-OpenJDK11>\bin\java -jar <path-to>\sikulixide....jar - v -c

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

@Roger F Borello

BTW: I cannot reproduce your problem on my Win10 with 2 monitors attached.

Revision history for this message
Roger F Borrello Jr (mydoll) said (last edit ):
#8

I removed the actual directory where my project was, because the output from -v -c was showing that even though I had wiped out the AppData contents, the IDE was still discovering my project files. Once I renamed that, the IDE came up.

Prior to removing the project:
.
.
.
[4189 debug] IDESupport: added: Jython
[4189 debug] IDESupport: added: Text
[4189 debug] IDESupport: exit: defaultrunner: Jython (py)
[4205 debug] IDE: Reading Preferences
[4205 debug] IDE: Adding components to window
[4220 debug] IDE: [I18N] menuRecent
[4252 debug] IDE: [I18N] menuToolAndroid
[4252 debug] IDE: creating tabbed editor
[4439 debug] IDE: creating message area
[4549 debug] IDE: creating combined work window
[4564 debug] IDE: Putting all together
[4564 debug] IDE: Putting all together - after main pane
[4674 debug] IDE: Putting all together - after toolbar
[4674 debug] IDE: Putting all together - before layout
[4783 debug] IDE: Putting all together - after layout
[4783 debug] IDE: Putting all together - Restore last Session <-- Looks like this is where project gets retrieved
[4783 debug] IDE: Restore scripts from last session
[4783 debug] IDE: Restore Sikuli script: C:\sikuli\c-act\c-act_demo_about.sikuli
[4799 debug] EditorPane: created 1626370995740
[4814 debug] EditorPane: loadfile: C:\sikuli\c-act\c-act_demo_about.sikuli
[4814 debug] JythonRunner: starting initialization
[4830 debug] RunTime:resourceLocation: (class org.sikuli.script.support.RunTime) /Lib
[4830 debug] RunTime:resourceList: having jar: jar:file:/C:/sikulix/lib/sikulixide-2.0.5.jar!/Lib
[4861 debug] EditorPane: InitTab: (text/jython)
[4861 debug] SikuliEditorKit.read
[4892 debug] ImagePath: new BundlePath: C:\sikuli\c-act\c-act_demo_about.sikuli
[4892 debug] EditorPane: setFiles: for: C:\sikuli\c-act\c-act_demo_about.sikuli
[5002 debug] Screen: initScreens: starting
[5017 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment()
[5049 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
[5080 debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[5096 debug] Screen: Monitor 0: (0, 0) 1920 x 1080
[5111 debug] Screen: initScreens: monitor mouse check
[5111 debug] Screen: *** checking: R[0,0 1920x1080]@S(0) center: (960, 540) --- OK
[5111 debug] Screen: initScreens: ending
[5361 debug] Image: loaded: chrome_maximized.png (file:/C:/sikuli/c-act/c-act_demo_about.sikuli/chrome_maximized.png)
[5361 debug] Image: cached: chrome_maximized.png (8 KB) (# 1 KB 8 -- 0 % of 64 MB)
[error] Region(1920,0,830,391) outside any screen - subsequent actions might not work as expected
[10716 debug] RunTime:files exported: 1192 from: Lib to:
 C:\Users\roger\AppData\Roaming\Sikulix\Lib
[13219 debug] Jython: added as Jython::sys.path[0]:
C:\Users\roger\AppData\Roaming\Sikulix\Lib\site-packages
[13230 debug] Jython: ***** sys.path
 0: C:\sikuli\c-act\c-act_demo_about.sikuli
 1: C:\Users\roger\AppData\Roaming\Sikulix\Lib\site-packages
 2: C:\Users\roger\AppData\Roaming\Sikulix\Lib
 3: C:\sikulix\lib\Lib
 4: C:\sikulix\lib\sikulixide-2.0.5.jar\Lib
[13505 debug] JythonRunner: ready: version 2.7.2 <-- hangs here
[debug] RunTime:***** final cleanup at System.exit() ***** <-- killed here
[137645 debug] RunTime:***** final cleanup at System.exit() *****
[137769 debug] FileManager: deleteFileOrFolder:
C:\Users\roger\AppData\Local\Temp\Sikulix_325615457
[debug] HotkeyManager: reset: removed all SikuliX hotkeys.
[debug] HotkeyController: stopping hotkey provider

After removing the project folder and the IDE comes up:
.
.
.
[4148 debug] IDESupport: added: Jython
[4148 debug] IDESupport: added: Text
[4148 debug] IDESupport: exit: defaultrunner: Jython (py)
[4163 debug] IDE: Reading Preferences
[4163 debug] IDE: Adding components to window
[4179 debug] IDE: [I18N] menuRecent
[4210 debug] IDE: [I18N] menuToolAndroid
[4210 debug] IDE: creating tabbed editor
[4351 debug] IDE: creating message area
[4460 debug] IDE: creating combined work window
[4460 debug] IDE: Putting all together
[4460 debug] IDE: Putting all together - after main pane
[4570 debug] IDE: Putting all together - after toolbar
[4570 debug] IDE: Putting all together - before layout
[4648 debug] IDE: Putting all together - after layout
[4648 debug] IDE: Putting all together - Restore last Session <-- No project to retrieve
[4664 debug] IDE: Restore scripts from last session
[4679 debug] EditorPane: created 1626371187600
[4695 debug] JythonRunner: starting initialization
[4695 debug] RunTime:resourceLocation: (class org.sikuli.script.support.RunTime) /Lib
[4695 debug] RunTime:resourceList: having jar: jar:file:/C:/sikulix/lib/sikulixide-2.0.5.jar!/Lib
[4726 debug] EditorPane: InitTab: (text/jython)
[4773 debug] ImagePath: new BundlePath: C:\Users\roger\AppData\Local\Temp\Sikulix_193824048\SikulixIDETempTab1626371187600
[4789 debug] Screen: initScreens: starting
[4789 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment()
[4789 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
[4789 debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[4789 debug] Screen: Monitor 0: (0, 0) 1920 x 1080
[4804 debug] Screen: initScreens: monitor mouse check
[4804 debug] Screen: *** checking: R[0,0 1920x1080]@S(0) center: (960, 540) --- OK
[4804 debug] Screen: initScreens: ending
[4804 debug] IDE startup: 4.8 seconds *** Running on Java 9+
[debug] RunTime:files exported: 1192 from: Lib to: C:\Users\roger\AppData\Roaming\Sikulix\Lib
[debug] Jython: added as Jython::sys.path[0]:C:\Users\roger\AppData\Roaming\Sikulix\Lib\site-packages
[debug] Jython: ***** sys.path
 0: C:\Users\roger\AppData\Local\Temp\Sikulix_193824048\SikulixIDETempTab1626371187600
 1: C:\Users\roger\AppData\Roaming\Sikulix\Lib\site-packages
 2: C:\Users\roger\AppData\Roaming\Sikulix\Lib
 3: C:\sikulix\lib\Lib
 4: C:\sikulix\lib\sikulixide-2.0.5.jar\Lib
[13677 debug] JythonRunner: ready: version 2.7.2 <-- IDE is running

So question is, what does it do with the project when loading, and what would cause the hang? I hope this helps Parswit with his hang, as well. Perhaps there is something kept in the Java properties, such that updating the Java creates a fresh set of properties and the IDE loads because of that.

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

@Roger F Borello

Great thanks for not giving up.

The hint about the script names saved when shutting down the IDE, that are tried to be reloaded on the next startup is helpful.

I will check how this can hinder the IDE window to come up and fix it in 2.0.6

Revision history for this message
Parsawit Deshwattanatham (therealunixmad) said :
#10

Updated: I am able to replicate the bug. So, I am using laptop has built-in screen and I connected another monitor via HDMI port. To replicate this bug, I must show "Second screen only" ( WINDOW KEY + P ) which turn off my built-in screen and only show the monitor. Then, I tried to open sikulixide 2.0.5 but it stuck on splash screen.

But if I used WINDOW KEY + P and select "Extend" so it display both screen but did not duplicate. I tried running sikulixide 2.0.5 and it is not stuck on splash screen anymore.

I don't know if it going to help Mr. Roger or not but I hope it did.

Revision history for this message
Best RaiMan (raimund-hocke) said (last edit ):
#11

@therealunixmad
thanks for the information.

Will try to find out what is going on internally in the case of 2nd-Screen-only

tracked on GitHub: https://github.com/RaiMan/SikuliX1/issues/469

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

nothing else to do here -> GitHub

Revision history for this message
Parsawit Deshwattanatham (therealunixmad) said :
#13

Thanks RaiMan, that solved my question.