← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #678428]: Jython App() crashes with NullPointerException

 

Question #678428 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678428

Description changed to:
My Script:
========
# sandbox.py

import sys
sys.path.append('sikulixapi.jar')
from org.sikuli.script import App
app = App('test') << Here the Script crashes
app.open()

Used Versions:
============
Jython 2.7.0
SikuliXApi.jar Version 1.1.4
Windows 10

Stack Trace:
==========
C:\_Daten\Work\Coding\Jython\SikuliX>C:\jython2.7.0\bin\jython sandbox.py
Traceback (most recent call last):
  File "sandbox.py", line 4, in <module>
    app = App('test')
        at org.sikuli.script.RunTime.init(RunTime.java:516)
        at org.sikuli.script.RunTime.get(RunTime.java:384)
        at org.sikuli.script.RunTime.get(RunTime.java:221)
        at org.sikuli.script.RunTime.get(RunTime.java:215)
        at org.sikuli.script.RunTime.loadLibrary(RunTime.java:951)
        at org.sikuli.natives.WinUtil.checkFeatureAvailability(WinUtil.java:119)
        at org.sikuli.script.App.<init>(App.java:310)
        at org.sikuli.script.App.<init>(App.java:315)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.python.core.PyReflectedConstructor.constructProxy(PyReflectedConstructor.java:211)

java.lang.NullPointerException: java.lang.NullPointerException

Research:
========
When I execute those Steps from the Script ( sandbox.py ) within the Jython Console it still works after a second attempt. On the first try it also crashes with NullPointer Exception.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.