Closed Bug 153821 Opened 22 years ago Closed 22 years ago

crash while inspecting an error window [@inLayoutUtils::GetPresShellFor]

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: hewitt)

Details

(Keywords: crash)

Crash Data

Attachments

(2 files, 1 obsolete file)

cvs trunk w2k debug build from this weekend i was inspecting a dialog, either a dns error or an xpinstall success. if it was the error dialog, then by the time i crashed i had clsoed the window. ###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../../dist\include\\xpcom\nsCOMPtr.h, line 650 Break: at file ../../../../dist\include\\xpcom\nsCOMPtr.h, line 650 nsIPresShell* inLayoutUtils::GetPresShellFor(nsISupports* aThing) { nsCOMPtr<nsIScriptGlobalObject> so = do_QueryInterface(aThing); nsCOMPtr<nsIDocShell> docShell; so->GetDocShell(getter_AddRefs(docShell)); //so is null nsCOMPtr<nsIPresShell> presShell; docShell->GetPresShell(getter_AddRefs(presShell)); return presShell; } nsDebug::Assertion(const char * 0x0592caa0 `string', const char * 0x0592cadc `string', const char * 0x0592caec `string', int 650) line 280 + 13 bytes nsDebug::PreCondition(const char * 0x0592caa0 `string', const char * 0x0592cadc `string', const char * 0x0592caec `string', int 650) line 439 + 21 bytes nsCOMPtr<nsIScriptGlobalObject>::operator->() line 650 + 34 bytes inLayoutUtils::GetPresShellFor(nsISupports * 0x00000000) line 88 + 32 bytes inDOMUtils::GetStyleRules(inDOMUtils * const 0x056431b0, nsIDOMElement * 0x0549d214, nsISupportsArray * * 0x0012c720) line 84 + 14 bytes XPTC_InvokeByIndex(nsISupports * 0x056431b0, unsigned int 3, unsigned int 2, nsXPTCVariant * 0x0012c710) line 106 XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode CALL_METHOD) line 1994 + 42 bytes XPC_WN_CallMethod(JSContext * 0x03bac1d0, JSObject * 0x050fc968, unsigned int 1, long * 0x04b3397c, long * 0x0012c9b4) line 1266 + 14 bytes js_Invoke(JSContext * 0x03bac1d0, unsigned int 1, unsigned int 0) line 788 + 23 bytes js_Interpret(JSContext * 0x03bac1d0, long * 0x0012d2cc) line 2743 + 15 bytes js_Invoke(JSContext * 0x03bac1d0, unsigned int 1, unsigned int 1) line 805 + 13 bytes js_Interpret(JSContext * 0x03bac1d0, long * 0x0012db9c) line 2356 + 15 bytes js_Invoke(JSContext * 0x03bac1d0, unsigned int 1, unsigned int 2) line 805 + 13 bytes js_InternalInvoke(JSContext * 0x03bac1d0, JSObject * 0x04e499a8, long 62259024, unsigned int 0, unsigned int 1, long * 0x0012e470, long * 0x0012e470) line 880 + 20 bytes js_SetProperty(JSContext * 0x03bac1d0, JSObject * 0x04e499a8, long 46144464, long * 0x0012e470) line 2612 + 47 bytes js_Interpret(JSContext * 0x03bac1d0, long * 0x0012e5ec) line 2585 + 1751 bytes js_Invoke(JSContext * 0x03bac1d0, unsigned int 1, unsigned int 2) line 805 + 13 bytes js_InternalInvoke(JSContext * 0x03bac1d0, JSObject * 0x03b5f008, long 62252584, unsigned int 0, unsigned int 1, long * 0x0012eec0, long * 0x0012eec0) line 880 + 20 bytes js_SetProperty(JSContext * 0x03bac1d0, JSObject * 0x03b5f008, long 46144464, long * 0x0012eec0) line 2612 + 47 bytes js_Interpret(JSContext * 0x03bac1d0, long * 0x0012f03c) line 2585 + 1751 bytes js_Invoke(JSContext * 0x03bac1d0, unsigned int 1, unsigned int 2) line 805 + 13 bytes js_InternalInvoke(JSContext * 0x03bac1d0, JSObject * 0x0571ab80, long 84915480, unsigned int 0, unsigned int 1, long * 0x0012f294, long * 0x0012f164) line 880 + 20 bytes JS_CallFunctionValue(JSContext * 0x03bac1d0, JSObject * 0x0571ab80, long 84915480, unsigned int 1, long * 0x0012f294, long * 0x0012f164) line 3428 + 31 bytes nsJSContext::CallEventHandler(nsJSContext * const 0x03babe90, void * 0x0571ab80, void * 0x050fb518, unsigned int 1, void * 0x0012f294, int * 0x0012f298, int 0) line 1042 + 33 bytes nsJSEventListener::HandleEvent(nsJSEventListener * const 0x05703350, nsIDOMEvent * 0x05143ef0) line 182 + 77 bytes nsEventListenerManager::HandleEventSubType(nsListenerStruct * 0x056f05e8, nsIDOMEvent * 0x05143ef0, nsIDOMEventTarget * 0x05703288, unsigned int 8, unsigned int 7) line 1221 + 20 bytes nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x057032e8, nsIPresContext * 0x056d8458, nsEvent * 0x0012fce8, nsIDOMEvent * * 0x0012fc64, nsIDOMEventTarget * 0x05703288, unsigned int 7, nsEventStatus * 0x0012fd10) line 1829 + 36 bytes nsXULElement::HandleDOMEvent(nsXULElement * const 0x05703280, nsIPresContext * 0x056d8458, nsEvent * 0x0012fce8, nsIDOMEvent * * 0x0012fc64, unsigned int 1, nsEventStatus * 0x0012fd10) line 3447 nsTreeSelection::FireOnSelectHandler() line 743 nsTreeSelection::SelectCallback(nsITimer * 0x03d7a4c8, void * 0x055276f0) line 333 nsTimerImpl::Fire() line 339 + 17 bytes nsTimerManager::FireNextIdleTimer(nsTimerManager * const 0x018358f0) line 588 nsAppShell::Run(nsAppShell * const 0x00d39488) line 134 nsAppShellService::Run(nsAppShellService * const 0x00d39858) line 458 main1(int 3, char * * 0x00304450, nsISupports * 0x00000000) line 1456 + 32 bytes main(int 3, char * * 0x00304450) line 1805 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e8d326() 0 [native frame] 1 StyleRuleView(aObject = [object XULElement @ 0x56225d0]) ["chrome://inspector/content/viewers/styl eRules/styleRules.js":309] i = undefined rule = undefined this = [object Object] 2 anonymous(aObject = [object XULElement @ 0x56225d0]) ["chrome://inspector/content/viewers/styleRul es/styleRules.js":111] this = [object Object] 3 setSubject(aObject = [object XULElement @ 0x56225d0]) ["chrome://inspector/content/inspector.xml#p anel.setSubject()":15] entries = 2,3,4,5,6,7 this = [object XULElement @ 0x3bbc948] 4 onset(val = [object XULElement @ 0x56225d0]) ["chrome://inspector/content/inspector.xml#panel.subj ect (setter)":0] this = [object XULElement @ 0x3bbc948] 5 updateLinkedSubject() ["chrome://inspector/content/inspector.xml#panel.updateLinkedSubject()":1] this = [object XULElement @ 0x3bbc948] 6 onEvent(aEvent = [object Object]) ["chrome://inspector/content/inspector.xml#panel.onEvent()":6] this = [object XULElement @ 0x3bbc948] 7 anonymous(aEventName = "selectionChange", aEventData = [object Object]) ["chrome://inspector/conte nt/jsutil/events/ObserverManager.js":92] list = [object XULElement @ 0x3bbc948] i = 0 this = [object Object] 8 anonymous() ["chrome://inspector/content/viewers/dom/dom.js":242] idx = 0 this = [object Object] 9 onselect(event = [object Event @ 0x5622950]) ["<unknown>":0] this = [object XULElement @ 0x5761d58] 10 [native frame]
I think I just experienced this crash, too. I was DOM-Inspecting the Account Central pane of the MailNews window.
Setting All/All.
Keywords: crash
OS: Windows 2000 → All
Hardware: PC → All
Attachment #98403 - Attachment description: Crash report generated by FizzillaCFM/2002090608 on 10.1.5 showing crash at inLayoutUtils::GetPresShellFor → Crash report generated by FizzillaCFM/2002090608 on Mac OS X 10.1.5 showing crash at inLayoutUtils::GetPresShellFor
Attached patch fix round 1 (obsolete) (deleted) — Splinter Review
ok i talked this through with caillon. we're going to throw out of memory for failure to make the rules array null pointer for this crash unexpected (plus ns_error) for a later case
Attachment #100822 - Attachment is obsolete: true
Comment on attachment 100832 [details] [diff] [review] better return types, cleaner stuff Looks good. Thanks for doing the other cleanup. One other thing I noticed that you should do is remove the comment here: It is pretty much useless. You can tell that by looking at the code. > // query to a content node >- nsCOMPtr<nsIContent> content; >- content = do_QueryInterface(aElement); >+ nsCOMPtr<nsIContent> content(do_QueryInterface(aElement)); But r=caillon and please get hewitt to sr= this.
Attachment #100832 - Flags: review+
Comment on attachment 100832 [details] [diff] [review] better return types, cleaner stuff sr=bzbarsky
Attachment #100832 - Flags: superreview+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
QA Contact: timeless → dom-inspector
Crash Signature: [@inLayoutUtils::GetPresShellFor]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: