Skip to content

Fix client crashes from queued chat after disconnect - #54

Merged
00SunRay00 merged 1 commit into
00SunRay00:mainfrom
cappyeo:fix/queued-chat-disconnect-crash
Oct 18, 2026
Merged

00SunRay00 merged 1 commit into
00SunRay00:mainfrom
cappyeo:fix/queued-chat-disconnect-crash

Conversation

@cappyeo

@cappyeo cappyeo commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

An Android 160.7 crash report points to MessageQueue sending an oversized command. If the timer runs after disconnect, Call.sendChatMessage routes it to the local handler, which throws ValidateException and closes the game. This can disrupt joining or reconnecting to servers.

Validate the text limit before queuing and sending, discard commands when their connection or world changes, and contain validation failures. Commands are never truncated or split; local/host delivery and the existing rate limit are preserved.

Verified:

  • Reproduced the original timer crash with official Mindustry 160.7 classes; the patched callback clears the stale queue without throwing.
  • Nine regression tests pass against 159.7 and 160.7, including native local/host command delivery.
  • Android/desktop JAR builds successfully.

@00SunRay00 00SunRay00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@00SunRay00
00SunRay00 merged commit 174146c into 00SunRay00:main Oct 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants