Closed Bug 393652 Opened 17 years ago Closed 17 years ago

Trunk builds on Mac do not quit from menu after first window is closed

Categories

(Toolkit :: Startup and Profile System, defect)

x86
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9alpha8

People

(Reporter: franklin, Assigned: Gijs)

References

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a8pre) Gecko/2007082404 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a8pre) Gecko/2007082404 Minefield/3.0a8pre

Trunk builds do not respond to Apple-Q or File-Quit when no window is open.

Reproducible: Always

Steps to Reproduce:
1. Open trunk version of Minefield.app
2. Close browser window
3. Go to File-> Quit or hit Control-Q
Actual Results:  
Minefield does not quit

Expected Results:  
Minefield should quit

Sometimes with a browser window open, File-Quit or Control-Q will hang Minefield, but I can't reproduce this.
When upgrading to today's build (2007082504) just now via Software Update, the "restart and apply update" option would not quit the application.  I had to force quit the app, then manually relaunch.  The update applied successfully, though, and this bug still appears in today's build.
Confirmed with the 2007082514 build.

Frank, do you have any idea when this regressed ?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
The 2007082304 (2007-08-23-04-trunk) build does not have this problem, but the next build (2007082404) does.
I cannot quit the application from the menu even when windows are visible
Flags: blocking-firefox3?
Keywords: regression
Summary: Trunk builds on Mac do not quit when no window is open → Trunk builds on Mac do not quit from menu
Actually, the menu appears to work when first launched, but after you close the window it stops working and doesn't start working even when opening a window again. No errors in the error console.
Summary: Trunk builds on Mac do not quit from menu → Trunk builds on Mac do not quit from menu after first window is closed
This is a toolkit bug, really...
Component: General → XRE Startup
Flags: blocking-firefox3?
Product: Firefox → Toolkit
QA Contact: general → xre.startup
Target Milestone: --- → mozilla1.9 M8
Attached patch PatchSplinter Review
This patch works for me.

The problem was that the mShuttingDown flag gets raised before the relevant code on mac, and then when it decides not to quit after all, it doesn't get set back to PR_FALSE. Then when another shutdown is attempted (ie, the user clicks "Quit" in the menu, hits Cmd+Q, etc.) the flag is still there and the Quit procedure returns early. Fixing this by moving the setting of this flag to after the code I added, so that if we return early, the flag is not set yet.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #278290 - Flags: review?(benjamin)
This is a really, really really annoying bug. I hit it all the time while working. If the review is going to take a while, should we back out the original patch?
Attachment #278290 - Flags: review?(benjamin) → review+
Checking in mozilla/toolkit/components/startup/src/nsAppStartup.cpp;
/cvsroot/mozilla/toolkit/components/startup/src/nsAppStartup.cpp,v  <--  nsAppStartup.cpp
new revision: 1.19; previous revision: 1.18
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
So... this was a problem before this patch too, but 

+      mRestart = aMode & eRestart;

is bogus.  mRestart is a PRPackedBool, and you're assigning either 0 or 0x10 into it.  The latter is not a valid value for a PRPackedBool.  You want a "!= 0" or something tossed in there.
(In reply to comment #12)
> So... this was a problem before this patch too, but 
> 
> +      mRestart = aMode & eRestart;
> 
> is bogus.  mRestart is a PRPackedBool, and you're assigning either 0 or 0x10
> into it.  The latter is not a valid value for a PRPackedBool.  You want a "!=
> 0" or something tossed in there.
> 

Bug 394629 filed.
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: