Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Put Console Traces in Crash Logs (with Blacklisted Classes) #3897

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

KoloInDaCrib
Copy link
Contributor

@KoloInDaCrib KoloInDaCrib commented Nov 26, 2024

Description

This Pull Request adds everything printed on the console via trace to crash logs in order to better determine the culprit of the crash. It also contains a feature flag BLACKLIST_TRACE_CLASSES which, when enabled, blacklists some classes defined in AnsiTrace from having their traces appear in the logs (such as the preloader class or the discord client class)

Include any relevant screenshots or videos.

2024-11-26.21-36-21.mp4

@github-actions github-actions bot added haxe Issue/PR modifies game code medium A medium pull request with 100 or fewer changes labels Nov 26, 2024
@sphis-Sinco
Copy link

I feel like that would make it a bit more difficult to debug issues if you put EVERY one of the traces in there. But maybe like a select few?

@github-actions github-actions bot added large A large pull request with more than 100 changes and removed large A large pull request with more than 100 changes medium A medium pull request with 100 or fewer changes labels Nov 29, 2024
@MidyGamy
Copy link

MidyGamy commented Dec 2, 2024

I would suggest making more like a separate log folder, kinda like Minecraft, so you don't need to crash the game to see logs

@KoloInDaCrib
Copy link
Contributor Author

I would suggest making more like a separate log folder, kinda like Minecraft, so you don't need to crash the game to see logs

I don't really see the need to do that, it would fill up the storage quickly - the traces in logs are just for better determining what caused the crash since most of the code does a trace.
Besides you could see the trace logs by launching the game from VSCode

@AbnormalPoof
Copy link
Contributor

I feel like putting every single trace in the log file will make it a lot harder to read through crash reports in Issues.
Maybe something like the last 10-20? That way there's still some traces, but it's closer to the crash.

@KoloInDaCrib
Copy link
Contributor Author

I feel like putting every single trace in the log file will make it a lot harder to read through crash reports in Issues. Maybe something like the last 10-20? That way there's still some traces, but it's closer to the crash.

I should probably have updated the title of this PR when I added a featureflag to blacklist some classes from having their traces appear in the logs (such as DiscordClient (trace every update) or FunkinPreloader (trace for everything loaded))
Though your idea does probably seem better, might add it along the blacklisted classes (without blacklisted classes your idea has a chance of having DiscordClient fill up all the log trace slots available since it runs on a different thread)

@KoloInDaCrib KoloInDaCrib changed the title [ENHANCEMENT] Put every Console Trace in the Crash Logs [ENHANCEMENT] Put Console Traces in Crash Logs (with Blacklisted Classes) Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
haxe Issue/PR modifies game code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants