Sikuli ide crashes when any action with camera is clicked

Asked by Rosie Bell

Hi there,

I think I have read every thread relating to this on your site!

I have installed the latest verison of the ide; I have tried both jre6 and jre7. My paths are all correct.
I have C:\Program Files\Java\jre6\bin;C:\Program Files\Sikuli X\libs;C:\Program Files\Sikuli X\bin

My os version is Windows 7 professional with SP 1.
The ide opens but closes as soon as I click on anything that has an image capture associated. I am running the ide from the bat file.

So far I have had no error messages or anything that could be helpful in figuring this out.

Please advise.
Rosie

Question information

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

--- JRE
must be JRE 6 and running java -version from command line must say, that it is 1.6 (latest version is 1.6.0_33)
Standard installation folder
C:\Program Files\Java\jre6

--- Sikuli
recommended: X-1.0rc3 r930
Standard installation folder
C:\Program Files\Sikuli X\

--- System path
When on a command line the command set should show a PATH containing these 2 entries (among others ;-)
C:\Program Files\Sikuli X\libs
C:\Program Files\Java\jre6\bin
If you have your stuff somewhere else, you have to adjust these accordingly

--- SIKULI_HOME
it is recommended to have in environment:
SIKULI_HOME=C:\Program Files\Sikuli X\
A MUST: the trailing \
If you have your stuff somewhere else, you have to adjust these accordingly

System Path and Environment:
Systemsettings -> System -> Extended -> Environmentvariables

--- a base test
on a commandline:
java -jar %SIKULI_HOME%sikuli-script.jar -i

this should open an interactive Sikuli Jython session, where you can enter any Jython statements
you have to press enter after each line and watch the printout.
The comments need not be entered ;-)

# starts an interactive snapshot
img = capture()

# prints the filename of the image file located in a temp folder
print img

If there are any errors, then they should be visible in the command window.
If you need further help, come back pasting the error messages here.

If this works, you should delete the following entry in the registry completely and restart the system:
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\sikuli\ide\

Then use Sikuli-IDE.bat or Sikuli-IDE-w.bat (no command window stays open) to start the IDE.

Revision history for this message
Rosie Bell (rbell-x) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Rosie Bell (rbell-x) said :
#3

I am not quite sure how this is fixed now as all I did differently was to uninstall and reinstall JRE 1.6.

I found your steps very helpful , especially using java -jar %SIKULI_HOME%sikuli-script.jar -i

Many thanks for you quick and patient reply!
R

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

Thanks for feedback. I will make this a faq entry.

Revision history for this message
Rajeev Kumar (rajeev-bhu) said :
#5

I am getting error at the point
 "# starts an interactive snapshot
img = capture()"

 at java.awt.Window$1.setOpacity(Unknown Source)
        at com.sun.awt.AWTUtilities.setWindowOpacity(Unknown Source)
        at org.sikuli.script.Win32Util.setWindowOpacity(Win32Util.java:80)
        at org.sikuli.script.TransparentWindow.setOpacity(TransparentWindow.java:18)

the above exception is repeated lot of times.

Can you please tell the the solution for this ?
If you need any other information please let me know.

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

@ Rajeev
" who can read, has some advantages in life" - a saying in Germany

So do not take it wrong or impolite, but as mentioned in the comment #1:
must be JRE 6

and at many places around here it is said:

Java 7 not yet supported.

Revision history for this message
Rajeev Kumar (rajeev-bhu) said :
#7

Thanks a lot Raiman.
I will take care next time while read any blog.
I appreciate your comments.
:)