X 1.0rc1: Windows 7 64 bit: Sikuli does not work - Vision engine 32Bit cannot be loaded

Bug #702797 reported by A. Decorte
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Undecided
Unassigned

Bug Description

I read that it works only if you install 32 bit JVM. But I think you should try to make it work with 64 bit someday, I don't want to go back to JVM 32 just for Sikuli, even if it's a great program ;-)
Tried with Sikuli X, it just doesn't load the IDE.
Thanks

RaiMan (raimund-hocke)
tags: added: windows7
tags: added: sikulix
Revision history for this message
RaiMan (raimund-hocke) wrote :

Could you please run the following test on your system

--- in the following please change the strings "path-to-sikuli" and "path-to-java" to the correct specifications on your machine
for example on my Win7-32 it is in the standard:
path-to-sikuli: c:\Program Files\Sikuli X
path-to-java: c:\Program Files\Java

--- Make sure the following 2 entries are in the system path:
path-to-sikuli\libs
path-to-java\jre6\bin

--- make sure java.exe can be run on command line by just using "java"

--- on a command line run the following (it is 1 line ;-):
echo from sikuli.Sikuli import *; print SCREEN | java -cp "path-to-sikuli\sikuli-script.jar" org.python.util.jython

--- please report the result (copy and paste output).

summary: - Sikuli doesn't work in Windows 7 64 bit
+ X 1.0rc1: Windows 7 64 bit: Sikuli doesn't work
RaiMan (raimund-hocke)
summary: - X 1.0rc1: Windows 7 64 bit: Sikuli doesn't work
+ X 1.0rc1: Windows 7 64 bit: Sikuli doesn't work?
Revision history for this message
A. Decorte (klenje) wrote : Re: X 1.0rc1: Windows 7 64 bit: Sikuli doesn't work?

That's it. This is the portable version but it shouldn't really matter... the installed version didn't work either

C:\Users\Andri\Downloads\Sikuli-IDE>echo from sikuli.Sikuli import *; print SCREEN | java -cp "sikuli-script.jar" org.python.util.jython
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_23
Type "help", "copyright", "credits" or "license" for more information.
>>>

Revision history for this message
A. Decorte (klenje) wrote :

yeah, I reinstalled it and output is exactly the same

Revision history for this message
RaiMan (raimund-hocke) wrote :

OK, this is the jython interactive command prompt.

On my Win7 32 the test command pipes "from sikuli.Sikuli import *; print SCREEN" into the Jython interpreter, runs it and finishes.

so you could use the start Jython alone being in c:\Users\Andri\Downloads\Sikuli-IDE
java -cp "sikuli-script.jar" org.python.util.jython

Anyway - at the jython prompt >>> enter:
from sikuli.Sikuli import *
hit enter and see what happens.

Revision history for this message
A. Decorte (klenje) wrote :
Download full text (4.5 KiB)

>>> from sikuli.Sikuli import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py",
 line 18, in <module>
java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Sikuli X\libs\VisionProxy.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44)
        at org.sikuli.script.Finder.<clinit>(Finder.java:20)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.python.core.SyspathJavaLoader.loadClass(SyspathJavaLoader.java:107)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.python.core.Py.findClassEx(Py.java:817)
        at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:133)
        at org.python.core.packagecache.PackageManager.findClass(PackageManager.java:28)
        at org.python.core.packagecache.SysPackageManager.findClass(SysPackageManager.java:122)
        at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137)

        at org.python.core.PyObject.__findattr__(PyObject.java:869)
        at org.python.core.imp.import_name(imp.java:771)
        at org.python.core.imp.importName(imp.java:806)
        at org.python.core.ImportFunction.__call__(__builtin__.java:1232)
        at org.python.core.PyObject.__call__(PyObject.java:367)
        at org.python.core.__builtin__.__import__(__builtin__.java:1202)
        at org.python.core.imp.importFromAs(imp.java:884)
        at org.python.core.imp.importFrom(imp.java:860)
        at sikuli.Sikuli$py.f$0(C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py:183)
        at sikuli.Sikuli$py.call_function(C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\sikuli\Sikuli.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:165)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.imp.createFromCode(imp.java:326)
        at org.python.core.util.importer.importer_load_module(importer.java:109)

        at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:161)
        at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
        at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
        at org.python.core.imp.loadFromLoader(imp.java:451)
        at org.python.core.imp.find_module(imp.java:408)
        at org.python.core.PyModule.impAttr(PyModule.java:109)
        at org.python.core.imp.import_next(imp.java:637)
        at org.python.core.imp.import_logic(imp.java:699)
        at org.python.core.imp.import_name(imp.java:761)
        at org.python.core.imp.importName(imp.java:806)
        at org.python.core.ImportFunction.__call__(__buil...

Read more...

Revision history for this message
RaiMan (raimund-hocke) wrote :

Thanks! I will remove the question mark in the bug title ;-)

... and hope with you and some others to get a solution for that.

BTW: this has nothing to do with Java 32Bit or 64Bit. a native module (C++) that comes with the Sikuli distribution cannot be loaded on 64Bit system.

summary: - X 1.0rc1: Windows 7 64 bit: Sikuli doesn't work?
+ X 1.0rc1: Windows 7 64 bit: Sikuli does not work - Vision engine 32Bit
+ cannot be loaded
Revision history for this message
A. Decorte (klenje) wrote :

Thanks for your help. I'll be glad to test any improvements on this ;-)

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
Revision history for this message
RaiMan (raimund-hocke) wrote :

I succeeded in building a fully functional 64-Bit version of Sikuli from X-1.0rc2's source.
see faq 1453

Revision history for this message
antoine f (antoine-mbdsys) wrote :

I think I got a possible fix/explanation.
I also set up sikuli on a 32 bit Windows 7 (similar exeption)
The lib win32Util was not found. I immedatly though it could be a issue related to java + windows path issue.
And I replace in register all C:\Program Files by C:\Programme (in frenh ..., where sikuli was set up). I was working well after this brutal and unelegant fix.

so:
1-backup regitry key
2- type regedit in execution popup
3- research c:\Program Files\Sikuli X\libs
4-replace it by the literal path
5- launch sikuli, it should work

Revision history for this message
ashok (ashokgadamsetty) wrote :

Hi Raiman,

I am new to this sikuli, Could you please able to provide me the pack with this fix?
>>I succeeded in building a fully functional 64-Bit version of Sikuli from X-1.0rc2's source.

Thanks,
Ashok

Revision history for this message
Linus Holmeros (linus-holmeros) wrote :

just installed sikuli 1.0 RC3 on a virtual win XP machine and managed to start sikuli. ( its win 7 64 bit running WMware.)

After I closed the program it won't start again.

whats the latest in this tread?

Revision history for this message
RaiMan (raimund-hocke) wrote :

@ Linus
- use Sikuli-IDE.bat
- look faq 1766

You should not add such comments to a bug, that does not really match your situation.

Either start a new question or post a new bug (if you are sure it is one ;-)

In any case, if you want to be notified on answers to your comments: subscribe to the bug/question.

Revision history for this message
Chuck van der Linden (sqapro) wrote :

Ran into similar issue as Antoine F I was able to get the IDE to work, but I want to use Sikuli inside of scripts running under Jruby along with Watir. While the IDE worked, any attempt to create a screen object in the scripts failed trying to load the 32 bit win32util.dll file that comes with Sikuli.

What I discovered is that you can't use the 64 bit version of Jruby, you need to install 32 bit all around, both JRE and also the Jruby stuff.

Once I removed all the 64 bit, and reinstalled using the 32 bit, I was able to get Sikuli to create a screen and click on images from scripts running under Jruby.. using Watir to do most of the web driving, and Sikuli as needed to do things like click on accursed flash controls

Revision history for this message
Arion Sionnodel (katsushirohirata) wrote :

This is the fix that I found.
Add put this line into the target box on the Sikuli icon.

"C:\Program Files (x86)\Sikuli X\Sikuli-IDE-w.bat"

Then find or create Sikuli-IDE-w.bat in the sikuli directory and copy the following into the file.

Sikuli-IDE-w.bat:

@echo off

PATH=%PATH%;%~d0%~p0libs
set JAVA_EXE="javaw"
if defined PROGRAMFILES(X86) set JAVA_EXE="%PROGRAMFILES(X86)%\Java\jre6\bin\javaw.exe"
start /B "Sikuli-IDE" %JAVA_EXE% -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dpython.path="%~d0%~p0sikuli-script.jar/" -jar "%~d0%~p0sikuli-ide.jar" %*

I run Windows 7 x64 and Sikuli works fine for me after applying this fix.

Revision history for this message
RaiMan (raimund-hocke) wrote :

@Arion

For Win7 64Bit: Both needs are mentioned on the Sikuli download page (http://sikuli.org/download.shtml):

--- Note for 64bit Windows: Please download a 32bit Java RE to run Sikuli.
Sikuli-IDE-w.bat assures, that the 32-Bit Java version is used and only works, if it is installed.

--- Do NOT use the Sikuli.exe
Sikuli-X-1.0rc3 (r905)-win32.zip (Portable version for 32bit Windows. For 64bit Windows, please run the Sikuli-IDE-w.bat instead of Sikuli-IDE.exe. )

I admit, that it is not very convenient to read.

RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.