Writeminidump ((better)) — Steamapi
Understanding SteamAPI_WriteMiniDump: The Lifeline for Game Stability
If you've ever dealt with a mysterious game crash, you’ve likely encountered a "minidump" file. For developers using Steamworks, one of the most critical tools for diagnosing these issues is the SteamAPI_WriteMiniDump function.
This post breaks down what this function does, how it fits into the Steam ecosystem, and how developers use it to keep their games running smoothly. What is SteamAPI_WriteMiniDump?
SteamAPI_WriteMiniDump is a core utility within the Steamworks API designed to capture the exact state of a game at the moment it crashes. Instead of a vague "Application has stopped working" message, this function generates a small, structured file—a minidump—containing: The Call Stack: Exactly which line of code was executing. Processor Registers: The low-level data held by the CPU. SteamAPI WriteMiniDump
Exception Information: The specific error code that triggered the failure. How It Works in Development
Implementing this function isn't automatic; developers typically hook it into Windows' Structured Exception Handling (SEH). By using a function like _set_se_translator, a developer can tell the game: "If you're about to crash, call SteamAPI_WriteMiniDump first". The Function Signature
The function requires three key pieces of information to be useful: Nothing directly – but it confirms the game crashed
uStructuredExceptionCode: The numerical code for the crash type. pvExceptionInfo: A pointer to the detailed exception data.
uBuildID: A specific ID to track which version of your game crashed, helping you ignore bugs already fixed in newer patches. Pro-Tip: Adding Context with Comments
A crash dump is great, but knowing where the player was is better. Before calling the dump function, developers often use SteamAPI_SetMiniDumpComment to attach metadata like "Level: Lava Zone" or "Players: 4". This gives the raw technical data much-needed context. Why It Matters for Players If you are a developer :
For players, this function is the "invisible reporter." When a game crashes and sends a report, Valve’s backend aggregates these files. Developers can then visit their Steamworks Partner dashboard to see which crashes are affecting the most people.
Important Note for Developers: Currently, SteamAPI_WriteMiniDump only supports 32-bit Windows environments. steam_api.h (Steamworks Documentation)
What you can do with it
If you are a player:
- Nothing directly – but it confirms the game crashed.
- Look for
.dmpfiles in the game's folder orsteamapps/common/...– developers may ask for these.
If you are a developer:
- Use it to generate crash dumps manually:
SteamAPI_WriteMiniDump(exceptionPointers, crashID); - Send dumps to your own crash reporting server.
If you are reverse engineering:
- It's a good hook point to intercept or suppress crash reporting.
- Can be used to force a dump from a running process.
Function Signature
bool WriteMiniDump( uint32_t dwProcessId, void* pExceptionInfo );