-
Notifications
You must be signed in to change notification settings - Fork 962
BF: Unregister event monitors iohub calibration #6466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BF: Unregister event monitors iohub calibration #6466
Conversation
|
Hmm, this is tricky. We (with @mdcutone ) had found that with the unregister call in place that was blocking access to the keyboard, which is why it was removed. But now you found that removing it is blocking access? 🤔 |
|
Hi Jon, from the implementation of Could you see if you can reproduce the following bug (which prompted this BF PR) that I'm seeing on my end with PsychoPy standalone version 2024.1.4:
What you should see is that after the calibration procedure completes and when the experiment has progressed to the text display routine, pressing and releasing When I resurrect as I included in the commit and see if they help. |
|
Yes, thanks @mh105 we are actively investigating. What you say sounds correct - we just want to check that this doesn't introduce a new problem 😁 |
|
I was working on getting ioHub eyetracker working, which forced me to understand how the ioHub devices are managed. This also led me to look at the I want to drop a note here in case this is related to the PR here. I also want to ask if this IS the intended design of this part of PsychoPy? It seems a bit dangerous if users create |
I don't think it's so much that iohub is the odd one here. The issue is that psychtoolbox exposed the option to start/stop reading from the keyboard, which we had never thought of as a necessary feature and in some backends wouldn't really be possible at all. So pyglet and pygame also don't have a notion of stopping the keyboard events either. Builder scripts do start/stop listening to keyboards but under the hood, even when teh builder Keyboard Comp has stopped listening the events are still coming in |
|
Regarding the original issue, we are still completely puzzled. We can't generate the failure in either direction. On our machines the line can be present or absent and have no effect 🤷 so it seems like some combination of factors that give rise to this having an impact. We'll keep our eyes open to new users complaining that things freeze if they have calibration/validation routines and take it from there |
|
Thanks a lot @peircej for looking into this! Interestingly not calling I have a good hunch that this strange behavior comes from how the last existing Keyboard device in sequence is In contrast, with SR research eyetracker, a new keyboard device gets added to P.S.: As much as I admire the use of servers and threads in |
This PR is going to undo commit 9808929, which I believe is an incorrect commit.
If we don't remove the registered EventMonitors instantiated by the
calibrationinstance, they are going to keep hijacking key releases tospaceandescapebecause of this event handler:psychopy/psychopy/iohub/devices/eyetracker/calibration/procedure.py
Line 122 in 7969ebb
It might have appeared like
calibration._unregisterEventMonitors()was not required anymore, but that's likely because the keyboard events was set topressinstead ofrelease.One can test out in 2024.1.4: after the eyetracker calibration component, key releases to
spaceandescapeno longer work as intended.@peircej I noticed that this same line has been commented out in the separate eye tracking plugin packages such as in
psychopy-eyetracker-sr-research:It would be great if those pip packages could be updated for this issue as well.