One or more windows not restored when restoring previous session
Categories
(Firefox :: Session Restore, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox59 | --- | affected |
People
(Reporter: hammerquill, Assigned: sfoster)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-session-restore])
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Reporter | ||
Comment 3•6 years ago
|
||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 13 votes.
:dao, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 5•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Comment 6•1 year ago
|
||
I'm experiencing something similar to this on Fedora which might be a difference between Ctrl-q and GNOME's activity panel thing.
STR
- have 3 windows open with multiple tabs in each
- quit Firefox via GNOME's [Firefox] menu thing -> Quit.
Expected
- all 3 windows are restored
Actual
- only 1 of the windows is restored (it seems kind of random which one gets restored)
Interestingly, using Firefox's File -> Quit or Ctrl-q, I get the confirmation "close all 3 windows?" and upon restarting Firefox, they're all back. I'll keep investigating.
Comment 7•1 year ago
|
||
- Sam asked me to reset the severity here
- I wonder if my issue is Linux/GNOME-specific and is related to bug 1858782 ...
Comment 8•1 year ago
|
||
Martin, are you aware of the differences between Ctrl-q and the GNOME application menu's Quit entry when it comes to closing windows and potentially impacting session restore?
Comment 9•1 year ago
|
||
My understanding is that on system initiated quit nsWindow::OnDeleteEvent() is called from delete window callback:
But I haven't investigated it much yet.
Assignee | ||
Comment 10•1 year ago
|
||
I was able to reproduce what I think is the issue here. Both the GNOME application menu and Window taskbar menu have a "Close {n} windows" option - which results in Firefox quitting. But these don't do quite the same thing as ctrl+q (ctrl+shift+q on windows). I added a little logging to SessionStore.sys.mjs and got the following, using the application menu:
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore: Calling maybeSaveClosedWindow, isLastWindow?" false
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore: Calling maybeSaveClosedWindow, isLastWindow?" false
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore: Calling maybeSaveClosedWindow, isLastWindow?" false
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore: Calling maybeSaveClosedWindow, isLastWindow?" false
console.log: "SessionStore, handling quit-application-granted"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling quit-application"
And when I started the browser back up again, only 3 of my 4 windows got restored. (3 is the default value of the browser.sessionstore.max_windows_undo
pref).
Using ctrl+Q I get:
console.log: "SessionStore, handling quit-application-granted"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling domwindowclosed"
console.log: "SessionStore, handling quit-application"
And at the next startup, all 4 windows were restored.
I also noticed the isLastWindow
variable I logged out there never goes to true
. I'm not sure if that is a smoking gun, but its certainly very fishy.
There's confirmed risk of data loss, STR and what seems to be a lead here so I'm updating priority and severity.
Updated•1 year ago
|
Assignee | ||
Comment 11•1 year ago
|
||
I thought I had good STR here, but some time in mozregression came up empty: I'm not able to reproduce with those builds. Only the local build from moz-central. Same profile, same sessionstore.jsonlz4 being loaded and saved to on exit. With my local build, exiting via the application menu only saves 3 of the 4 windows. Using e.g. mach mozregression --launch 2024-02-01
and pointing at the same profile directory, 4 windows are opened, 4 windows are saved.
Comment 12•9 months ago
|
||
Sam, if this doesn't have reliable STR is this still a P1 or being worked on?
Assignee | ||
Comment 13•9 months ago
|
||
(In reply to Sam Foster [:sfoster] (he/him) from comment #11)
I thought I had good STR here, but some time in mozregression came up empty: I'm not able to reproduce with those builds. Only the local build from moz-central.
A thought: my local builds are debug builds, I suspect that is the difference here, which could mean I was running into a different issue.
(In reply to Sarah Clements [:sclements] from comment #12)
Sam, if this doesn't have reliable STR is this still a P1 or being worked on?
Yeah we should downgrade the priority - regrettably its not actionable right now. This is another case where I hope the logging added in bug 1854373 might throw up some new insights.
If anyone can reproduce this on versions 127+, please comment here with any recent log files from your {profile}/sessionstore-logs directory. Those logs files should be clear of any personal info, but feel free to email me directly if you prefer.
Description
•