Closed
Bug 395707
Opened 18 years ago
Closed 18 years ago
Crash @nsWindowSH::GetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, long, long*, int*) during EM restart
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9beta1
People
(Reporter: tchung, Assigned: mossop)
References
()
Details
Attachments
(1 file)
|
1.03 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; es-ES; rv:1.9a8pre) Gecko/2007091004 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; es-ES; rv:1.9a8pre) Gecko/2007091004 Minefield/3.0a8pre
On nightly build, i reproduced a top #14 crash (according to breakpad), when applying a nightly software update, with an incompatible extension loaded.
Reproducible: Always
Steps to Reproduce:
1. install an incompatible extension on nightly (eg. Nightly test tool 1.3b1)
2. Open a prior nightly build, and do a Help > Updates
3. When update window appears, do the nightly update
4. When dialog asks to restore session of open sites, click restart
5. Verify Firefox updates software, and then upon restartng Firefox, it crashes at nsWindowSH::GetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, long, long*, int*)
Actual Results:
Crash @nsWindowSH::GetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, long, long*, int*) upon restarting session after software update
Expected Results:
no crash.
Updated•18 years ago
|
Flags: blocking-firefox3?
| Assignee | ||
Comment 1•18 years ago
|
||
Breakpad seems to show a pretty clear regression on 1st September nightly:
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&maxdate=1188560137&mindate=1188647880
| Assignee | ||
Comment 2•18 years ago
|
||
The crash appears to be occurring during the xpcom-shutdown phase of the EM requested restart.
Comment 3•18 years ago
|
||
According to Dave, bug 395897 might be about the same issue (that bug has a testcase).
Updated•18 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Comment 5•18 years ago
|
||
I can also reproduce this by running Firefox2 with an incompatible extension (e.g. Firebug 1.0.5) and then starting Minefield.
| Assignee | ||
Comment 6•18 years ago
|
||
This particular case occurs when attempting to call nonBrowserWindowShutdown on the hidden window. It is just the function call that crashes, even if the function is empty.
| Assignee | ||
Comment 7•18 years ago
|
||
So the regression range is kind of right, this has started crashing because nonBrowserWindowShutdown was added in bug 342600.
| Assignee | ||
Comment 8•18 years ago
|
||
During XPCOM shutdown there is a last ditch attempt to destroy any remaining hidden window:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpfe/appshell/src/nsAppShellService.cpp&rev=1.235&mark=561#552
Unfortunately this comes after nsDOMScriptObjectFactory sees the xpcom-shutdown and destroys nsDOMClassInfo, pretty much breaking any scripts that would try to run in the hidden window.
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/dom/src/base/nsDOMScriptObjectFactory.cpp&rev=1.20&mark=289#258
On a normal shutdown the hidden window is destroyed in advance of the xpcom shutdown so there isn't an issue. On the EM initiated restart however the hidden window is not destroyed.
Component: General → XRE Startup
Flags: blocking-firefox3+
Product: Firefox → Toolkit
QA Contact: general → xre.startup
Summary: Crash @nsWindowSH::GetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, long, long*, int*) during session restore → Crash @nsWindowSH::GetProperty(nsIXPConnectWrappedNative*, JSContext*, JSObject*, long, long*, int*) during EM restart
Target Milestone: Firefox 3 M9 → ---
Version: unspecified → Trunk
| Assignee | ||
Comment 9•18 years ago
|
||
Oops, this was blocking-firefox3+ so should be blocking1.9
Flags: blocking1.9?
| Assignee | ||
Comment 10•18 years ago
|
||
This simply destroys the hidden window before xpcom shutdown when a restart has been forced
| Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → mozilla1.9 M9
Comment 11•18 years ago
|
||
Comment on attachment 284949 [details] [diff] [review]
patch rev 1
As hacks go, this one kinda sucks, but I'll let it slide because I can't think of something better right now.
Attachment #284949 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 12•18 years ago
|
||
(In reply to comment #11)
> (From update of attachment 284949 [details] [diff] [review])
> As hacks go, this one kinda sucks, but I'll let it slide because I can't think
> of something better right now.
About the only thoughts I came up with were either to destroy the hidden window directly from NS_ShutdownXPCOM always (not a good idea I think), or add a new observer topic send from NS_ShutdownXPCOM say xpcom-before-shutdown or something which the appshell service could listen to and destroy the hidden window there.
Both of those seem pretty invasive than this.
Updated•18 years ago
|
Flags: blocking1.9? → blocking1.9+
| Assignee | ||
Updated•18 years ago
|
Whiteboard: [has patch][has reviews]
| Assignee | ||
Comment 13•18 years ago
|
||
Checking in toolkit/xre/nsAppRunner.cpp;
/cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v <-- nsAppRunner.cpp
new revision: 1.198; previous revision: 1.197
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has reviews]
| Reporter | ||
Comment 15•18 years ago
|
||
Verified fix on Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a9pre) Gecko/2007102304 Minefield/3.0a9pre. Repro steps in comment #1 no longer happen.
Crash Reporter at: http://crash-stats.mozilla.com/report/list?range_unit=weeks&branch=1.9&range_value=2&signature=nsWindowSH%3A%3AGetProperty(nsIXPConnectWrappedNative*%2C+JSContext*%2C+JSObject*%2C+long%2C+long*%2C+int*), also shows no further instances of this crash after Build ID: 2007102000, which is the next build after Dave's checkin from Comment #13. Marking bug as verified.
Status: RESOLVED → VERIFIED
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
•