Sikuli 1.1.0 tries to close my IDE

Bug #1463866 reported by Pierre Best on 2015-06-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
Unassigned

Bug Description

IntelliJ IDEA (Cassiopeia) IU-141.1383.1
JRE: 1.8.0_40-b26 x86
sikuli 1.1.0-20150602

Windows 8.1 Pro (x64)

When my program calls close on an App object, it appears that sikuli is typing Alt-F4. Unfortunately this isn't going to the application, its going to the IDE, which then tries to close. It only fails because IDEA is configured to require confirmation before it will quit.

The reason I believe it's sikuli is the following messages which are printed in the log:

[log] ( Alt ) TYPE "#F4."
[error] App.close [-1:myapp.exe (XXXX Yyyyyyyyy - [Zzzzzzzzzz Zzzzz Zzzzzzzzzz])] C:\subversion\Sikuli\Myapp\test0000.sikuli\myapp.exe did not work

RaiMan (raimund-hocke) wrote :

could you please try with the latest build.

Pierre Best (pierre-best) wrote :

Reproduces with 1.1.0-20150610

RaiMan (raimund-hocke) wrote :

ok, thanks.

How did you create the App instance?

Pierre Best (pierre-best) wrote :

def start_app(path_to_app, window_title):
    p = os.path.normpath(path_to_app)
    if not os.path.exists(p):
        die('cannot find "%s": expected -> %s' % (window_title, p))
    app = App.open(p)
    if not app:
        die('cannot start %s' % window_title)

... then more stuff that waits for the window to appear on the screen ...

   return app

description: updated
Pierre Best (pierre-best) wrote :

Any progress with this?

RaiMan (raimund-hocke) wrote :

Uuuups, no.
Somehow missed that.

You should try this:

def start_app(path_to_app, window_title):
    p = os.path.normpath(path_to_app)
    if not os.path.exists(p):
        die('cannot find "%s": expected -> %s' % (window_title, p))
    app = App( p )
    app.open()
    if not app.isRunning():
        die('cannot start %s' % window_title)

….

Pierre Best (pierre-best) wrote :

Sorry but constructing the App object before calling open() doesn't work. Creating an App object starts the application.

Pierre Best (pierre-best) wrote :

And it still send the Alt-F4

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers