Crash Dumps & Replays in Test builds

I’m thinking of adding some more robust error-catching features to our test builds to streamline the bug-hunting process. Here’s the plan:

If/when the game crashes, it will:

  • Capture as much error information as possible, output to a time&session-stamped error log before dying.
  • Output a saved copy of the game’s save/config data, from the beginning of the play session
  • Output HaxeFlixel replay data, from the beginning of the play session
  • On next game startup, prompt the user to let the game email me that data
    • (option settings will allow game to remember your choice and/or change it later)

In theory, this means I’ll have enough information to know:

  • What part of the code crashed
  • What your starting situation was
  • Exactly what you did that resulted in the bug

It’ll take a while to work out the kinks, but I’d like to get this framework in place in the next few aleph builds. If I can get this going it should be way easier/faster to work out problems, especially those ephemeral “heisenbugs”

Thoughts?

This certainly saves lots of time and gives a more precise bug report, it is really effective.

Let’s just hope THIS doesn’t crash. :stuck_out_tongue:

Yeah, we’ll still need users to supply their own information, but this should hopefully streamline the process and make it easier for both submitter and developer. Also, I should capture hardware information while I’m at it.

Of course, users will have fine-grained control in the options menu about how much they want to share.

UPDATE: progress, check it out:

This is going really well.

I can catch uncaught exceptions at the global level by attaching a single listener without having to wrap my main loop in a try/catch block. I can also record the state of the player’s save data and configuration files at startup, and dump those along with the error on a crash.

We won’t have a new build by the end of the day, but we might have one next week that makes use of this feature.

Hey, that tells EXACTLY what it failed to do!

But putting OS as only “Windows” is kinda uninformative. :stuck_out_tongue:

Yeah, I’d really like it to say “windows XP” or “Windows Vista” and preferably make note of any service packs, etc, as well as video card and driver information if I can get it. I’m going to need some way to get that information from the system somehow, worth looking into.

Well, there could be an option that says “Send System Information on Crash” and that could be (un)checked, if checked, an OS message will appear if the user allows the program to get system information (on Windows at least), It will get the information when the game crashes and is sent too.

Of course it isn’t top priority, since the user can post the information himself (I mean, who wouldn’t report a bug on a crash anyway? :P)

PS: Did you make a crash on purpose to test it out? XD

Alrighty, I’m able to get the system info, on windows at least. I’ve gone ahead and open-sourced the CrashDumper code:

Behold!

And yeah, I’m intentionally generating crashes.

Once I have got this crash dump framework up and running, I’ll figure out what version # we’ll start counting from for our new builds here, and then get a fresh build out for Windows. I should figure out how to do polls on Discourse so I can figure out what OS’s and devices people have access to.

If I’m correct, Windows 7 SP1 = Windows 7 Professional, right? Because Windows 7’s names do not have Service Pack numbers (at least I never saw one with any). But the service pack isn’t really needed, since the difference from Pro to Ultimate are just some extra features.
In any way, that sounds clean and perfectly user-friendly.

As for the versions, we could start with 0.0.1 or 0.0.1-Alpha.

Windows 7 did indeed get a SP1 back in 2011, which is entirely orthogonal to the “feature level”.

2011? What the heck is wrong in this world (other than everything)?

I’m using the “ver” command in windows, which returns a number. To get the windows operating system name, I just check the number vs. the name in the linked wikipedia table.

Oh ok, that means SP1 is the latest version and thus you are right (this is, the code is right).