Closed Bug 636053 Opened 14 years ago Closed 13 years ago

Firefox should update saved session state when a window closes

Categories

(Firefox :: Session Restore, defect)

x86_64
Linux
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bj, Unassigned)

Details

(Whiteboard: [closeme 2012-04-15])

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12pre) Gecko/20110221 Firefox/4.0b12pre Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b12pre) Gecko/20110221 Firefox/4.0b12pre Firefox regularly fails trying to restore previous sessions for me (which is covered in another bug). Recently the following sequence occurred: Starting with two windows with multiple tabs, I closed the tabs in one browser window, closed that window, closed the tabs in a second browser window, closed the second browser window, then closed two other programs and then shut down my computer. (Running Ubuntu 10.10.) My system was not busy -- no programs were consuming any significant amount of CPU and all the programs fit in memory. I didn't measure the time between closing the last Minefield window and clicking the "shut down" button on the "really shut down" prompt but it was several seconds. When I restarted the computer and restarted Firefox I was greeted with: This is embarrassing... can't restore... Window 1 about:blank Window 2 about:blank Something triggered Firefox to think it needed to restore the session. But once that happened, it restored a state that never existed -- I never had two windows opened with blank tabs. Once first window closed with only a blank tab (and Firefox was still working), the session save/restore code should have realized there was nothing to restore from the closed window and updated the saved state to only contain information about the one window. Reproducible: Didn't try
Version: unspecified → Trunk
Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12 B.J., can you please try this with a clean profile and also try it with the latest beta 12: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/4.0b12-candidates/build1/ Possible dupe of bug 636048 also logged by you - different consequences to the same cause.
If you are getting the "Really Shut Down" prompt in Ubuntu, this means that something is still running. Even though you don't see a window, there may be a process open. The only way to be sure is to check your System Monitor. If there was a Minefield process hanging around, this would cause the issue you are reporting. It would interpret it as an unclean shutdown and display the about:sessionstore page. Resolving INCOMPLETE for now. If you can reproduce this bug and it happens without a Minefield process still running, please reopen. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
(In reply to comment #2) > If you are getting the "Really Shut Down" prompt in Ubuntu, this means that > something is still running. Even though you don't see a window, there may be a > process open. The only way to be sure is to check your System Monitor. It isn't saying "Really Shut Down", it's just confirming that you want to shut down. My Ubuntu 10.10 system always gives that prompt, even if I boot, log in, and start nothing. (There are, of course, many processes running, but anything running shouldn't have unsaved state.) I now regularly use System Monitor so see whether firefox.bin is still running when I shut down, but I observed this before I started that check. But my contention is that I shouldn't have seen this message even if I shut down my system with Firefox running. Starting with two windows I close one -- at that point Firefox should update the session state saying "window closed, no tabs with content". No matter what happens to Firefox after that point, session restore should be restoring at most one Window, not two. I will reopen if I see it again. I'm still investigating the other bug. It's slow because I'm not going to restart my browser every few minutes just test this situation.
I'm going to reopen as UNCONFIRMED to see if I can understand the issue: 1. Two windows with multiple tabs 2. Close one of the windows 3. Reboot your OS 4. Start Firefox Result: Session restores both windows Expected: Session restores one window
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
(In reply to comment #4) > Result: > Session restores both windows Or, more precisely in this case, tries to open two windows and fails. I've filed a separate bug (bug 636048) about the inability to restore about:blank. I reproduced that with only Adblock Plus installed. Restoring (or attempting to restore) multiple windows is something I see occasionally, but I haven't seen it on profiles without extensions so I wouldn't be surprised if it is related to an extension. Here is something I observed just now: First, background: on eBay.com, a standard feature is an "Enlarge" link below the primary picture of an item. Clicking the link will pop up another window with a lager version of the picture. If you set Firefox to restore tabs and windows, visit eBay, view an enlarged picture, close the pop-up, restart Firefox, only the primary window will be restored. This seems correct and usually works for me. A while ago I visited eBay, viewed (and closed) several enlarged item pictures, browsed to several other sites, then closed Minefield with several tabs open. Without a reboot I later opened Minefield from a link in Thunderbird. What I got was a primary window with my previous tabs plus a tab containing the link I requested from Thunderbird, plus *three* windows containing enlarged pictures of eBay items. (I don't know if those were the only three items I had viewed or not.) Below are the extensions I have installed (from about:support). Let me know if more information from about:support would be useful. Application Basics Name Firefox Version 4.0b13pre User Agent Mozilla/5.0 (X11; Linux x86_64; rv:2.0b13pre) Gecko/20110303 Firefox/4.0b13pre Profile Directory Open Containing Folder Enabled Plugins about:plugins Build Configuration about:buildconfig Extensions Name Version Enabled ID Add-on Compatibility Reporter 0.8 true compatibility@addons.mozilla.org Adblock Plus 1.3.3 true {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} Auto Context 1.5.0.3 true {a4fc6772-c55a-2c5b-57bd-71145c24aa4b} CyberSearch 2.0.8 true cybersearch@cybernetnews.com NoSquint 2.1 true nosquint@urandom.ca Flashblock 1.5.14.2 true {3d7eb24f-2740-49df-8937-200b1cc08f8a} Image Zoom 0.4.6 true {1A2D0EC4-75F5-4c91-89C4-3656F6E44B68} Certificate Patrol 1.4 true CertPatrol@PSYC.EU Update Scanner 3.1.4 true {c07d1a49-9894-49ff-a594-38960ede8fb9} Better Facebook! 5.300 true betterfacebook@mattkruse.com Custom Buttons 0.0.5.2 true custombuttons@xsms.org
(In reply to comment #5) > (In reply to comment #4) > > Result: > > Session restores both windows > > Or, more precisely in this case, tries to open two windows and fails. So are you claiming that the two windows are restored, or that the two windows should be restored but do not? For clarification, "result" is what actually happens, "expected" is what we expect to happen. Please clarify precisely what you expect and what actually happens after running my steps in comment 4. I'm still very confused as to what you are seeing and what you expected to happen. CCing Paul on this bug to see if he can help give some clarity and insight into this bug.
(In reply to comment #6) > > So are you claiming that the two windows are restored, or that the two windows > should be restored but do not? What I saw was neither. > For clarification, "result" is what actually happens, "expected" is what we > expect to happen. Please clarify precisely what you expect and what actually > happens after running my steps in comment 4. I'm still very confused as to what > you are seeing and what you expected to happen. First, I elaborate the steps to represent more precisely what happened for the incident I reported in comment 0. I've seen other variations other times. (Several times I've seen incidents similar to what I reported in comment 5 where many old eBay popup windows are created when I restart Firefox.) 1. Two windows with multiple tabs 2. Close the tabs in window 1, one at a time (leaving an empty tab, since browser.tabs.closeWindowWithLastTab is false). 3. Close window 1 4. Close the tabs in window 2, one at a time (leaving one window with one blank tab.) 5. Close window 2. 6. Reboot your OS 7. Start Firefox Result: Firefox starts one window with the following contents: ***************************************************************************************** Well, this is embarrassing. Minefield is having trouble recovering your windows and tabs. This is usually caused by a recently opened web page. You can try: o Removing one or more tabs that you think may be causing the problem o Starting an entirely new browsing session Restore Windows and Tabs window:1 about:blank window:2 about:blank ***************************************************************************************** Expected: Session restores one window with one blank tab.
Ok...let me see if I can simplify this down... Steps: 1. Make sure you have two windows open with multiple tabs loaded and browser.tabs.closeWindowWithLastTab is FALSE 2. Close each of the tabs in the main window and finally close the window 3. Close each of the tabs in the second window and finally close the window 4. Reboot your OS 5. Start Firefox Result: Firefox starts displaying a single tab with about:home (same as if no session was saved). I believe this is expected. Can you see if you can reproduce this with Firefox 4.0rc1 using a new profile?
(In reply to comment #8) FWIW, the same result should be achievable without step 4.
(In reply to comment #8) > Ok...let me see if I can simplify this down... > Steps: Sorry for the delay, I was busy for a while. The expected result occurs sometimes, but not always. I started with a new profile this morning and I was able to easily get unexpected results. (It took much longer to write up this report than to reproduce the problem.) I did not reboot between restarting the browser during these tests. As you noted it wasn't necessary, I just included it on my previous reports to be complete as I rebooting is my most common reason for exiting Firefox. Using Nightly on Ubuntu 10.10. User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110419 Firefox/6.0a1 Here are the steps I took this morning to reproduce a problem: 1) Create a new profile for this test. 2) Set the home page to about:blank. 3) Edit/Preferences and uncheck "warn me when closing multiple tabs". 4) In about:config set browser.tabs.closeWindowWithLastTab to false. 5) Opened and closed the browser a couple of times on google.com and eBay auctions. 6) Searched for "gold dollar" on eBay and opened auction 170628091912. 7) Clicked "enlarge" under the picture, a new window popped up. 8) Closed the pop-up with control-w, closed the eBay auction tab with control-w (leaving one window containing a blank tab), exited Nightly. 9) Restarted Nightly. Expected result: One window, no content displayed (as it was before exiting). Actual result: One window, eBay auction 170628091912 displayed. 10) Closed the auction tab with control-W, (leaving one window containing a blank tab), exited Nightly. 11) Restarted Nightly. Expected result: One window, no content displayed (as it was before exiting). Actual result: One window, with error text (copied below, but similar to what I entered several times above: ***************************************************************************************** Window title: Restore Session Window content: Well, this is embarrassing. Nightly is having trouble recovering your windows and tabs. This is usually caused by a recently opened web page. You can try: o Removing one or more tabs that you think may be causing the problem o Starting an entirely new browsing session Restore Windows and Tabs <check> Window 1 <check> 1875 ONE DOLLAR GOLD - HOLED | eBay <Start New Session> <Restore> *****************************************************************************************
Sorry for to add another comment so soon, but this after the documenting the previous experiment I continued the experiment and got a message that makes Firefox look really bad. After I entered the report above I tried additional steps: 12) Clicked Restore. The auction page was successfully restored. 13) Closed the auction tab with control-W, (leaving one window containing a blank tab), exited Nightly. 14) Restarted Nightly. Expected result: One window, no content displayed (as it was before exiting). Actual result: One window, with error text shown below: ***************************************************************************************** Well, this is embarrassing. Minefield is having trouble recovering your windows and tabs. This is usually caused by a recently opened web page. You can try: o Removing one or more tabs that you think may be causing the problem o Starting an entirely new browsing session Restore Windows and Tabs window:1 about:blank <Start New Session> <Restore> ***************************************************************************************** If Firefox can't manage to correctly load about:blank, how can anyone expect it to correctly load any web page?
(In reply to B.J. Herbison from comment #11) > If Firefox can't manage to correctly load about:blank, how can anyone expect > it to correctly load any web page? iirc there was a fix in this are since your comment. Can you still reproduce this?
Whiteboard: [closeme 2012-04-15]
(In reply to Wayne Mery (:wsmwk) from comment #12) > > iirc there was a fix in this are since your comment. Can you still reproduce > this? Do you know which version the fix would be in? I have seen a form of this problem in the past week (closing all Firefox tabs, exiting Firefox, and seeing an old tab set opened the next time I started Firefox). I've been leaving one non-blank tab open when I exit to avoid this problem. Unfortunately I've been using Firefox 11, 12, and 14 on Ubuntu, Windows XP, and Windows 7 in the past week and I have no idea which version/OS I was using when I last saw the issue. (And I've also been using IE 8, IE 9, Chrome, and Chromium. Testing web applications is a pain.)
(In reply to B.J. Herbison from comment #13) > Do you know which version the fix would be in? Given comment 12, I would certainly expect Firefox 14 to contain the fix (maybe even earlier).
I have stopped trying to avoid this problem with Firefox 14, and I have not observed this problem in the last four days.
Thanks B.J. -- marking this as WORKSFORME given comment 15. Please reopen if this starts to happen again in Firefox Nightly.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.