Skip to content

Conversation

@JohnsterID
Copy link

No description provided.

@JohnsterID JohnsterID force-pushed the improve-crash-message branch from ef722a3 to 24d2f11 Compare January 8, 2026 11:01
@JohnsterID JohnsterID marked this pull request as ready for review January 8, 2026 21:05
#ifdef RTS_ENABLE_CRASHDUMP
"\nMinidump files saved to:\n%s\n"
#endif
"\nPlease report the issue:\nhttps://github.com/TheSuperHackers/GeneralsGameCode/issues",
Copy link

Choose a reason for hiding this comment

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

I do not think this prompt is wise. We might get bombarded with messages. Maybe there should be a separate repository where players can spam reports. For GeneralsGameCode we would like to keep more quality reports by developers for developers.

Copy link
Author

Choose a reason for hiding this comment

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

Even if the report quality is poor, gaining the minidumps can still help: #2049 (comment)
Also, gaining the crash location in the dialog, should allow faster duplicate closing.
Though in the end, if the thought is to reduce potential high noise then I'll defer to you.

);
} else {
snprintf(buff, sizeof(buff),
"The game encountered a critical error and needs to close.\n\n"
Copy link

Choose a reason for hiding this comment

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

There are now 4 error messages here in code. Why is this so complicated? Can the code be simplified and reduced to one error message to rule them all?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, refractored and pushed.

}

// TheSuperHackers @bugfix JohnsterID 06/01/2025 Append crash file locations to localized error message
char crashInfoPath[_MAX_PATH];
Copy link

Choose a reason for hiding this comment

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

Maybe the Debug and Release crash message boxes can reuse the same code, or do they need to be separate?

Copy link
Author

Choose a reason for hiding this comment

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

Refractored for review.

strlcat(crashDumpDir, "CrashDumps\\", ARRAY_SIZE(crashDumpDir));
#endif

// Extract first line of stack trace (crash location) if available
Copy link

Choose a reason for hiding this comment

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

Perhaps the stack trace stuff can be moved into separate function to clean this up.

For example

callstack[512]
writeCallstack(callstack, ARRAY_SIZE(callstack));

Copy link
Author

Choose a reason for hiding this comment

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

Refractored for review.

@JohnsterID JohnsterID force-pushed the improve-crash-message branch from 24d2f11 to 85a17f6 Compare January 10, 2026 21:13
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