Skip to content

Detect crash reports before client logs - #208

Closed
pavog wants to merge 1 commit into
masterfrom
crash-report-before-client-log
Closed

pavog wants to merge 1 commit into
masterfrom
crash-report-before-client-log

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member

A client log that ends in a crash report, like Prism Launcher's log of a game that crashed on start:

[16:36:09] [Render thread/INFO]: [Indigo] Registering Indigo renderer!
---- Minecraft Crash Report ----
// Oops.
Description: Initializing game

Before, the client log classes came first in Detective::$possibleLogClasses, so such a log was detected as a client log.
Codex can only give a log one type, and in this case the crash report should win.
This PR moves all crash report classes to the top of the list, so a crash report is detected before any client or server log.

The generic VanillaCrashReportLog now matches the header only at the start of a line.
Forge 1.7.10 prints a system report with this header on every start ([STDOUT/]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----, described as "Loading screen debug info" and "THIS IS NOT A ERROR"), although the game did not crash.
Without the anchor, forge-1-7-10-client.log would become a crash report.
A real Forge crash logged behind a prefix ([Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]:---- Minecraft Crash Report ----) is still detected by ForgeCrashReportLog, whose pattern is not anchored at the start.
The pattern has no $, because line endings are not normalized before detection.

Server logs are not affected in the test data: no server log there contains a crash report header.
All other crash report detectors except Mohist's already require the header at the start of a line.

Changed expectations:

  • fabric-26-2-client is now fabric/crash-report. It loses the problem that the mod 'caxton' has thrown an exception, because the crash report analysers don't have the Fabric mod problems yet.
  • fabric-mixin-apply-error-invalid-descriptor is now vanilla/crash-report, because the shortened report has no brand line. It loses the fatal mixin error of 'enhanced_storage', the exception of 'rrv' and the version information.

Not covered: the crash report analysers still only know ticking entity and ticking block entity problems, so mod problems in Fabric crash reports are not reported yet.

Changes

  • move crash report log classes before client log classes in Detective
  • match the vanilla crash report header only at the start of a line
  • update expected output of two Fabric client fixtures

@JulianVennen

Copy link
Copy Markdown
Member

Why? It's a client log so it should be a client log

@pavog

pavog commented Nov 16, 2026

Copy link
Copy Markdown
Member Author

We should better detect both: client log + crash report or server log + crash report

@pavog pavog closed this Nov 16, 2026
@pavog
pavog deleted the crash-report-before-client-log branch November 16, 2026 12:55
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