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

Handle missing Backtrace/Crashpad DLLs gracefully #236

Merged

Conversation

hymerman
Copy link
Contributor

Log a warning instead of allowing an unhandled exception to escape, if the Backtrace/Crashpad DLLs can't be found, or loaded.

This can happen if e.g. the system doesn't have the version of the VC runtime installed which is required to use these DLLs.

attachments.ToArray(),
attachments.Count() );
}
catch ( DllNotFoundException )
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this case it would be better if we fail fast and hard. This situation most likely won't happen in production, because you can easily spot it during the development/release preparation cycle. In the end if we hide a huge issue, we can have a lot of situation where people could lose crashes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I should have added - this issue happened a lot in production, since 'in the wild', customers often had outdated versions of the VC runtimes installed. These are customers installing our games through Steam, which does install VC runtimes for them automatically, but the exact versions are often quite outdated. I spoke with our technical contacts at Valve and they mentioned that they don't make much of an effort to keep these up to date, and they didn't update the runtime versions after we requested them. The same issue happened with NVidia Ansel DLLs that we shipped with the game.

We can ship the game with extra install steps and bundle the correct VC runtime versions, but this is considered 'advanced' setup for Steam apps, and I imagine the vast majority of developers don't do this. Considering how hard it was to track this issue down, I think in this case it may be best to be permissive (I'm usually a huge fan of failing fast and hard!).

Perhaps it could instead be logged as an error (which then gets sent to Backtrace)? So it can be explicitly flagged to tell developers that they need to do some more installation setup? Also the Backtrace developer documentation would need to mention that a particular VC runtime version would need to be distributed and installed with the application.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ahh ok - this is super interesting insight - thank you for sharing it! I will double check it with the team to make sure we're all on the same page and share more info with you on this pull request. thank you!

Copy link
Collaborator

@perf2711 perf2711 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@konraddysput konraddysput merged commit db6e086 into backtrace-labs:master Jan 24, 2025
0 of 10 checks passed
@konraddysput konraddysput mentioned this pull request Jan 24, 2025
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.

3 participants