fix: exit number rain loop when scene completes#89
Merged
Conversation
- Add !numberSceneDoneRequested check to while condition in stepNumberRain() - Add !numberSceneDoneRequested check to guard in stepNumberRain() - Prevents infinite loop when scene signals completion via flag - Allows phase-advance barrier to resolve and transition to rain scene
This was referenced Jun 9, 2026
Closed
Closed
Merged
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.
Problem
The
stepNumberRain()function had an infinite loop that froze all screens during the number-to-rain scene transition in multi-display engine mode.Root cause: When
numberSceneDoneRequestedwas set to true byblackoutColumns(), the while conditionactiveScene == .numberIntroremained true forever because:activeScenenever changed (stays.numberIntroin engine mode; only changes on next frame)blackoutColumns()returned immediately on subsequent iterations due to guard checkadvance()call, freezing the entire threadSolution
Added
!numberSceneDoneRequestedcheck to both:stepNumberRain()stepNumberRain()This ensures the loop exits immediately when the scene signals completion, allowing the phase-advance barrier to resolve and transition to the rain scene.
Testing
Changes
NativeMatrixRenderer.swift: Added done-flag checks tostepNumberRain()