[1.1.4] IDE: HotKey Events called even after terminating script caused by an exception --- fixed 2019-01-06 build#178
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Released
|
Critical
|
RaiMan |
Bug Description
HotKey events are called efen if the script raises an error or exits. example:
def F10(event):
print "F10"
def F11(event):
print "F11"
def F12(event):
print "F12"
def PGUP(event):
print "PGUP"
Env.addHotkey(
Env.addHotkey(
Env.addHotkey(
Env.addHotkey(
a=1/0
exit()
Results:
[error] script [ test ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\temp\
F10
F11
F12
PGUP
You can see, the functions are called even after the division by zero.
Fun Fact: In case i now change the function, for instance:
change UP to DOWN: Env.addHotkey(
actually I did not add it! Only alter the 4 characters.
Both keys are now reacting, having only one of them in the code.
Restart the IDE make the keys go away. (and of course unassignment - however that's not possible in case of errors)
Changed in sikuli: | |
importance: | High → Critical |
Changed in sikuli: | |
status: | Fix Committed → Fix Released |
milestone: | 1.1.4 → 2.0.0 |
Apparently the cleanup, that is done at normal script termination, is not done in this case.
I will fix asap.