Improper Shutdown Bug

I was looking through the mozillaZine Firefox Bugs forum last night and came across a thread titled Improper shutdown of Firefox when shutting down computer. Turns out this is related to Bug 333907 and appear to have become more of an issue in Firefox 2 builds with Windows XP (although I thought I saw Mac mentioned in Bug 342885). Instead of closing Firefox before shutting down Windows, users are letting Windows close all the programs as it shuts down. Even with this method, Firefox is still closing normally, that is to say users are not getting the Unresponsive Program dialog box. However Firefox on the other hand, is treating this type of shut down as if it was not properly shut down and displays this warning when relaunched. This should be fixed with the 2.0.0.2 build, but in the mean time there are couple ways to fix this via about:config:

  • Add a NEW Boolean pref called: browser.sessionstore.resume_from_crash and set it to false

OR

  • Add a NEW String pref called: browser.sessionstore.restore_prompt_uri and set it to javascript:window.close();

Now, since I use the session restore to have Firefox start off where I left off (Show my windows and tabs from last time) I wasn’t sure what would happen if I made any of these above changes. One thing to keep in mind, I normally close all my applications before close Windows. Since Firefox was eating up a lot of memory and I had rebooted in a while I went ahead and restarted Windows without first closing anything. After Windows finished booting and I restarted Firefox I got the warning dialog.

So in a new profile I ran a little experiment just to see what would happen. First, I made sure in my Options… I had ‘When Firefox starts’ set to ‘Show my windows and tabs from last time’. Next I added the string from the second tip, I also had several tabs open then with Firefox (and everything else still open), I went ahead and shut down Windows again (I later discovered ‘Log Off’ would also produce the same “crash” effect). After the reboot, I relaunched Firefox (with the testing profile) and it behaved as if I had shut it down prior to exiting Windows.

Now, if you are not using the session restore feature, the first option would be fine for your use. Just keep in mind doing this will completely disable the session restore upon a “crash” or Windows forced shut-down. If you do use the session restore, stick to second option. Further you should only use one of these fixes since option #1 completely disables the session restore there is no need to auto-close the dialog box.

Permalink

4 Comments on Improper Shutdown Bug

  1. You are absolutely Great!
    There are many of us Firefox Preloader fans out there looking for a fix for the Session Restore issue that is haunting the Firefox 2 build. As you may know, if you use the Preloader and reboot your computer, Firefox 2 doesn’t shutdown properly and you get the Session Restore popup. I have found many posts explaining how to disable the Session Restore, but thats was never an option for me because I’m always using my Save Session extension which needs the Session Restore to function properly. So In my opinion option 2 in this blog fixes the Firefox Preloader. Well at least we no longer can tell that it’s broken.

  2. Thanks mate,
    Option 2 worked fine in stopping the restore sessions window opening :-)…Great instantaneous opening using the Preloader…
    Hope something like this will work in Firefox 3 , as I have tried the beta version (without preloader) and it is also slow to open normally…My opening time (Firefox 2 and 3) was >10secs after trying all the usual remedies !!

  3. Hi guys. I have another problem…. well it’s not really a problem I hate when things escape from my hands. The thing is that since I have Preloader everytime I start Windows, Firefox is launched too. I understand the Preloader initiates with Win, but why the hell does it launch Firefox… I want Firefox to be launched when I want and not when the Preloader decides it. WinXP SP2 catalan + Firefox 2.0.0.12 catalan.

  4. Hi guys. I have a problem of my own. Sometimes when I try to open mozilla firefox from my quick launch, it shuts down my system !

    Well I have experienced the same prob. on bot Xp and vista

    I am running Core2duo 1.86 Ghz Dell Dimension Desktop PC 1 GB Ram running Avira Antivir

    Is this some kind of virus??

1 Trackbacks & Pingbacks

  1. Firefox: Always restore your previous session without the prompt « Andy Hitchman’s Blog

Comments are closed.