Fix crash on game end from unfillable layout gap#10897
Open
MostCromulent wants to merge 1 commit into
Open
Conversation
SRearrangingUtil.fillGap() threw UnsupportedOperationException when a removed cell's gap could not be filled by a neighboring cell. At game end, FloatingZone.closeAll() tears down docked zone cells one at a time (e.g. several command-zone cells when AI commanders' zones are docked), and the intermediate layout can leave a gap the grow-a-neighbor algorithm can't cover. The throw propagated out of CMatchUI.finishGame() before the win/lose screen was shown, leaving the match UI stuck. Gap-filling is cosmetic and the caller removes the cell regardless, so fall through rather than throw. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Discord user reported
UnsupportedOperationException: Gap was not filled.thrown fromSRearrangingUtil.fillGap()viaFloatingZone.closeAll()->CMatchUI.finishGame()at the end of a game (triggered by docking AI commanders'' command zones). BecausecloseAll()is the first thingfinishGame()does, the throw aborted it before the win/lose screen was shown, leaving the match UI stuck.fillGap()tears down docked zone cells one at a time, and the intermediate layout can leave a gap the grow-a-neighbor algorithm can''t cover. Gap-filling is purely cosmetic and the caller removes the cell regardless, so this drops the fatalthrowand letsfillGap()fall through instead.🤖 Generated with Claude Code