- Home /
Windows: Unhandled exception crash handling
How can I handle unexpected termination of the application? Currently our application crashes silently, which isn't acceptable. Ideally I'd like to create a custom crash reporter.
In UE4 they register an unhandled exception filter with SetUnhandledExceptionFilter, and since UE4 source code is open you can modify this to do what you want (show a crash reporter window, write minidumps with heap info, etc..). Is this possible to do in Unity?
Answer by matias_unity437 · Oct 04, 2018 at 07:49 AM
I ended up solving this by making a DLL and calling SetUnhandledExceptionFilter from there. When the Unity-application starts, I call a function in the DLL that sets the unhandled exception filter. When I get an unhandled exception I can now handle that in the DLL and log some info, create a minidump and launch our crash reporter executable.
Your answer
Follow this Question
Related Questions
build crashes 1 Answer
Why won't Unity Editor open? 8 Answers
Appodeal Anr onAdFailedToLoad 0 Answers
Unity crashing after a few minutes 3 Answers
Unity 2018 crashes everytime I open project (Please Read the question!) 2 Answers