Scenario: guard TimeSync execution component against use after cleanup#2113
Open
bltzr wants to merge 1 commit into
Open
Scenario: guard TimeSync execution component against use after cleanup#2113bltzr wants to merge 1 commit into
bltzr wants to merge 1 commit into
Conversation
cleanup() resets m_ossia_node while the component's destruction is deferred through the execution queue. Model edits arriving in that window (autotrigger toggles, trigger/expression changes, quantization changes, GUI trigger) would then dereference a null node in the exec lambda, or trip SCORE_ASSERT in updateTrigger(). Bail out early when m_ossia_node is null.
Member
Author
|
I am a little unsure about this one. Claude made it following a crash I had but I'm not sure... |
jcelerier
reviewed
Jul 14, 2026
| start = m_score_node->isStartPoint(); | ||
| } | ||
|
|
||
| SCORE_ASSERT(m_ossia_node); |
Member
There was a problem hiding this comment.
Why was this assert removed ? It's a safeguard: if it triggers it means that something else before it is wrong and has to be fixed
Member
There was a problem hiding this comment.
I guess we can lower the "expectations" but it leads to worsening of the understandability of the codebase since it creates more potential code paths
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TimeSyncComponent::cleanup()resetsm_ossia_nodewhile the component's destruction is deferred through the execution queue. If the model is edited in that window — toggling autotrigger, changing the trigger expression, changing quantization, or a GUI trigger — the UI-thread handlers still fire and either dereference a null node inside thein_execlambda or tripSCORE_ASSERT(m_ossia_node)inupdateTrigger().Guard each of those entry points with an early return when
m_ossia_nodeis null.🤖 Generated with Claude Code
https://claude.ai/code/session_019ya5qsdZbjVtA697QUhJFz