Skip to content

Crash dumps in temp are bad on Windows.

!2668 (merged) for master, and !3089 (merged) for 0.48, changed where we write crash dumps from the log directory to the temp directory. There was a good reason for this - thanks to the portable install support and related stuff, we don't know where the logs will go until we've done some work, and that work can crash, so we need to have the crash catcher set up before it runs.

The temp directory has some problems, though, especially on Windows:

  • Users can move it, so it's hard to tell them where to look in the likely event they didn't memorise the path in the popup before dismissing it.
  • It's a subdirectory of AppData on Windows, which is hidden, and that adds a (sometimes surprisingly high) amount of friction when guiding users to their dumps.
  • It's technically not guaranteed to be writable, so doesn't bring so much to the table that it's worth dealing with the other problems.

After some discussion, specifically for Windows, FOLDERID_Profile (found with SHGetKnownFolderPath) is probably a significantly better option - it's not hidden or buried, and is almost certainly writable.

It's too late in 0.48's development cycle for invasive changes, but it would also likely be a good idea for the following improvements on master:

  • Change from passing the crash dump path to the crash catcher on launch as a command line argument to putting it in the shared memory the main application uses to talk to the crash catcher.
  • Make the equivalent change for the Unix crash catcher.
  • Updating that path once we know where logs will go.
  • Writing freeze dumps to openmw-freeze.dmp instead of overloading openmw-crash.dmp.

After making any changes, it's important that we check the integration test CI job works when tests crash.

Edited by AnyOldName3