Closed Bug 8237 Opened 26 years ago Closed 26 years ago

[PP] Prefs need to save when apprunner quits

Categories

(SeaMonkey :: UI Design, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: slamm, Assigned: ramiro)

References

Details

(Whiteboard: Fixes for XP checked in. Linux broken, has a dependency!)

I use a preference to save the open/close state of the Sidebar. When I implemented this last week, it only worked if I explicitly saved the prefs file after changing the preference. I should not have to save the prefs at all. My JavaScript is in contentframe.js, http://lxr.mozilla.org/mozilla/source/xpfe/browser/src/contentframe.js I may have only tested this on Linux, but think I had the same behavior on Windows too.
Priority: P3 → P1
Target Milestone: M7
Hmmmm, I thought the prefs were being saved.
I see this bug in a build from today on Linux. My Windows build is messed up, so I have not retested it there. This does not need to get fixed for M7, since I can save the file explicitly as a work around.
Whiteboard: want for m7
Whiteboard: want for m7 → Hold for fix in M7
Summary: Prefs need to save when apprunner quits → [REGRESSION] Prefs need to save when apprunner quits
This works if I save the prefs explicitly (except on some Windows builds where prefs are broken, bug #8384). So, I have a work around for M7. Is this a dup? I seem to remember writing this somewhere else.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
Whiteboard: Hold for fix in M7 → Worksforme
This is working today. Marking worksforme. Yesterday, with a breakpoint on nsPref::SavePrefsFileWith(), the variable gErrorOpeningUserPrefs was set to true, preventing saving the file. Today, this is not occurring (why? I don't have time to investigate). I ran the browser, opened the sidebar, closed the window. The pref was correctly saved at application shutdown. Steve, can you verify this on unix?
Status: RESOLVED → REOPENED
The current checked in contentframe.js calls SavePrefsFile(). If I take that out, the "sidebar.open" pref never gets saved. I left in the SavePrefsFile() calls as a work around.
Whiteboard: Worksforme → Have work around. Fix can wait until M8.
The actual fix could wait until M8.
Whiteboard: Have work around. Fix can wait until M8. → Have work around. Fix will wait until M8.
Target Milestone: M7 → M8
Move to M8 ...
Whiteboard: Have work around. Fix will wait until M8. → Have work around. Fix can wait until M8.
Target Milestone: M8 → M7
Hey Don, not so fast and frantic, please! Maybe Steve's case is fixed, but if SavePrefFile is broken, then maybe stuff from the prefs window is not being saved, either. Steve, is this the case on unix? If this is broken, it's a major regression.
Whiteboard: Have work around. Fix can wait until M8. → Have work around. can fix wait until M8?
Whiteboard: Have work around. can fix wait until M8? → Prefs are not being saved on exit on Windows and Unix.
Resolution: WORKSFORME → ---
Clearing the WorksForMe since this is now reopened.
Depends on: 8106
Whiteboard: Prefs are not being saved on exit on Windows and Unix. → Have reviewed fix for Windows. Linux has a dependency!
There are two bugs. 1. If the prefs filed doesn't exist, then there is a bug that sets an error flag, preventing writes to the prefs file thereafter. This occurs on Mac and Windows, and it would occur on Linux, except that there's a worse bug there (#8106). 2. On Linux, bug 8106 means that instead of executing the cleanup code in nsAppRunner/ main, the program just calls exit(). The code that saves the prefs file is never called.
Whiteboard: Have reviewed fix for Windows. Linux has a dependency! → Fixes for XP bug checked in. Linux has a dependency!
I checked in the fix for two XP problems here. The Linux problem (calling exit()) prevents fixing this for Linux.
Assignee: mcmullen → ramiro
Status: REOPENED → NEW
OS: All → Linux
Hardware: All → PC
Since the only case left here is Linux, and since it depends on 8106 (currently assigned to ramiro), I'm assigning this to ramiro, too. Setting the platform to Linux now, since that is the only remaining case.
Summary: [REGRESSION] Prefs need to save when apprunner quits → [PP] Prefs need to save when apprunner quits
Whiteboard: Fixes for XP bug checked in. Linux has a dependency! → Fixes for XP checked in. Linux broken, has a dependency!
Since this never worked on Linux (how could it?) I'm changing the [REGRESSION] to [PP].
Status: NEW → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
I just checked in a fix for this. Marking fixed.
Status: RESOLVED → VERIFIED
verified using 0714 build
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.