Skip to content
Krzysztof Kowalczyk edited this page Aug 7, 2015 · 2 revisions

How to help us debug Sumatra if it crashes

If Sumatra crashes or hangs reliably on your machine but we can't reproduce it ourselves, you can help us by debugging it. Here's a tutorial on how to do it.

First, vocabulary. %ProgramFiles% means the standard directory where Windows installs programs. It's c:\Program Files on 32-bit Windows and c:\Program Files (x86) on 64-bit Windows.

  1. Download WinDBG ("Debugging Tools for Windows") following instructions on this page.

  2. Download Sumatra symbols. For release versions it's http://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-$ver.pdb.zip (eg. http://s3.amazonaws.com/kjkpub/sumatrapdf/rel/SumatraPDF-3.0.pdb.zip for 3.0 version).

  3. Copy symbols next to Sumatra's .exe. If it's installed version, copy libmupdf.pdb and SumatraPDF-no-MuPDF.pdb in the same directory where SumatraPDF.exe is (most likely %ProgramFiles%\SumatraPDF. If it's portable version, copy SumatraPDF.pdb to the same directory where SumatraPDF.exe is (only you know where that is).

Debugging a crash

Here are the steps to follow if Sumatra crashes

  1. Start SumatraPDF.exe under the control of WinDBG

4.1) start WinDBG.exe

4.2) File/Open (Ctrl-E), find and open SumatraPDF.exe executable

4.3) In WinDBG, type:

4.3.1) .sympath+ SRV*c:\symbols*http://msdl.microsoft.com/download/symbols

4.3.2) g

4.4) When Sumatra crashes, type: !analyze -v and paste the result of that to the bug report

Debugging a hang

Here are the steps to follow if Sumatra hangs

  1. Start SumatraPDF.exe and get it to hang

  2. start WinDBG.exe

  3. use File/Attach to process (F6) and select SumatraPDF.exe from the

  4. In WinDBG, type:

7.1) .sympath+ SRV*c:\symbols*http://msdl.microsoft.com/download/symbols

7.2) ~*kb

7.3) lmf

Attach the output to bug report

Clone this wiki locally