How Do I Debug Hard Crashes?

I’ve been fortunate not to have to deal with this since I started using Unity a couple years ago, but my number’s finally come up. I did some heavy refactoring and now my game is occasionally crashing. Hard crashing to desktop with no errors or exceptions in the log. I don’t know how to start tracking this issue down.

I notice Unity creates a timestamped folder with the following files:

  • output_log.txt

  • error.log

  • report.ini

  • crash.dmp

ouput_log.txt is just a copy of the player log. It doesn’t contain anything that indicates the cause of the crash. Just normal log stuff then the stack trace which isn’t terribly illuminating:
(0x80DDC32C) ((module-name not available)): (filename not available): (function-name not available) + 0x0
(0x008FB0BC) c:\buildagent\work\3d1e9e6e6eefaa7f\sdks\core\common\src\scene.cpp (4274 + 0x8): Scene::doExecWheels + 0x2c

error.log contains the error that occurred and more stack information. I’m not sure what to do with it. It lists Unknown caused an Access Violation (0xc0000005) as the cause of the crash. Others have gotten crashes with the same message caused by corrupted fonts, but that doesn’t seem to be the case here. It’s happening on multiple PCs that don’t have and weird fonts installed.

report.ini seems to be a utility file for submitting a report or something. Nothing useful in it.

crash.dmp seems like it would be the most useful one, judging by the name. But again, I have no idea how to extract useful information from it. It’s a binary file that I’m guessing needs to be used with the .mdbs included with Unity maybe?

I’ve attached one such crash, just in case it’s useful. The only thing they all seem to have in common is the Unknown caused an Access Violation (0xc0000005). Almost all had doExecWheels in the stack trace, but the most recent crash had something different.

So I’m looking to learn something new today. How can I do something useful with information? More specifically, how can I track down the root cause of the crash?

1869472–120084–2014-11-21_165704.zip (44.7 KB)

You’ve already found the cause. An Access Violation. It’s trying to write to/read from a file in which it does not have read/write privileges. Now, this can be thrown for many reasons, and many of them will be unbeknownst to you, the end user. I’ve had this nasty bug in the past, but unfortunately it’s going to be very specific to you.

Are you using x64 bit architecture? If so, Unity can be unstable around x64…

That’s not the root cause. Something caused the access violation. Why? How? How do I start to answer those questions? This post is about finding the root cause and understanding the value of these files.

This happens on all of the developers machines (at least 6 so far), so it’s probably specific to the project, it’s not specific to me.

I’m on a 64-bit Windows 8.1 installation but the crash is happening in a 32-bit build of the game.

I’m still looking for information on how to deal with hard crashes like this if anyone has any tips.