Closed
Bug 396234
Opened 17 years ago
Closed 17 years ago
Crash when dialog comes up before automatic shutdown on Mac
Categories
(Toolkit :: Startup and Profile System, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta3
People
(Reporter: bzbarsky, Assigned: mossop)
References
()
Details
(Keywords: crash, regression)
Attachments
(1 file, 1 obsolete file)
5.16 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
See bug 384983 for steps to reproduce. On Mac, those steps cause a crash because we're firing a pagehide event (presumably for this dialog that came up), but sXPConnect is already null when we hit the nsWindowSH code in nsDOMClassInfo.cpp that uses it, so we crash.
Reporter | ||
Comment 1•17 years ago
|
||
The point is, this makes the EM restart thing suck that much worse on Mac, because I can't use -silent to work around it screwing with gdb.
Reporter | ||
Comment 2•17 years ago
|
||
OK, I'm also getting this without -silent, just with the extension update check dialog. It comes up, it closes, the app sits there unresponsive for a bit, the app crashes. 100% reproducible if I start current trunk after running Fx2 on the same profile.
Flags: blocking1.9?
Keywords: regression
Summary: Crash when session restore comes up with -silent on Mac → Crash when dialog comes up before automatic shutdown on Mac
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Comment 3•17 years ago
|
||
Fixed by and dupe of bug 395707, right?
Reporter | ||
Comment 4•17 years ago
|
||
Seems likely, yes. At least in terms of reason for crash and symptoms. I'll try to pull a tree from after that checkin and test.
Reporter | ||
Comment 5•17 years ago
|
||
I'm still seeing this crash with a build pulled on 2007-10-21. So no, not fixed.
I think the difference is that the window being destroyed here is not the hidden window, as in bug 395707.
Comment 6•17 years ago
|
||
This might have been fixed by other checkins, please check again.
Priority: -- → P2
Comment 8•17 years ago
|
||
Not going to block beta2. Assigning to dtownsend for now.
Assignee: nobody → dtownsend
Priority: P2 → P3
Assignee | ||
Updated•17 years ago
|
Assignee | ||
Comment 9•17 years ago
|
||
It actually is the same problem with bug 395707 with the hidden window. However there I only covered the case of the window existing during an EM restart. In this case a window has appeared (thus creating a hidden window) but the app then never properly runs so the hidden window is not properly disposed of.
This particular case would actually be fixed by bug 384983 but there are potential other ways to hit this I believe, should be a fairly simple fix though.
Assignee | ||
Comment 10•17 years ago
|
||
This is the way to go I think and a better fix for bug 395707. Now just always destroy the hidden window from the same place that we created it, named in nsAppRunner. Added the DestroyHiddenWindow on nsAppStartup mainly for symmetry and to save a few lines here and there.
There's still a couple of points where we miss it (the NS_ENSURE_SUCCESS etc. points) but since those are only in error circumstances anyway I left those for now.
Attachment #289302 -
Flags: review?(benjamin)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch][needs review]
Comment 11•17 years ago
|
||
Comment on attachment 289302 [details] [diff] [review]
patch rev 1
>Index: toolkit/components/startup/public/nsIAppStartup.idl
> interface nsIAppStartup : nsISupports
> {
> /**
> * Create the hidden window.
> */
> void createHiddenWindow();
>
> /**
>+ * Destroys the hidden window.
>+ */
>+ void destroyHiddenWindow();
Please document what happens if you call this method without ever having called createHiddenWindow.
Need to rev iid.
>Index: toolkit/xre/nsAppRunner.cpp
>+ appStartup->DestroyHiddenWindow();
You have this sprinkled several different places. Can we unify them all in ScopedXPCOMStartup::~ScopedXPCOMStartup (right before NS_ShutdownXPCOM) or is there a reason we need to call it earlier in shutdown?
Attachment #289302 -
Flags: review?(benjamin) → review-
Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch][needs review]
Assignee | ||
Comment 12•17 years ago
|
||
Updated per review comments
Attachment #289302 -
Attachment is obsolete: true
Attachment #290714 -
Flags: review?(benjamin)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [has patch]
Updated•17 years ago
|
Attachment #290714 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 13•17 years ago
|
||
Will check in when the tree reopens
Whiteboard: [has patch] → [has patch][has reviews]
Assignee | ||
Comment 14•17 years ago
|
||
Checking in toolkit/xre/nsAppRunner.cpp;
/cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v <-- nsAppRunner.cpp
new revision: 1.200; previous revision: 1.199
done
Checking in toolkit/components/startup/public/nsIAppStartup.idl;
/cvsroot/mozilla/toolkit/components/startup/public/nsIAppStartup.idl,v <-- nsIAppStartup.idl
new revision: 1.5; previous revision: 1.4
done
Checking in toolkit/components/startup/src/nsAppStartup.cpp;
/cvsroot/mozilla/toolkit/components/startup/src/nsAppStartup.cpp,v <-- nsAppStartup.cpp
new revision: 1.22; previous revision: 1.21
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has reviews]
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9 M11
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.
Description
•