FF: skip ioHub event callback without server or PsychoPy window#6949
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release #6949 +/- ##
========================================
Coverage 50.55% 50.56%
========================================
Files 332 332
Lines 61217 61220 +3
========================================
+ Hits 30951 30954 +3
Misses 30266 30266
|
|
Wow, we have heard of issues where iohub seemed not to close down properly, but I wonder if that's the reason! 👀 😮 |
|
If this is the reason my mouse sometimes moves at a snails pace when VS Code Debugger catches an error (and I have to very slowly drag it to the "Continue" button) I'll be very grateful :') I wonder, would it make sense to have this check inside |
|
@TEParsons I can't say I ever fully understood these I just read through the implementations again and found this comment line that corroborates my hypothesis: So yeah... I think it's probably best to just EDITED: if you are wondering whether my added |
|
Have you had a chance to see if this PR fixes the issue? Let me know if there's any additional change you'd like me to make before merging. Thanks! |
|
@mh105 we aren't actually certain this was causing issues for any of us, but the check looks wise and I've merged it anyway |
There is a very niche bug within ioHub at the end of an experiment on Windows. When the ioHub server itself has closed or the PsychoPy window has closed but the rest of close-down steps are still going, if users move the mouse at this moment, it triggers a Traceback error due to trying to access attributes from
Nonetype.p.s. It's still a bug on Linux but the Linux implementation is wrapped by a
trystatement so does not lead to a crush of the processes.This FF allows the
_nativeEventCallbackmethod toreturn Trueand ignore the event callback if no ioHub server or PsychoPy window is currently open. This fix allows both the ioHub server subprocess and PsychoPy main process to close out gracefully.