[1.0.1] Intellij IDEA crashed

Asked by luislirola

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000068ba7bc5, pid=122392, tid=18316
#
# JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.51-b03 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [libtesseract-3.dll+0x1a7bc5]

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

This is what I can see from the (horrible ;-) JVM dump:

- you seem to use Intellij IDEA to develop Java apps
- you are using SikuliX 1.0.1 (conclusion from the dlls)
- you have setup SikuliX in D:\SOFT\sikuli
- the libs are loaded from D:\SOFT\sikuli\libs, that is on system path at runtime

this all seems to be as it should be.

I suppose you are using sikuli-java.jar, that is left in the setup folder D:\SOFT\sikuli and referenced in your test project.

there are additional OpenCV libs loaded at C:\Windows\Temp\javacpp217882498280317\
are you using Sikuli Java API in parallel??

to narrow down to the problem:
add the following JVM parameter to the runtime settings of your project
-Dskuli.Debug=3
or use
java.lang.System.setProperty("skuli.Debug", "3");

in your test app before touching any SikuliX features.

This will produce some valuable debug output.

A paste of your test app would help too.

Revision history for this message
luislirola (lirolaluis) said :
#2

hm...interesting situation....i deleted all usefull libs from project - now just have
----sikuli-api-1.0.2-standalone.jar
----sikuli-java.jar
----sikuli-script.jar
and there is an new error - on the beginning:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
but all works fine
when i add SLF4J libs there are new arrors in
do{
            ready_region.wait(fold,5000);
}while (ready_region.find(fold)==null && ready_region.find(fast_fold)==null );

"C:\Program Files\Java\jdk1.6.0_35\bin\java" -Didea.launcher.port=7541 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.6.0_35\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_35\jre\lib\ext\sunjce_provider.jar;D:\projects\demothread\out\production\demothread;D:\SOFT\sikuli\sikuli-java.jar;D:\SOFT\sikuli\sikuli-script.jar;D:\SOFT\sikuli\sikuli-api-1.0.2-standalone.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-api-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-ext-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-jcl-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-jdk14-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-log4j12-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-migrator-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-nop-1.7.5.jar;D:\SOFT\sikuli-api\slf4j-1.7.5\slf4j-simple-1.7.5.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain Prog.demo
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/SOFT/sikuli-api/slf4j-1.7.5/slf4j-jcl-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/SOFT/sikuli-api/slf4j-1.7.5/slf4j-jdk14-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/SOFT/sikuli-api/slf4j-1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/SOFT/sikuli-api/slf4j-1.7.5/slf4j-nop-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/SOFT/sikuli-api/slf4j-1.7.5/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JCLLoggerFactory]
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
 at org.slf4j.impl.JCLLoggerFactory.getLogger(JCLLoggerFactory.java:80)
 at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
 at org.sikuli.api.DefaultLogger.<clinit>(APILogger.java:249)
 at org.sikuli.api.APILogger.<clinit>(APILogger.java:33)
 at org.sikuli.api.DefaultScreenRegion.wait(DefaultScreenRegion.java:120)
 at Prog.actions.Pre_flop_action.<init>(Pre_flop_action.java:39)
 at Prog.demo$4.run(demo.java:441)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 ... 7 more
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.api.APILogger
 at org.sikuli.api.DefaultScreenRegion.wait(DefaultScreenRegion.java:120)
 at Prog.actions.Pre_flop_action.<init>(Pre_flop_action.java:39)
 at Prog.demo$2.run(demo.java:225)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.api.APILogger
 at org.sikuli.api.DefaultScreenRegion.wait(DefaultScreenRegion.java:120)
 at Prog.actions.Pre_flop_action.<init>(Pre_flop_action.java:39)
 at Prog.demo$1.run(demo.java:117)
Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class org.sikuli.api.APILogger
 at org.sikuli.api.DefaultScreenRegion.wait(DefaultScreenRegion.java:120)
 at Prog.actions.Pre_flop_action.<init>(Pre_flop_action.java:39)
 at Prog.demo$3.run(demo.java:333)

Process finished with exit code 0

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

This seems to be caused by the fact, that you use ----sikuli-api-1.0.2-standalone.jar together with SikuliX version 1.0.1 stuff.

This is not tested and might lead to problems.

So just start with a clean SikuliX test usage in D:\SOFT\sikuli\:
- delete everything exept sikuli-setup.jar
- run setup and select option 4 (option 1 might be selected too, to have the SikuliX IDE available for image management)
- this should succeed and give you sikuli-java.jar (and optionally sikuli-ide.jar)

Now take care, that in your projects class path you only have a reference to sikuli-java.jar (do not move it!) for any Sikuli stuff.
In your test app before touching any SikuliX features (like e.g. Screen s = new Screen();) add this:
java.lang.System.setProperty("sikuli.Debug", "3")
this will produce some more debug output on command line, that helps to understand, what's going on.

If you want to use sikuli-api-1.0.2 in parallel in the same project just put it in a separate folder than D:\SOFT\sikuli\, add a reference to your projects class path, add an import and test this.

BTW: I guess you know that already: sikuli-api-1.0.2 is in no way API compatible to SikuliX, it is only the basic features they have in common.

Revision history for this message
luislirola (lirolaluis) said :
#4

i delete all files...created new project...imported this new sikuli-java...but it my app cant run without sikuli-api - cause i need imagetargets etc...so i imported as another library from another folder sikuli-api... but still have this error
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

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

So for what do you need SikuliX then?

The SLF4J problem must be a sikuli-api problem - but with this I cannot help you - not my project.

*** recommendation for issues with Sikuli Java API:
pls. post on
http://code.google.com/p/sikuli-api/issues/list
which is the direct access to the developers.

Revision history for this message
luislirola (lirolaluis) said :
#6

ok thx...will try to fix it...gl

Revision history for this message
luislirola (lirolaluis) said :
#8

and this i have in console with debug before error
[debug] Region.text: #()#
[debug] Region: init: (395, 664, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=395,y=664,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=395,y=664,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (467, 689, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=467,y=689,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=467,y=689,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (500, 767, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=500,y=767,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=500,y=767,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (450, 799, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=450,y=799,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=450,y=799,width=70,height=25]
[debug] Region.text: #()#
needed_bet2= 18.0
highest_stack= 76.5
[debug] Region: init: (100, 969, 10, 10)
7s 7h f
[log] TYPE "f"
[debug] Robot: doType: F ( 70 )
f in 80 Pre_flop - Pre_flop_action
[debug] Region: init: (325, 295, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=325,y=295,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=325,y=295,width=70,height=25]
[debug] Region.text: #($0.02)#
[debug] Region: init: (203, 281, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=203,y=281,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=203,y=281,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (145, 245, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=145,y=245,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=145,y=245,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (190, 155, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=190,y=155,width=70,height=25]
[debug] Region: init: (1043, 814, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=1043,y=814,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=190,y=155,width=70,height=25]
[debug] Region.text: #($0.06)#
[debug] Region: init: (273, 138, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=273,y=138,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=1043,y=814,width=70,height=25]
[debug] Region.text: #($0.02)#
[debug] Region: init: (921, 800, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=921,y=800,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=273,y=138,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (395, 145, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=395,y=145,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=921,y=800,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (863, 764, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=863,y=764,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=395,y=145,width=70,height=25]
[debug] Region.text: #($0.06)#
[debug] Region: init: (467, 170, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=467,y=170,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=863,y=764,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (908, 674, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=908,y=674,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=467,y=170,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (500, 248, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=500,y=248,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=908,y=674,width=70,height=25]
[debug] Region.text: #($0.11)#
[debug] Region: init: (991, 657, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=991,y=657,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=500,y=248,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (450, 280, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=450,y=280,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=991,y=657,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=450,y=280,width=70,height=25]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000068ba7bc5, pid=9120, tid=10352
#
# JRE version: 6.0_35-b10
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.10-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [libtesseract-3.dll+0x1a7bc5]
#
# An error report file with more information is saved as:
# D:\projects\demothread\hs_err_pid9120.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Process finished with exit code 1

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

please stop posting Java dumps - they do not help anything but cluttering this forum.

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

So you are doing a series of Region.text() calls, that work ok (with the known problems of OCR quality) until a certain point:

.... some logging ....
debug] Region: init: (500, 248, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=500,y=248,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=908,y=674,width=70,height=25]
[debug] Region.text: #($0.11)#
[debug] Region: init: (991, 657, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=991,y=657,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=500,y=248,width=70,height=25]
[debug] Region.text: #()#
[debug] Region: init: (450, 280, 70, 25)
[debug] Screen.capture: java.awt.Rectangle[x=450,y=280,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=991,y=657,width=70,height=25]
[debug] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=450,y=280,width=70,height=25]

... so what is the special situation at this point of your workflow?

Revision history for this message
luislirola (lirolaluis) said :
#11

hm... my app all the time reading text from screen or looking for match of picture in 4 parallel threads( in 4 different windows of screen)...maybe i should synchronize textreading or screencapturing?

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

parallel threads might be the problem.
many parts of Sikuli are not thread safe and Tesseract (the OCR feature) has problems with parallel usage of the library.

So some coordination should help.

Can you help with this problem?

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

To post a message you must log in.