Repository navigation
Fix truncated Lua error reports that cut out the error - #3077
Open
moss-orbit-9f339e wants to merge 3 commits into
Open
moss-orbit-9f339e wants to merge 3 commits into
moss-orbit-9f339e wants to merge 3 commits into
Conversation
Crash reports cut the infolog to 62000 characters. The truncation kept the start and end of the log and the first desync of each game, so the LUA_ERRRUN line of a Lua error report was usually cut out. Add the first LUA_ERRRUN (the same string that marks a report as LuaError) as a point of interest, so its lines and the text around it are kept. Fixes ZeroK-RTS#2511 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sprunk
reviewed
Nov 19, 2026
Follow sprunk's review: search for the first LUA_ERR instead of the first LUA_ERRRUN, so a LUA_ERRMEM error (which often comes before a desync when synced Lua hits the memory limit) is also kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sprunk
approved these changes
Nov 19, 2026
Licho1
reviewed
Nov 19, 2026
Licho1
approved these changes
Nov 23, 2026
Licho1
enabled auto-merge (squash)
November 23, 2026 11:16
Licho1
disabled auto-merge
November 23, 2026 11:16
Licho1
enabled auto-merge (squash)
November 23, 2026 11:16
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.
Lua error reports on ZeroK-RTS/CrashReports usually do not show the Lua error. The launcher cuts the infolog to 62000 characters and keeps only the start, the end and the first desync of each game, so the Lua error line (
LUA_ERRRUN,LUA_ERRMEM, ...) in the middle is removed. Of the 40 newest LuaError reports (2026-11-14 to 2026-11-19), 39 do not contain it.The fix adds the first
LUA_ERRline (any Lua error type, as sprunk suggested) as one more place to keep, with the text around it. The start and the end of the log then get less of the 62000 characters.I copied the truncation code unchanged from master and from this branch into a small program and ran it under Mono with 14 synthetic infologs. In the 8 long logs that have a Lua error in the middle, master drops the error and the branch keeps it with its stack traceback and about 10000 to 15000 characters on each side. Logs without a Lua error give the same output as master, desync lines are still kept, and all outputs are below 62000 characters.
Fixes #2511
Written entirely by Claude Code.
🤖 Generated with Claude Code