[1.1.4] Linux: PID is -1 after app.open()

Bug #1813491 reported by spikedboy on 2019-01-27
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sikuli
Medium
RaiMan

Bug Description

When building an App object with the path to the executable, after calling app.open(), the PID is always -1. This causes app.isRunning() to run a ps shell comand with parameter "-1" which will not find the process, even if it ran.

spikedboy (spikedboy) on 2019-01-27
summary: - PID is -1 after app.open() in linux based systems
+ [1.1.4] Linux: PID is -1 after app.open()
RaiMan (raimund-hocke) wrote :

Thanks for finding and documenting.

Since I am only available at about 20% the next 3 weeks, the fix may take a while.

Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
radical164 (radical164) wrote :

Same issue with snapshot build #249.
On Linux, what kind of argument for App class is expected?

LinuxUtil.findWindow (https://github.com/RaiMan/SikuliX1/blob/master/API/src/main/java/org/sikuli/natives/LinuxUtil.java) tries to find the app with 6th field, but it is not a path to the application.

    $ wmctrl -lpGx | grep Chromium
    0x04e00001 0 584 80 32 1280 691 chromium-browser.Chromium-browser my-hostname Bug #1813491 “[1.1.4] Linux: PID is -1 after app.open()” : Bugs : Sikuli - Chromium

So it seems to need to pass "chromium-browser.Chromium-browser" instead of "/usr/bin/chromium-browser". (But it still won't work)

RaiMan (raimund-hocke) on 2019-03-23
Changed in sikuli:
status: Fix Committed → In Progress
importance: High → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions