[2.0.4] Linux: remove hotkey then add hotkey fails

Bug #1966695 reported by skeets
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

Note that this same exact test when run in Windows Sikuli 2.0.4 works as expected. In other words, when I remove the hotkey then add the same hotkey back, the add hotkey return value is True (success) and not False like Linux Sikuli 2.0.4 (see below). Also note the [debug] statements. When a clean add or remove is done it doesn't always print out the [debug] statement (for example: "[debug] HotkeyManager: add Hotkey: "). Seems like it only prints out the first time a hotkey is added or removed.

Snippet from Sikuli startup:
SIKULIX_HOME in environment specified as /home/username/SIKULI_MAIN/sikuli2.0.4
running SikuliX: -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar /home/username/SIKULI_MAIN/sikuli2.0.4/sikulix.jar -d 3 -r /home/username/SIKULI_MAIN/Sikuli.Main.sikuli
java -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar /home/username/SIKULI_MAIN/sikuli2.0.4/sikulix.jar -d 3 -r /home/username/SIKULI_MAIN/Sikuli.Main.sikuli
[debug] RunTime:temp folder ok: /tmp/Sikulix_567464275
Options: *** options dump
Options: testing =
Options: OptionsFile = /home/username/.Sikulix/SikulixStore/SikulixOptions.txt
Options: *** options dump end
***** show environment for 2.0.4-2020-03-14_08:01 API
user.home: /home/username
user.dir (work dir): /home/username/sikuli
user.name: username
java.io.tmpdir: /tmp
running 64Bit(amd64) on l (5.4.0-104-generic) from a jar
java 11 version 11 vm 11.0.14+9-Ubuntu-0ubuntu2.20.04 class 55.0 arch 64
app data folder: /home/username/.Sikulix
executing jar: /home/username/SIKULI_MAIN/sikuli2.0.4/sikulix.jar
*** classpath dump sikulix
  0: /home/username/SIKULI_MAIN/sikuli2.0.4/sikulix.jar
  1: /home/username/.Sikulix/Extensions/jython-standalone-2.7.1.jar

Hotkey test output:
[user (3/27/22, 10:20:14 AM)] **DEBUG** In registerExitHotkey:
[debug] HotkeyManager: add Hotkey: CTRL+ALT F5 (116, 10)
[debug] HotkeyManager: add Hotkey: CTRL+ALT+SHIFT F5 (116, 11)
windowsHotKeyRegRtnVal: True
linuxHotKeyRegRtnVal: True

[user (3/27/22, 9:54:29 AM)] **DEBUG** In registerPauseHotkey:
windowsHotKeyRegRtnVal: True
linuxHotKeyRegRtnVal: True

[user (3/27/22, 10:02:27 AM)] **DEBUG** In unregisterPauseHotkey:
[debug] HotkeyManager: remove Hotkey: CTRL+ALT F7 (118, 10)
[debug] HotkeyManager: remove Hotkey: CTRL+ALT+SHIFT F7 (118, 11)
windowsHotKeyUnRegRtnVal: True
linuxHotKeyUnRegRtnVal: True

[user (3/27/22, 10:02:35 AM)] **DEBUG** In registerPauseHotkey:
[error] HotkeyManager: addHotkey: failed to remove already defined hotkey
[error] HotkeyManager: addHotkey: failed to remove already defined hotkey
windowsHotKeyRegRtnVal: False
linuxHotKeyRegRtnVal: False

[user (3/27/22, 10:07:55 AM)] **DEBUG** In unregisterPauseHotkey:
[error] HotkeyManager: removeHotkey: failed
[error] HotkeyManager: removeHotkey: failed
windowsHotKeyUnRegRtnVal: False
linuxHotKeyUnRegRtnVal: False

[user (3/27/22, 10:20:14 AM)] **DEBUG** In unregisterExitHotkey:
windowsHotKeyRegRtnVal: True
linuxHotKeyRegRtnVal: True

Tags: hotkey linux
RaiMan (raimund-hocke)
summary: - remove hotkey then add hotkey fails on Linux version 2.0.4
+ [2.0.4] Linux: remove hotkey then add hotkey fails
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 2.0.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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