Closed Bug 642624 Opened 9 years ago Closed 8 years ago
If shutdown Firefox when all closed windows are popups, exception occurs and session isn't saved
This is a better patch I came up with. It handles the following cases the following way: 1. User closes browser with open windows (normal) - saves those windows as open and saves any closed windows as closed. 2. User closes browser with no open window (or only popup windows open) and at least one closed non-popup window - finds first non-popup window and uses that for the browser state; all other windows remain closed and stored in closed window list (including popup windows). 3. User closes browser with no open window (or only popup windows open) and no non-popup windows in closed window list - creates a blank session uses that for the browser state; all other windows remain closed and stored in closed window list (including popup windows). This triggers loading of homepage next time browser runs, with all popup windows in the closed window list. The only iffy case I found was when shutting down the browser with nothing, but a popup window open. In that case the popup window was moved to the closed window list and a new browser window was opened at start up. The problem was that the new window was opened with the size of the old popup window. There's probably a better way of handling that, but the window can be resized so it's not terrible. There's no way to test this automatically since it involves shutting down the browser and running it again, but the test cases are rather simple.
I haven't seen any movement on this in 3 months.
Still a problem in Firefox 6. Note, in the steps to recreate, make sure the "browser.tabs.closeWindowWithLastTab" preference is set to false otherwise Firefox will close when you try to close the last tab.
I'm still having daily issues with Firefox reporting "crashes" after I've shut down and ran Firefox again. Any reason why this bug report is being ignored? It's a pretty simple bug as there's a reproducible test case, the reason for the problem is well documented and there's even a proposed patch (two even).
Sorry Michael. It's not being ignored, just missed due to the sheer amount of other work happening in the Mozilla project. I will ping Paul on IRC to make sure he is aware of this bug.
Still nothing nearly 2 months later. I hit this problem on a near daily basis do to fact that I never open new browser windows, so any time I end up with a popup window and close and restart the browser it says it crashed..
easy fix, install tabmix plus and set it to open all popups in a tab.
(In reply to Danial Horton from comment #8) > easy fix, > > install tabmix plus and set it to open all popups in a tab. That's a work around, not a fix. Plus some links in web pages open new windows as "popups" (no toolbars) regardless of that setting.
Hey Michael, I'm really sorry for the delay. I did look at this a while back but never finished thinking it through. I think the patch is mostly ok, but my concern is the empty window. It may be fine (I think that will just open an empty window & then the popups as well) but I need to run through it / see if we have a test to cover it.
Just for clarification, are you waiting on me for something at this point or are you still working on this?
It's still on my list. Some higher priority things have popped up over the past few days.
I just tried both of these patches and the end behavior was still the same: a single window was opened with the popup turned into a normal window. In that case I'm inclined to just take the first patch since it has the least churn and doesn't add a window that isn't used. Michael, does that line up with the behavior you had intended while writing these patches?
The patch I put together prevented the exception on shutdown which was causing the session state at the time of shutdown not to be saved. My original intent was to prevent all the old closed popup windows (usually from bank web sites and the like) from popping up the next time I ran Firefox. A single old popup window is better than a bunch of them I guess. Personally I think that if the user closes Firefox with no popup windows open and a single blank tab in the browser, that's the way Firefox should open. Basically the browser should look like it did when the user quit.
(In reply to Michael Kraft [:morac] from comment #15) > Personally I think that if the user closes Firefox with no popup windows > open and a single blank tab in the browser, that's the way Firefox should > open. Basically the browser should look like it did when the user quit. I hear you, but I'm not going to change that behavior right now.
Attachment #523666 - Flags: review+
Attachment #523676 - Flags: review?(paul) → review-
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 11
I think this is causing a new problem. When I shut down Firefox, sometimes when I open it, I get nothing but popups opening. Before I used to get the main window and popups, now I don't even get the main window.
You need to log in before you can comment on or make changes to this bug.