-
Notifications
You must be signed in to change notification settings - Fork 35
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
Handle missing Backtrace/Crashpad DLLs gracefully #236
Conversation
attachments.ToArray(), | ||
attachments.Count() ); | ||
} | ||
catch ( DllNotFoundException ) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this 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.
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.