I am using Sikuli-api to automate a standalone application. This application starts on running *.bat
file. In code I am opening this application as:
m_sikscr=new SikuliScript();
m_sikscr.openApp("path of bat file");
I am getting below exception on this openApp() command.
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x515ee11e, pid=3992, tid=5868
#
# JRE version: Java(TM) SE Runtime Environment (8.0_20-b26) (build 1.8.0_20-b26)
# Java VM: Java HotSpot(TM) Client VM (25.20-b23 mixed mode windows-x86 )
Whereas, when I try to open same bat file via below line of code, it gets open successfully.:
String[] command = {"cmd.exe", "/C", "Start", "*.bat"};
Runtime r = Runtime.getRuntime();
Process p = r.exec(command);
p.waitFor();
Below is stack trace :
Stack: [0x00d50000,0x00da0000], sp=0x00d9edc8, free space=315k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0xce11e]
C [Win32Util.dll+0x147d]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.sikuli.script.Win32Util.openApp(Ljava/lang/String;)I+0
j org.sikuli.script.App.open()Lorg/sikuli/script/App;+19
j org.sikuli.script.App.open(Ljava/lang/String;)Lorg/sikuli/script/App;+8
j org.sikuli.script.SikuliScript.openApp(Ljava/lang/String;)I+1
j testpack.OmsTest.openOMS()V+1509
v ~StubRoutines::call_stub
I am failing to understand if it is an issue with bat file or Sikuli.