[1.1.0-Beta1] Java: Eclipse: ImagePath not set correctly at runtime
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Committed
|
Critical
|
RaiMan |
Bug Description
fixed in builds greater build number 2014-05-30-18
-------
Hi all,
I successfully installed Sikulix IDE and run a simple script.
Then I deleted all files (except setup jar and Downloads dir) under c:\sikulix and setup again this time for Java API. This was also successful (no error in setup log and final setup message was a success). Now c:\sikulix folder contains sikulixapi.jar, lib and libs items (in addition to setup jar and downloads dir).
But when I try to run the sample Java code in Eclipse, I get the error below.
I had JDK 8 and JRE 7 at the same time on my machine. The IDE had run ok with them. When sikulix script failed, I removed JDK 8, changed my regional settings to English, but none helped.
Any help is appreciated!
Stdout:
[error] ImagePath: setBundlePath: Settings not changed: invalid BundlePath: null
[error] ResourceLoader: check: usr_paths
Stderr:
Unhandled exception
Type=Segmentation error vmState=0x00040000
J9Generic_
Handler1=744E0100 Handler2=7463EF70 InaccessibleAdd
EDI=0249F9FC ESI=00000020 EAX=7453D7D8 EBX=00000000
ECX=FFFDA000 EDX=24062A18
EIP=6567F5F1 ESP=0249F8FC EBP=0249F9F4 EFLAGS=00010212
GS=002B FS=0053 ES=002B DS=002B
Module=
Module_
Target=
CPU=x86 (4 logical CPUs) (0x1fce5c000 RAM)
----------- Stack Backtrace -----------
Java_org_
VMprJavaSendNat
gpProtectedRunC
signalProtectAn
j9sig_protect+0x44 (j9signal.c:150, 0x7463F154 [J9PRT26+0xf154])
gpProtectAndRun
gpCheckCallin+0x61 (jnicsup.c:525, 0x744F0811 [j9vm26+0x20811])
callStaticVoidM
(0x00393B7F [javaw+0x3b7f])
(0x0039B336 [javaw+0xb336])
(0x0039B3C0 [javaw+0xb3c0])
BaseThreadInitT
RtlInitializeEx
RtlInitializeEx
-------
JVMDUMP039I "gpf" döküm olayı (ayrıntı "") işleniyor - 2014/06/09 14:01:02 - Lütfen bekleyin.
JVMDUMP032I JVM bir olayın karşısında 'C:\Users\
JVMDUMP010I System dökümü C:\Users\
JVMDUMP032I JVM bir olayın karşısında 'C:\Users\
JVMDUMP010I Java dökümü C:\Users\
JVMDUMP032I JVM bir olayın karşısında 'C:\Users\
JVMDUMP010I Snap dökümü C:\Users\
JVMDUMP013I Döküm olayı "gpf", ayrıntı "" işlendi.
Changed in sikuli: | |
importance: | High → Critical |
description: | updated |
Hi all,
I encounter a similar error if I use relative path in sikulix 1.1.0 beta1 (2014-05-30-18) with java client in Eclipse: arc_installer. png
[error] ImagePath: not found on image path: ./images/
[debug] ImagePath: ImagePath has 1 entries
[error] Image: Image not valid, but TextSearch is switched off!
There is no matched screen shot.
Here are my jdk environment on Windows7 32bits host:
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)
Here are my code snipet:
public class TestSikuli { "./images/ arc_installer. png") == null) { out.println( "There is no matched screen shot."); "./images/ arc_installer_ close.png" ); p.targetOffset( 157, -1)); "./images/ arc_installer_ close_ok. png"); Trace() ;
public static void main(String[] args) throws IOException {
Screen s = new Screen();
try {
if (s.exists(
System.
return;
}
Pattern p = new Pattern(
s.click(
s.click(
} catch (FindFailed e) {
e.printStack
}
}
}
Then I inspected into the source using JadClipse, I found that the ImagePath. BundlePath == null, I tried to add the static initialize code beloe in my class, then the java code works well. out.println( "BundlePath: " + ImagePath. getBundlePath( )); setBundlePath( System. getProperty( "user.dir" )); out.println( "BundlePath: " + ImagePath. getBundlePath( ));
static {
System.
ImagePath.
System.
}