Open Bug 254084 Opened 22 years ago Updated 4 years ago

failed assert 'mDocument != nsnull', nsXULElement.cpp closing a tab

Categories

(Core :: XUL, defect)

x86
All
defect

Tracking

()

People

(Reporter: csthomas, Unassigned)

Details

(Keywords: assertion)

When middle-clicking a tab to close it: ###!!! ASSERTION: no document: 'mDocument != nsnull', file d:/cvs-1.11.5/mozilla/content/xul/content/src/nsXULElement.cpp, line 3173 I get no failed asserts if I hit ^W or use the "X" at the right of the tabs.
<timeless> ctho: a stack would have been helpful.. NTDLL! DbgBreakPoint address 0x77f75a58 nsDebug::Assertion(const char * 0x01612a78 `string', const char * 0x0162f8e0 `string', const char * 0x0162f454 `string', int 3173) line 109 nsXULElement::GetControllers(nsXULElement * const 0x03d8df54, nsIControllers * * 0x0012e2b4) line 3173 + 33 bytes nsFocusController::GetControllers(nsFocusController * const 0x03d8df54, nsIControllers * * 0x0012e2b4) line 208 + 12 bytes nsFocusController::GetControllerForCommand(nsFocusController * const 0x009fb3d8, const char * 0x029dcd60, nsIController * * 0x0012e31c) line 389 + 27 bytes nsXULCommandDispatcher::GetControllerForCommand(nsXULCommandDispatcher * const 0x01ad0668, const char * 0x029dcd60, nsIController * * 0x0012e31c) line 437 XPTC_InvokeByIndex(nsISupports * 0x01ad0668, unsigned int 10, unsigned int 2, nsXPTCVariant * 0x0012e30c) line 102 XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode 33554432) line 2028 + 22 bytes XPC_WN_CallMethod(JSContext * 0x02c8c890, JSObject * 0x02c227e8, unsigned int 1, long * 0x02c8c8e4, long * 0x0012e574) line 1287 + 10 bytes js_Invoke(JSContext * 0x00000001, unsigned int 1, unsigned int 0) line 1281 + 17 bytes js_Interpret(JSContext * 0x01af7988, long * 0x0012e7e8) line 3375 + 13 bytes js_Invoke(JSContext * 0x00000001, unsigned int 1, unsigned int 2) line 1301 + 10 bytes js_InternalInvoke(JSContext * 0x058f3fc0, JSObject * 0x02c22508, long 46277912, unsigned int 0, unsigned int 1, long * 0x0012e9ac, long * 0x0012e9c8) line 1378 + 13 bytes JS_CallFunctionValue(JSContext * 0x01af7988, JSObject * 0x02c22508, long 46277912, unsigned int 1, long * 0x0012e9ac, long * 0x0012e9c8) line 3684 + 26 bytes nsJSContext::CallEventHandler(nsJSContext * const 0x009c2758, JSObject * 0x02c22508, JSObject * 0x02c22518, unsigned int 1, long * 0x0012e9ac, long * 0x0012e9c8) line 1350 + 24 bytes nsJSEventListener::HandleEvent(nsJSEventListener * const 0x01af7988, nsIDOMEvent * 0x05396950) line 174 + 28 bytes nsEventListenerManager::HandleEventSubType(nsEventListenerManager * const 0x009c2758, nsListenerStruct * 0x0276dde8, nsIDOMEvent * 0x05396950, nsIDOMEventTarget * 0x053a0750, unsigned int 87648604, unsigned int 7) line 1513 nsEventListenerManager::HandleEvent(nsEventListenerManager * const 0x0276dd80, nsPresContext * 0x00000000, nsEvent * 0x00000000, nsIDOMEvent * * 0x0012ec80, nsIDOMEventTarget * 0x053a0750, unsigned int 7, nsEventStatus * 0x0012edf4) line 1590 nsXULElement::HandleDOMEvent(nsXULElement * const 0x009c2758, nsPresContext * 0x01bdada8, nsEvent * 0x0012ed64, nsIDOMEvent * * 0x0012ec80, unsigned int 7, nsEventStatus * 0x053a0750) line 2816 nsXULCommandDispatcher::UpdateCommands(nsXULCommandDispatcher * const 0x01ad0668, const nsAString & {...}) line 388 GlobalWindowImpl::UpdateCommands(GlobalWindowImpl * const 0x01ad0668, const nsAString & {...}) line 3669 nsFocusController::UpdateCommands(nsFocusController * const 0x009fb3d8, const nsAString & {...}) line 183 nsFocusController::SetSuppressFocus(nsFocusController * const 0x009fb3d8, int 0, const char * 0x016126cc `string') line 483 + 49 bytes nsEventStateManager::PreHandleEvent(nsEventStateManager * const 0x009fb3d8, nsPresContext * 0x05143780, nsEvent * 0x0012f16c, nsIFrame * 0x04ff96e4, nsEventStatus * 0x0012f068, nsIView * 0x06476e80) line 620 PresShell::HandleEventInternal(PresShell * const 0x009c2758, nsEvent * 0x00000000, nsIView * 0x06476e80, unsigned int 1, nsEventStatus * 0x0012f068) line 5989 PresShell::HandleEvent(PresShell * const 0x00000000, nsIView * 0x06476e80, nsGUIEvent * 0x0012f16c, nsEventStatus * 0x0012f068, int 1, int & 22790928) line 5875 + 19 bytes nsViewManager::HandleEvent(nsViewManager * const 0x009c2758, nsView * 0x00000001, nsGUIEvent * 0x00000000, int 0) line 2237 + 20 bytes nsViewManager::DispatchEvent(nsViewManager * const 0x0525b8d8, nsGUIEvent * 0x06476e80, nsEventStatus * 0x0012f0c4) line 2013 + 32 bytes HandleEvent(nsGUIEvent * 0x0012f16c) line 79 nsWindow::DispatchEvent(nsWindow * const 0x05be1fa4, nsGUIEvent * 0x0012f16c, nsEventStatus & nsEventStatus_eIgnore) line 1097 + 3 bytes nsWindow::DispatchWindowEvent(nsWindow * const 0x009c2758, nsGUIEvent * 0x00000000) line 1118 nsWindow::DispatchFocus(nsWindow * const 0x009c2758, unsigned int 105, int 1) line 5586 + 14 bytes nsWindow::ProcessMessage(nsWindow * const 0x009c2758, unsigned int 7, unsigned int 1311044, long 0, long * 0x0012f474) line 4255 nsWindow::WindowProc(HWND__ * 0x00120674, unsigned int 7, unsigned int 1311044, long 96346020) line 1379 + 16 bytes USER32! AlignRects + -350177 bytes USER32! AlignRects + -349970 bytes USER32! PostMessageA + 173 bytes USER32! PostMessageA + 221 bytes NTDLL! KiUserCallbackDispatcher + 19 bytes GlobalWindowImpl::Focus(GlobalWindowImpl * const 0x05be1fa4) line 2447 + 8 bytes XPTC_InvokeByIndex(nsISupports * 0x05c2abdc, unsigned int 67, unsigned int 0, nsXPTCVariant * 0x0012f648) line 102 XPCWrappedNative::CallMethod(XPCCallContext & {...}, XPCWrappedNative::CallMode CALL_METHOD) line 2028 + 22 bytes XPC_WN_CallMethod(JSContext * 0x01b75468, JSObject * 0x040c3dc8, unsigned int 0, long * 0x01b756c0, long * 0x0012f8b0) line 1287 + 10 bytes js_Invoke(JSContext * 0x00000001, unsigned int 0, unsigned int 6) line 1281 + 17 bytes fun_call(JSContext * 0x01af7988, JSObject * 0x040c3dc8, unsigned int 1, long * 0x058f3fa8, long * 0x0012f990) line 1491 js_Invoke(JSContext * 0x00000001, unsigned int 1, unsigned int 0) line 1281 + 17 bytes js_Interpret(JSContext * 0x01af7988, long * 0x0012fc04) line 3375 + 13 bytes js_Invoke(JSContext * 0x00000001, unsigned int 2, unsigned int 2) line 1301 + 10 bytes js_InternalInvoke(JSContext * 0x01af79b4, JSObject * 0x009605e8, long 67906536, unsigned int 0, unsigned int 2, long * 0x05c28940, long * 0x0012fd90) line 1378 + 13 bytes JS_CallFunctionValue(JSContext * 0x01af7988, JSObject * 0x009605e8, long 67906536, unsigned int 2, long * 0x05c28940, long * 0x0012fd90) line 3684 + 26 bytes nsJSContext::CallEventHandler(nsJSContext * const 0x009c2758, JSObject * 0x009605e8, JSObject * 0x040c2be8, unsigned int 2, long * 0x05c28940, long * 0x0012fd90) line 1350 + 24 bytes GlobalWindowImpl::RunTimeout(GlobalWindowImpl * const 0x009c2758, nsTimeoutImpl * 0x04e78938) line 5042 GlobalWindowImpl::TimerCallback(nsITimer * 0x063d6fb0, void * 0x04e78938) line 5401 nsTimerImpl::Fire(nsTimerImpl * const 0x009c2758) line 383 + 7 bytes nsDebug::Assertion(const char * 0x30203d21, const char * 0x00000000, const char * 0x2e2f2e2e, int 774778670) line 105 20727450() SHELL32! 7777f77f()
How much do you know about gdb? Can you go to the XPTC_InvokeByIndex frame and call DumpJSStack()?
I'm also seeing this when clicking the X, and on Linux, w/o autoscroll (gdb) call DumpJSStack() 0 [native frame] 1 goUpdateCommand(command = "cmd_undo") ["chrome://global/content/globalOverlay.js":50] controller = undefined enabled = undefined this = [object ChromeWindow @ 0x8379d48] 2 goUpdateGlobalEditMenuItems() ["chrome://communicator/content/utilityOverlay.js":378] this = [object ChromeWindow @ 0x8379d48] 3 oncommandupdate(event = [object Event @ 0x8985910]) ["chrome://navigator/content/navigator.xul":1] this = [object XULElement @ 0x848aa40] 4 [native frame] 5 [native frame] 6 setFocus(element = [object Window @ 0x87bc220], 36) ["chrome://global/content/bindings/tabbrowser.xml":587] this = [object ChromeWindow @ 0x8379d48] 7 [native frame]
OS: Windows XP → All
Hmm... so you've got about:config loaded in a tab which you try to close?
no, the tab was empty (so about:blank was loaded)
0 [native frame] 1 goUpdateCommand(command = "cmd_undo") ["chrome://global/content/globalOverlay.js":50] controller = undefined enabled = undefined this = [object ChromeWindow @ 0x23baf18] 2 goUpdateGlobalEditMenuItems() ["chrome://communicator/content/utilityOverlay.js":378] this = [object ChromeWindow @ 0x23baf18] 3 oncommandupdate(event = [object Event @ 0xac3a798]) ["<unknown>":0] this = [object XULElement @ 0xac33068] 4 [native frame] 5 BrowserExitPrintPreview() ["chrome://navigator/content/browser.js":174] browser = [object XULElement @ 0x3288308] navToolbox = [object XULElement @ 0x2f9eeb0] printPreviewTB = [object XULElement @ 0x2fa8520] mainWin = [object XULElement @ 0x2e45b28] ifreq = [object Window @ 0x32efc20] webBrowserPrint = [xpconnect wrapped nsIWebBrowserPrint @ 0xac3d498] this = [object ChromeWindow @ 0x23baf18] 6 oncommand(event = [object Event @ 0xac46da8]) ["<unknown>":0] this = [object XULElement @ 0xac30fa0] 7 [native frame] i believe i was closing print preview
Looks like the focus controller has a "stale" reference.
Keywords: assertion
Summary: failed assert 'mDocument != nsnull', nsXULElement.cpp → failed assert 'mDocument != nsnull', nsXULElement.cpp closing a tab
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.