[1.1.4] IDE crashes on taking screenshots --- Jython must be available

Asked by Peter Ireland

Hi guys!

So I'm running SikuliX 1.1.4, and Java version 10.0.2, and I can load the IDE.

However, when clicking "Take Screenshot", the IDE crashes with the following log:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.sikuli.ide.CloseableModernTabbedPaneUI (file:/C:/MyPythonScripts/SikuliX/sikulix.jar) to constructor javax.swing.plaf.basic.BasicTabbedPaneUI$Actions(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.sikuli.ide.CloseableModernTabbedPaneUI
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
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
 at org.sikuli.ide.ButtonCapture.capture(ButtonCapture.java:97)
 at org.sikuli.ide.ButtonCapture.captureWithAutoDelay(ButtonCapture.java:80)
 at org.sikuli.ide.ButtonCapture.actionPerformed(ButtonCapture.java:74)
 at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
 at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
...
 at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalThreadStateException: Cannot call method from the event dispatcher thread
 at java.desktop/java.awt.Robot.checkNotDispatchThread(Unknown Source)
 at java.desktop/java.awt.Robot.waitForIdle(Unknown Source)
 at org.sikuli.script.Mouse.move(Mouse.java:360)
 at org.sikuli.script.Mouse.move(Mouse.java:329)
 at org.sikuli.script.Mouse.init(Mouse.java:58)
 at org.sikuli.script.Screen.initScreens(Screen.java:107)
 at org.sikuli.script.Screen.<clinit>(Screen.java:71)
 ... 40 more

Question information

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

System?

Revision history for this message
Peter Ireland (crowstorm) said :
#2

The machine this is running on is Windows 7 Ultimate SP1 - 64 bit.
Thanks!

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

How do you run the IDE?

Revision history for this message
Peter Ireland (crowstorm) said :
#4

I just run this from cmd:
java -jar C:\MyPythonScripts\SikuliX\sikulix.jar
Thanks!

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

I just tested on Win 10-64 with Java 8 latest: works

I know that there are various smaller problems with the IDE GUI on Java 9+.
Currently I am developing on Mac with Java 11 and testing on Windows 10 with Java 8.

So if possible, go back to Java 8 and try again.

I make this question a bug, until I have tested on Win10 with Java 11 the next days.

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

I tested on Win10 with Java 11 now: everything works as it should.

Please go back and use the latest build 1.1.4 according to the steps as mentioned on the Downloads page.

... it looks like you did not activate Jython as mentioned there.

Revision history for this message
Peter Ireland (crowstorm) said :
#7

Cheers, tried this and got a similar log running the same on Java 8 Update 181:

Sep 04, 2018 11:08:03 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[error] SikuliIDEI18N: no locale for en_GB
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
 at org.sikuli.ide.ButtonCapture.capture(ButtonCapture.java:97)
 at org.sikuli.ide.ButtonCapture.captureWithAutoDelay(ButtonCapture.java:80)
 at org.sikuli.ide.ButtonCapture.actionPerformed(ButtonCapture.java:74)
 at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
 at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
 at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
 at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
 at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
 at java.awt.Component.processMouseEvent(Unknown Source)
 at javax.swing.JComponent.processMouseEvent(Unknown Source)
 at java.awt.Component.processEvent(Unknown Source)
 at java.awt.Container.processEvent(Unknown Source)
 at java.awt.Component.dispatchEventImpl(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
 at java.awt.Container.dispatchEventImpl(Unknown Source)
 at java.awt.Window.dispatchEventImpl(Unknown Source)
 at java.awt.Component.dispatchEvent(Unknown Source)
 at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
 at java.awt.EventQueue.access$500(Unknown Source)
 at java.awt.EventQueue$3.run(Unknown Source)
 at java.awt.EventQueue$3.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue$4.run(Unknown Source)
 at java.awt.EventQueue$4.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
 at java.awt.EventQueue.dispatchEvent(Unknown Source)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
 at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalThreadStateException: Cannot call method from the event dispatcher thread
 at java.awt.Robot.checkNotDispatchThread(Unknown Source)
 at java.awt.Robot.waitForIdle(Unknown Source)
 at org.sikuli.script.Mouse.move(Mouse.java:360)
 at org.sikuli.script.Mouse.move(Mouse.java:329)
 at org.sikuli.script.Mouse.init(Mouse.java:58)
 at org.sikuli.script.Screen.initScreens(Screen.java:107)
 at org.sikuli.script.Screen.<clinit>(Screen.java:71)
 ... 40 more

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

please run so:

java -jar C:\MyPythonScripts\SikuliX\sikulix.jar -v

and send the debug output to my mail: sikulix---at---outlook---dot---com

Revision history for this message
Peter Ireland (crowstorm) said :
#9

Thank you, email was sent

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

please go back to comment #6 and do what I recommended.

Jython is missing still!

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

Jython must be available

Revision history for this message
Peter Ireland (crowstorm) said :
#12

Thanks RaiMan, that solved my question.

Revision history for this message
Peter Ireland (crowstorm) said :
#13

Hi,

Thanks for this, I've installed 2.7.0 version of Jython and the same problem occurs.

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

I do not understand, what you are doing or even reading ????

in comment #6 already I clearly said:

Please go back and use the latest build 1.1.4 according to the steps as mentioned on the Downloads page.

... it looks like you did not activate Jython as mentioned there.

All you need is available on the Downloadpage including information.

Revision history for this message
HAL-9000 (coldlogic) said :
#15

Had same behavior going on with Sikulix.jar standalone on my Mac and found this thread. Thanks Raiman for the debug java jar switch -v out of the terminal in comment #8.

Running that in terminal here I got output (don't recall exact) about Text Initializer some-such not finding native libraries and the program bailed out. Tesseract? Weird I thought; installed brew and installed Tesseract and problem solved.

Then I remembered...I had gone into settings and set the screen cap utility to prompt for filename on capture. Tesseract fires there with that option set, but doesn't obviously with the auto-naming.

Anyways, thanks again for the thread it was very useful (like Sikulix!).

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

Thanks for the pointer:
The Tesseract libs bundled with SikuliX where not handled correctly.
It is revised now and works with the latest build (no need to brew tesseract any more ;-)

Can you help with this problem?

Provide an answer of your own, or ask Peter Ireland for more information if necessary.

To post a message you must log in.