Question

I'm about to implement a save/load functionality in my game, and thought to maybe use Windows' minidump files to achieve this.

I have no experience in that, so any help would be appreciated. Is it even possible? Can a running application be "revived" from a (mini)dump file?

From a few answers already posted, it seems possible to store game state in dump file, so I'll refine the question: How much "glue" will I have to put in to recreate the things I can't store in the dump file?

Was it helpful?

Solution

A minidump saves all virtual memory and the CPU state of your application. So far, it seems possible to restore everything from the dump. But it's not true, because handle information is missing: while the handle value is part of your application's memory, the object behind the handle (a kernel mode object) has been freed or reassigned. This means that the following cannot be restored:

  • Threads
  • Process
  • files and directories
  • Registry keys
  • Windows
  • Events

You would need to reassign those kernel resources - and to do so you would need to implement a (signed) kernel mode driver. Before you consider to implement a kernel mode driver, I would suggest to think about a different way of saving and loading your application state.

OTHER TIPS

As stated here : http://msdn.microsoft.com/en-us/library/windows/desktop/ms680369%28v=vs.85%29.aspx

Minidump files are used for debugging purpose. You can maybe recreate your game context from those files ... but ... Why didn't you write your own file format ?

The best way to accomplish this is to use the Recovery and Restart framework. In a nutshell, when your app crashes, you are given the opportunity to serialize any information that you would need when the application is restarted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top