How to get a stacktrace for a bug report

  • Revision slug: How_to_get_a_stacktrace_for_a_bug_report
  • Revision title: How to get a stacktrace for a bug report
  • Revision id: 100538
  • Created:
  • Creator: Mats Palmgren
  • Is current revision? No
  • Comment 5 words added

Revision Content

If you file a bug report in Bugzilla about a crash of Firefox 3+ or SeaMonkey 2+ you should include a stacktrace (call stack) in your report. A stacktrace will tell Mozilla developers what crashed and provide a starting point for investigating its cause. This article describes how to use the Mozilla Crash Reporter to get a crash ID and alternative ways to create a stacktrace.

Requirements

You need a binary build from Mozilla.org. The crash reporter does not work if you use a build from a Linux distribution or if you compiled Firefox from the source code. The reason for this is that the crash reporter only collects one half of the needed information, the other part (the debug symbols) is stored on the crash report server. The server puts the submitted crash report and the symbols together to generate a stack trace. The crash report server only has the debug symbols for Mozilla builds at this time and thus can only process stacks from Mozilla builds.

Note: Before generating a stacktrace, you should try Firefox safe mode and attempt to troubleshoot your extensions and plugins to see if Firefox or an add-on is the cause.
Note: Older versions of the Adobe Flash plugin interfere with the crash reporter on Windows. Please use Flash 10 or newer.

How to get a crash ID with the Mozilla Crash Reporter

The Mozilla crash reporter window should automatically come up after Mozilla crashes.
Be sure that you checked the "Tell Mozilla about the crash" checkbox and click the restart button.

reporter.jpg

The crash reporter should now submit the crash report and Firefox should open again. To access your submitted reports, type "about:crashes" in the Firefox URL bar and press enter. Firefox should open a list of all your submitted crash report IDs. Copy the IDs of the appropriate crashes to your Bugzilla bug report. Please check the listed times to avoid copying the ID of an unrelated crash report.

crashlist.jpg

How to get the crash ID if Firefox crashes on startup

If Firefox crashes on startup you can still access your submitted crash reports. Crash reports are accessible from all Firefox profiles, so if a new profile does not crash you can use it to access them through "about:crashes" as above.

Accessing crash report IDs outside of Firefox

If you cannot load Firefox at all you can find the crash report files at this location depending on your operating system:

Windows : %APPDATA%\Mozilla\Firefox\Crash Reports\submitted\
Mac OS : ~/Library/Application Support/Firefox/Crash Reports/submitted/
Linux : ~/.mozilla/firefox/Crash Reports/submitted/

Each file in this folder contains one submitted crash report ID. You can check the modified or creation time for each file to discern which crash reports are relevant to your bug report.

Alternative ways to get a stacktrace

If the Mozilla crash reporter doesn't come up or isn't available you will need to obtain a stacktrace manually:

Windows

See the article Create a stacktrace with Windbg for information on how to do this.

You can also use WinDbg if you get a hang or freeze instead of a crash. In that case use the command:

 !analyze -v -hang

Linux

Revision Source

<p>If you file a bug report in Bugzilla about a crash of Firefox 3+ or SeaMonkey 2+ you should include a stacktrace (call stack) in your report. A stacktrace will tell Mozilla developers what crashed and provide a starting point for investigating its cause. This article describes how to use the Mozilla Crash Reporter to get a crash ID and alternative ways to create a stacktrace.</p>
<h2>Requirements</h2>
<p>You need a binary build from <a class="external" href="http://www.mozilla.com/en-US/firefox/">Mozilla.org</a>. The crash reporter does not work if you use a build from a Linux distribution or if you compiled Firefox from the source code. The reason for this is that the crash reporter only collects one half of the needed information, the other part (the debug symbols) is stored on the crash report server. The server puts the submitted crash report and the symbols together to generate a stack trace. The crash report server only has the debug symbols for Mozilla builds at this time and thus can only process stacks from Mozilla builds.</p>
<div class="note"><strong>Note: </strong>Before generating a stacktrace, you should try <a class="external" href="http://support.mozilla.com/en-US/kb/Safe+Mode" title="http://support.mozilla.com/en-US/kb/Safe+Mode">Firefox safe mode</a> and attempt to troubleshoot your <a class="external" href="http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes" title="http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes">extensions</a> and <a class="external" href="http://support.mozilla.com/en-US/kb/Troubleshooting+plugins" title="http://support.mozilla.com/en-US/kb/Troubleshooting+plugins">plugins</a> to see if Firefox or an add-on is the cause.</div>
<div class="note"><strong>Note: </strong>Older versions of the Adobe Flash plugin interfere with the crash reporter on Windows. Please use <a class="external" href="http://get.adobe.com/flashplayer/">Flash 10</a> or newer.</div>
<h2>How to get a crash ID with the Mozilla Crash Reporter</h2>
<p>The Mozilla crash reporter window should automatically come up after Mozilla crashes. <br>
Be sure that you checked the "Tell Mozilla about the crash" checkbox and click the restart button.</p>
<p style="text-align: center;"><img alt="reporter.jpg" class="internal default" src="/@api/deki/files/2854/=reporter.jpg?size=webview" style="width: 300px; height: 307px;"></p>
<p>The crash reporter should now submit the crash report and Firefox should open again. To access your submitted reports, type "about:crashes" in the Firefox URL bar and press enter. Firefox should open a list of all your submitted crash report IDs. Copy the IDs of the appropriate crashes to your Bugzilla bug report. Please check the listed times to avoid copying the ID of an unrelated crash report.</p>
<p style="text-align: center;"><img alt="crashlist.jpg" class="internal default" src="/@api/deki/files/2855/=crashlist.jpg?size=webview" style="width: 450px; height: 403px;"></p>
<h3>How to get the crash ID if Firefox crashes on startup</h3>
<p>If Firefox crashes on startup you can still access your submitted crash reports. Crash reports are accessible from all Firefox profiles, so if a <a class="external" href="http://support.mozilla.com/en-US/kb/Managing+Profiles" title="http://support.mozilla.com/en-US/kb/Managing+Profiles">new profile</a> does not crash you can use it to access them through "about:crashes" as above.</p>
<h4>Accessing crash report IDs outside of Firefox</h4>
<p>If you cannot load Firefox at all you can find the crash report files at this location depending on your operating system:</p>
<p>Windows : <span class="filename">%APPDATA%\Mozilla\Firefox\Crash Reports\submitted\</span><br>
Mac OS : <span class="filename">~/Library/Application Support/Firefox/Crash Reports/submitted/</span><br>
Linux : <span class="filename">~/.mozilla/firefox/Crash Reports/submitted/</span></p>
<p>Each file in this folder contains one submitted crash report ID. You can check the modified or creation time for each file to discern which crash reports are relevant to your bug report.</p>
<h2>Alternative ways to get a stacktrace</h2>
<p>If the Mozilla crash reporter doesn't come up or isn't available you will need to obtain a stacktrace manually:</p>
<h4>Windows</h4>
<p>See the article <a class="internal" href="/en/How_to_get_a_stacktrace_with_WinDbg" title="En/How to get a stacktrace with WinDbg">Create a stacktrace with Windbg</a> for information on how to do this.</p>
<p>You can also use WinDbg if you get a hang or freeze instead of a crash. In that case use the command:</p>
<pre> !analyze -v -hang</pre>
<h4>Linux</h4>
<ul> <li> <p>Ubuntu:  <a class="link-https" href="https://wiki.ubuntu.com/MozillaTeam/Bugs#Obtain%20a%20backtrace%20from%20an%20apport%20crash%20report%20%28using%20gdb%29" title="https://wiki.ubuntu.com/MozillaTeam/Bugs#Obtain a backtrace from an apport crash report (using gdb)">Instructions from the Ubuntu Team</a></p> </li> <li> <p>Suse:  <a class="external" href="http://en.opensuse.org/Bugs:An_application_crashed" title="http://en.opensuse.org/Bugs:An_application_crashed">Instructions from SuSe</a>  To run Firefox under a debugger you should use: "./run-mozilla.sh -g -d gdb ./firefox-bin" <strong>not</strong> "gdb ./firefox"</p> </li> <li> <p>Fedora: <a class="external" href="http://fedoraproject.org/wiki/StackTraces" title="http://fedoraproject.org/wiki/StackTraces">Capturing Stack Traces</a></p> </li>
</ul>
Revert to this revision