QL-Win/QuickLook · error · InvalidDataException
The file does not have a minidump signature.
Error message
The file does not have a minidump signature.
What it means
Thrown after the 32-byte header is read: the Signature field (first UInt32) did not equal MinidumpSignature (0x504D444D, ASCII 'MDMP'). Every legitimate Windows minidump begins with 'MDMP', so a mismatch means the file is not a minidump despite being large enough.
Source
Thrown at QuickLook.Plugin/QuickLook.Plugin.DumpViewer/MinidumpReader.cs:113
{
if (fileLength < HeaderSize)
throw new InvalidDataException("The file is too small to be a minidump.");
reader.BaseStream.Position = 0;
var header = new MinidumpHeader
{
Signature = reader.ReadUInt32(),
Version = reader.ReadUInt32(),
NumberOfStreams = reader.ReadUInt32(),
StreamDirectoryRva = reader.ReadUInt32(),
CheckSum = reader.ReadUInt32(),
TimeDateStamp = reader.ReadUInt32(),
Flags = reader.ReadUInt64(),
};
if (header.Signature != MinidumpSignature)
throw new InvalidDataException("The file does not have a minidump signature.");
var directoryBytes = (long)header.NumberOfStreams * DirectoryEntrySize;
if (!CanRead(fileLength, header.StreamDirectoryRva, directoryBytes))
throw new InvalidDataException("The minidump stream directory is outside the file.");
return header;
}
private static IEnumerable<MinidumpDirectory> ReadDirectories(BinaryReader reader, long fileLength, MinidumpHeader header)
{
reader.BaseStream.Position = header.StreamDirectoryRva;
for (var i = 0; i < header.NumberOfStreams; i++)
{
var directory = new MinidumpDirectory
{
Type = (MinidumpStreamType)reader.ReadUInt32(),
DataSize = reader.ReadUInt32(),View on GitHub (pinned to cb5d9c429c)
Solutions
- Use MinidumpReader.IsMinidump(path) — it reads only the first UInt32 and compares to 0x504D444D — before attempting full parse.
- Verify the producer: generate dumps with tools that emit MDMP (Task Manager 'Create dump file', procdump, WER, or DbgHelp MiniDumpWriteDump).
- Catch InvalidDataException in the preview host and treat as 'unsupported format'.
- If a different dump format is intended, route to the correct reader instead of MinidumpReader.
Example fix
// before var header = ReadHeader(reader, stream.Length); // after if (!MinidumpReader.IsMinidump(path)) return; var header = ReadHeader(reader, stream.Length);
Defensive patterns
Strategy: validation
Validate before calling
if (!MinidumpReader.IsMinidump(path)) return; // checks first 4 bytes == 'MDMP'
Type guard
static bool HasMdmpSignature(byte[] head) => head.Length >= 4 && head[0]=='M' && head[1]=='D' && head[2]=='M' && head[3]=='P';
Try / catch
try { var info = MinidumpReader.Read(path); }
catch (InvalidDataException ex) when (ex.Message.Contains("signature")) { /* unsupported format */ } Prevention
- Generate dumps only with MDMP-emitting tools (MiniDumpWriteDump, procdump, Task Manager).
- Sniff the 'MDMP' magic before full parse.
- Don't route arbitrary .dmp-named files to DumpViewer without a signature check.
When it happens
Trigger: ReadHeader reads the first 4 bytes and they are not 0x504D444D. Typical when a full-size non-dump file (e.g. a large .exe, .pdb, or text log misnamed .dmp) is fed to the reader.
Common situations: A user renamed an arbitrary file to .dmp; a debugger wrote a different format (e.g. a 'triage' or a raw memory snapshot without the MDMP header); a full-user-dump from a non-Microsoft tool that uses a custom container.
Related errors
- The file is too small to be a minidump.
- The minidump stream directory is outside the file.
- DOS header not found.
- Thumbs.db not found.
- DS_Store: unknown record type '{stype}'
AI-assisted analysis of QL-Win/QuickLook@cb5d9c429c (2026-08-13).
Data as JSON: /api/errors/3f31e9d3e029e6aa.
Report an issue: GitHub.