You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'NoneType' object has no attribute 'mode' in execute_node, reached from a
tempo container's worker thread.
Cause
if event.mode and ... runs without verifying event is not None.
Fix
if event is not None and event.mode and .... Defensive: an execution node
should not crash on a null event. (The root cause of the null event is
fixed separately in the tempo container; this guard is belt-and-braces.)
This is interesting as an execution node can only execute if an event is passed to it.
I'm not able to repro a situation where an event is not passed, so please share your use-case as to how you got that to happen as the fix is likely somewhere else.
I will however add a handler for this situation so GEX logs the stack for diagnostics.
Thanks for looking into it. You're right that the null event comes from
elsewhere — it's the tempo container's short-press worker thread.
The scenario: a tempo container sits on a button that also switches modes.
The tempo records event_press only on the press branch. After a mode
switch, a new tempo functor instance in the target mode receives the release whose press was handled by the previous mode's instance, so event_press is still None. The short-press thread then forwards that None
event, which reaches execute_node (event.mode) and play_sound
(event.is_pressed).
I've submitted the actual root-cause fix separately in #475 (guard the
short-press firing on event_press is not None), which you've already
merged — so with #475 in place this None event should no longer occur.
This PR is therefore just belt-and-braces / defensive, matching your plan
to log the stack for diagnostics. Happy to close it if you'd prefer the
diagnostic handler you mentioned instead of the guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
'NoneType' object has no attribute 'mode' in execute_node, reached from a
tempo container's worker thread.
Cause
if event.mode and ...runs without verifyingevent is not None.Fix
if event is not None and event.mode and .... Defensive: an execution nodeshould not crash on a null event. (The root cause of the null event is
fixed separately in the tempo container; this guard is belt-and-braces.)