views:

130

answers:

3

My website doesn't use Flash or any plugins; just javascript (jQuery, Google Maps). It doesn't crash FF 3.6 all the time, but it usually does after a few minutes. It can happen on lots of different pages. Sometimes it crashes when I'm scrolling the page, sometimes when I'm interacting with a control.

Where do I even start debugging? Should I go through the hassle of attaching gdb to Firefox and getting a stack trace, then praying that it sheds some light on the offending code?

+5  A: 

You need to do what you can to track down the problem. Test these things:

  • Are other browsers other than Firefox affected? i.e. IE, Chrome, Safari, Opera, etc.
  • Firefox has an Error Console. Usually javascript errors would pop up there. Have a look.
  • Have you tried Firebug? It's a really great tool to observe how fast each requests take, and what scripts are doing. You can even set breakpoints and run tests on a console directly in Firebug.
  • When's the last time your site didn't crash? Check what you've added, and the error may come from the code you've added, or the plugins.
  • Try disable all of your Firefix plugins to see if it still crashes.
  • etc.

You can also give us a link here and see if our Foxes crash as well.

Xavier Ho
In addition to all these excellent tips (and I would like to emphasize the last one, give us a link to see if it's just your machine), if you really found a bug in Firefox, post it on their bug report forums. Like even if you found a workaround, if it really is a bug, tell them so they can fix it.
Blindy
Ah yes, I knew I forgot something. If it's a real bug, report it!
Xavier Ho
Thanks! My site is http://www.useplannr.com. Using the about:crashes page I posted below I found that it is a real Firefox bug, but it was fixed in the FF trunk recently.The repro that works fairly reliably for me is this: Go to the front page, open Firebug console, and do a hard refresh a few times in a row. It usually crashes on my first try on OS X 10.6.
Jason Prado
A: 

Here's what I did that at least gave me a little more information.

When the browser crashes, make sure you send the details to Mozilla. Load up about:crashes in Firefox and click the top link to Mozilla's crash database. It will take a while to load then give you info on your crash.

My particular crash is related to Firebug/Flash. And it's been fixed as of a few weeks ago. Hopefully it'll be out in a point release soon, and I'm going to continue trying to isolate the cause.

Jason Prado
@Jason: Thanks for sharing. I didn't know about `about:crashes`. Here's one to debugging!
Xavier Ho
A: 

Roll back your JavaScript until you can pinpoint the exact bit of code causing the crash.