Closed
Bug 265383
Opened 20 years ago
Closed 18 years ago
ASSERTION: invalid active window: 'Error', file r:/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp, line 878
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: neil)
References
Details
(Keywords: assertion, regression)
Attachments
(2 files, 1 obsolete file)
|
1.28 KB,
patch
|
timeless
:
review-
|
Details | Diff | Splinter Review |
|
5.46 KB,
patch
|
emaijala+moz
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: invalid active window: 'Error', file
r:/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp, line 878
Break: at file
r:/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp, line 878
Steps:
run mozilla
see profile manager
select a profile
as the profile manager goes away, this assert fires.
reason: the window nsFocusController is trying to focus is the profile manager
which is already closed.
gklayout.dll!nsFocusController::UpdateWWActiveWindow() Line 542 C++
> gklayout.dll!nsFocusController::SetActive(int aActive=0x00000001) Line 508 C++
appshell.dll!nsWebShellWindow::HandleEvent(nsGUIEvent * aEvent=0x015d7abc)
Line 595 C++
gkwidget.dll!nsWindow::DispatchEvent(nsGUIEvent * event=0x0012deb0,
nsEventStatus & aStatus=nsEventStatus_eIgnore) Line 1074 + 0x3 C++
gkwidget.dll!nsWindow::DispatchWindowEvent(nsGUIEvent * event=0x00000000)
Line 1095 C++
gkwidget.dll!nsWindow::DispatchFocus(unsigned int aEventType=0x00000069, int
isMozWindowTakingFocus=0x00000001) Line 5555 + 0xe C++
gkwidget.dll!nsWindow::ProcessMessage(unsigned int msg=0x00000007, unsigned
int wParam=0x00020fb8, long lParam=0x00000000, long * aRetValue=0x0012e1b8)
Line 4226 + 0xa C++
gkwidget.dll!nsWindow::WindowProc(HWND__ * hWnd=0x00250eea, unsigned int
msg=0x00000007, unsigned int wParam=0x00020fb8, long lParam=0x015df9f4) Line
1355 + 0x10 C++
user32.dll!77d43a50()
user32.dll!77d43b1f()
user32.dll!PostMessageA() + 0xad
user32.dll!PostMessageA() + 0xdd
ntdll.dll!RtlDestroyHeap() + 0xd
gklayout.dll!nsView::~nsView() Line 258 C++
gklayout.dll!nsView::`scalar deleting destructor'() + 0x8 C++
gklayout.dll!nsIView::Destroy() Line 325 C++
gklayout.dll!nsFrame::Destroy(nsPresContext * aPresContext=0x0167e030) Line
673 C++
gklayout.dll!nsSplittableFrame::Destroy(nsPresContext *
aPresContext=0x0167e030) Line 71 + 0xa C++
gklayout.dll!nsContainerFrame::Destroy(nsPresContext *
aPresContext=0x0167e030) Line 170 + 0x7 C++
gklayout.dll!ViewportFrame::Destroy(nsPresContext * aPresContext=0x0167e030)
Line 67 + 0xa C++
gklayout.dll!nsFrameManager::Destroy() Line 317 C++
gklayout.dll!PresShell::Destroy() Line 1913 C++
gklayout.dll!DocumentViewerImpl::Destroy() Line 1214 C++
docshell.dll!nsDocShell::Destroy() Line 3153 C++
docshell.dll!nsWebShell::Destroy() Line 1227 C++
appshell.dll!nsXULWindow::Destroy() Line 508 C++
appshell.dll!nsWebShellWindow::Destroy() Line 1625 + 0x6 C++
appshell.dll!nsChromeTreeOwner::Destroy() Line 346 C++
gklayout.dll!GlobalWindowImpl::ReallyCloseWindow() Line 3505 C++
gklayout.dll!GlobalWindowImpl::CloseWindow(nsISupports * aWindow=0x015d7abc)
Line 4589 C++
gklayout.dll!nsJSContext::ScriptEvaluated(int aTerminated=0x00000001) Line
1859 + 0x7 C++
gklayout.dll!nsJSContext::CallEventHandler(JSObject * aTarget=0x01756fa8,
JSObject * aHandler=0x00000001, unsigned int argc=0x00000001, long *
argv=0x0012e5c4, long * rval=0x0012e5f0) Line 1348 C++
gklayout.dll!nsJSEventListener::HandleEvent(nsIDOMEvent * aEvent=0x010db6d8)
Line 193 C++
gklayout.dll!nsXBLPrototypeHandler::ExecuteHandler(nsIDOMEventReceiver *
aReceiver=0x00000005, nsIDOMEvent * aEvent=0x01faa6d0) Line 491 C++
gklayout.dll!nsXBLKeyEventHandler::HandleEvent(nsIDOMEvent *
aEvent=0x01591528) Line 143 + 0xb C++
gklayout.dll!nsEventListenerManager::HandleEventSubType(nsListenerStruct *
aListenerStruct=0x02831530, nsIDOMEvent * aDOMEvent=0x010db6d8,
nsIDOMEventTarget * aCurrentTarget=0x01591528, unsigned int aSubType=0x010db6e0,
unsigned int aPhaseFlags=0x00000002) Line 1523 C++
gklayout.dll!nsEventListenerManager::HandleEvent(nsPresContext *
aPresContext=0x00000000, nsEvent * aEvent=0x0012f4f0, nsIDOMEvent * *
aDOMEvent=0x0012f270, nsIDOMEventTarget * aCurrentTarget=0x01591528, unsigned
int aFlags=0x00000002, nsEventStatus * aEventStatus=0x0012f3f0) Line 1599 C++
gklayout.dll!nsXULElement::HandleDOMEvent(nsPresContext *
aPresContext=0x00360067, nsEvent * aEvent=0x003f8018, nsIDOMEvent * *
aDOMEvent=0x015df9f0, unsigned int aFlags=0x00000005, nsEventStatus *
aEventStatus=0x01faa6d0) Line 2820 C++
gklayout.dll!nsXULElement::HandleDOMEvent(nsPresContext *
aPresContext=0x00360067, nsEvent * aEvent=0x003f8018, nsIDOMEvent * *
aDOMEvent=0x015df9f0, unsigned int aFlags=0x00000005, nsEventStatus *
aEventStatus=0x01faa6d0) Line 2839 C++
gklayout.dll!nsXULElement::HandleDOMEvent(nsPresContext *
aPresContext=0x00360067, nsEvent * aEvent=0x003f8018, nsIDOMEvent * *
aDOMEvent=0x015df9f0, unsigned int aFlags=0x00000005, nsEventStatus *
aEventStatus=0x01faa6d0) Line 2839 C++
gklayout.dll!nsXULElement::HandleDOMEvent(nsPresContext *
aPresContext=0x00360067, nsEvent * aEvent=0x003f8018, nsIDOMEvent * *
aDOMEvent=0x015df9f0, unsigned int aFlags=0x00000005, nsEventStatus *
aEventStatus=0x01faa6d0) Line 2839 C++
gklayout.dll!nsXULElement::HandleDOMEvent(nsPresContext *
aPresContext=0x00360067, nsEvent * aEvent=0x003f8018, nsIDOMEvent * *
aDOMEvent=0x015df9f0, unsigned int aFlags=0x00000005, nsEventStatus *
aEventStatus=0x01faa6d0) Line 2839 C++
gklayout.dll!PresShell::HandleEventInternal(nsEvent * aEvent=0x0012f4f0,
nsIView * aView=0x016eb868, unsigned int aFlags=0x00000001, nsEventStatus *
aStatus=0x0012f3f0) Line 5959 + 0x19 C++
gklayout.dll!PresShell::HandleEvent(nsIView * aView=0x016eb868, nsGUIEvent *
aEvent=0x0012f4f0, nsEventStatus * aEventStatus=0x0012f3f0, int
aForceHandle=0x00000001, int & aHandled=0x00000001) Line 5814 + 0x11 C++
gklayout.dll!nsViewManager::HandleEvent(nsView * aView=0x015df9f0, nsGUIEvent
* aEvent=0x00000005, int aCaptured=0x01faa6d0) Line 2285 C++
gklayout.dll!nsViewManager::DispatchEvent(nsGUIEvent * aEvent=0x3d888889,
nsEventStatus * aStatus=0x0012f44c) Line 2059 + 0x14 C++
gklayout.dll!HandleEvent(nsGUIEvent * aEvent=0x0012f4f0) Line 166 C++
gkwidget.dll!nsWindow::DispatchEvent(nsGUIEvent * event=0x0012f4f0,
nsEventStatus & aStatus=nsEventStatus_eIgnore) Line 1074 + 0x3 C++
gkwidget.dll!nsWindow::DispatchWindowEvent(nsGUIEvent * event=0x00000000)
Line 1095 C++
gkwidget.dll!nsWindow::DispatchKeyEvent(unsigned int aEventType=0x00000083,
unsigned short aCharCode=0x0000, unsigned int aVirtualCharCode=0x0000000d, long
aKeyData=0x001c0001) Line 3034 + 0xe C++
gkwidget.dll!nsWindow::OnKeyDown(unsigned int aVirtualKeyCode=0x0000000d,
unsigned int aScanCode=0x0000001c, long aKeyData=0x001c0001) Line 3160 C++
gkwidget.dll!nsWindow::ProcessMessage(unsigned int msg=0x00000100, unsigned
int wParam=0x0000000d, long lParam=0x001c0001, long * aRetValue=0x0012f898)
Line 4003 C++
gkwidget.dll!nsWindow::WindowProc(HWND__ * hWnd=0x00020fb8, unsigned int
msg=0x00000100, unsigned int wParam=0x0000000d, long lParam=0x016eb99c) Line
1355 + 0x10 C++
user32.dll!77d43a50()
user32.dll!77d43b1f()
user32.dll!GetMessageW() + 0x125
user32.dll!DispatchMessageW() + 0xb
appshell.dll!nsContentTreeOwner::ShowAsModal() Line 441 C++
embedcomponents.dll!nsWindowWatcher::OpenWindowJS(nsIDOMWindow *
aParent=0x0012de3c, const char * aUrl=0x656d6f73, const char * aName=0x6e696874,
const char * aFeatures=0x00360067, int aDialog=0x003f8018, unsigned int
argc=0x015df9f0, long * argv=0x00000005, nsIDOMWindow * * _retval=0x01faa6d0)
Line 787 C++
embedcomponents.dll!nsWindowWatcher::OpenWindow(nsIDOMWindow *
aParent=0x00000000, const char * aUrl=0x015c91e8, const char * aName=0x01fe3cc4,
const char * aFeatures=0x01fe31b8, nsISupports * aArguments=0x00000001,
nsIDOMWindow * * _retval=0x0012fc20) Line 458 + 0x2a C++
profile.dll!nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr={...},
int canInteract=0x01faa6d0) Line 540 + 0x3c C++
profile.dll!nsProfile::StartupWithArgs(nsICmdLineService *
cmdLineArgs=0x00000005, int canInteract=0x01faa6d0) Line 356 C++
appshell.dll!nsAppShellService::DoProfileStartup(nsICmdLineService *
aCmdLineService=0x015c1200, int canInteract=0x00000001) Line 274 C++
mozilla.exe!InitializeProfileService(nsICmdLineService *
cmdLineArgs=0x80004005) Line 948 + 0x12 C++
mozilla.exe!main1(int argc=0x015df9f0, char * * argv=0x00000005, nsISupports *
nativeApp=0x01faa6d0) Line 1225 + 0x8 C++
mozilla.exe!main(int argc=0x00000001, char * * argv=0x003f7cf0) Line 1813 +
0x16 C++
mozilla.exe!mainCRTStartup() Line 400 + 0x11 C
{,,gklayout.dll}((*(GlobalWindowImpl*)(&*(nsGlobalChromeWindow*){*}(this->mCurrentWindow.mRawPtr)))).mIsClosed
0x01 '␁' unsigned char
+
{,,docshell.dll}((*(nsAString*)(&(*(nsSubstring*)(&((*(nsDocShell*)(&*(nsWebShell*){,,gklayout.dll}(((*(GlobalWindowImpl*)(&*(nsGlobalChromeWindow*){*}(((*this).mCurrentWindow).mRawPtr)))).mDocShell)))).mTitle))))).mData
0x02974380 "Select User Profile" unsigned short *
Attachment #162823 -
Flags: review?(bryner)
Attachment #162823 -
Flags: superreview?(neil.parkwaycc.co.uk)
| Assignee | ||
Comment 2•20 years ago
|
||
This doesn't happen on my gtk1 debug build; I don't have a windows debugging environment but with --enable-debug --enable-debugger-info-modules=no I see the error in the console, so perhaps we should be focusing (!) more on why we're getting a WM_SETFOCUS message on a window we're trying to destroy, or why it's reentering us... the fix could be as simple as switching lines 487/8 of nsXULWindow.cpp i.e. mDocShell = nsnull; and shellAsWin->Destroy();
Updated•20 years ago
|
Attachment #162823 -
Flags: review?(bryner) → review+
Comment on attachment 162823 [details] [diff] [review] check for closed window well, nsxulwindow won't work, and as it seems, my patch isn't sufficient either: ntdll.dll!_DbgBreakPoint@0() xpcom_core.dll!nsDebugImpl::Break(const char * aFile=0x01f94518, int aLine=881) Line 385 C++ xpcom_core.dll!nsDebugImpl::Assertion(const char * aStr=0x01f94568, const char * aExpr=0x01f94560, const char * aFile=0x01f94518, int aLine=881) Line 301 C++ xpcom_core.dll!nsDebug::Assertion(const char * aStr=0x01f94568, const char * aExpr=0x01f94560, const char * aFile=0x01f94518, int aLine=881) Line 109 C++ embedcomponents.dll!nsWindowWatcher::SetActiveWindow(nsIDOMWindow * aActiveWindow=0x044b0024) Line 881 + 0x1a C++ gklayout.dll!nsFocusController::UpdateWWActiveWindow() Line 561 C++ gklayout.dll!nsFocusController::SetActive(int aActive=1) Line 525 C++ webbrwsr.dll!nsWebBrowser::Activate() Line 1746 C++ mfcembed.exe!CBrowserView::Activate(unsigned int nState=1, CWnd * pWndOther=0x00000000, int bMinimized=0) Line 1265 C++ mfcembed.exe!CBrowserFrame::OnActivate(unsigned int nState=1, CWnd * pWndOther=0x00000000, int bMinimized=0) Line 340 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=6, unsigned int wParam=1, long lParam=0, long * pResult=0x0012baa8) Line 2100 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=6, unsigned int wParam=1, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x040f7c00, HWND__ * hWnd=0x00151b40, unsigned int nMsg=6, unsigned int wParam=1, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00151b40, unsigned int nMsg=6, unsigned int wParam=1, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00151b40, unsigned int nMsg=6, unsigned int wParam=1, long lParam=0) Line 209 + 0x15 C++ user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_DispatchClientMessage@20() + 0x4d user32.dll!___fnDWORD@4() + 0x24 ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 user32.dll!_NtUserSetActiveWindow@4() + 0xc mfcembed.exe!CBrowserFrame::BrowserFrameGlueObj::ShowBrowserFrame(int aShow=1) Line 281 C++ mfcembed.exe!CBrowserImpl::SetVisibility(int aVisibility=1) Line 374 C++ webbrwsr.dll!nsDocShellTreeOwner::SetVisibility(int aVisibility=1) Line 652 + 0x1b C++ gklayout.dll!nsGlobalWindow::Focus() Line 2584 C++ xpcom_core.dll!XPTC_InvokeByIndex(nsISupports * that=0x044b0024, unsigned int methodIndex=67, unsigned int paramCount=0, nsXPTCVariant * params=0x0012bea8) Line 102 C++ xpc3250.dll!XPCWrappedNative::CallMethod(XPCCallContext & ccx={...}, XPCWrappedNative::CallMode mode=CALL_METHOD) Line 2068 + 0x1e C++ xpc3250.dll!XPC_WN_CallMethod(JSContext * cx=0x04c7db78, JSObject * obj=0x04dffb50, unsigned int argc=0, long * argv=0x0555304c, long * vp=0x0012c17c) Line 1311 + 0xb C++ js3250.dll!js_Invoke(JSContext * cx=0x04c7db78, unsigned int argc=0, unsigned int flags=0) Line 1293 + 0x20 C js3250.dll!js_Interpret(JSContext * cx=0x04c7db78, unsigned char * pc=0x052e58fc, long * result=0x0012ccf0) Line 3566 + 0xf C js3250.dll!js_Invoke(JSContext * cx=0x04c7db78, unsigned int argc=1, unsigned int flags=2) Line 1313 + 0x13 C js3250.dll!js_InternalInvoke(JSContext * cx=0x04c7db78, JSObject * obj=0x04dffb50, long fval=17624128, unsigned int flags=0, unsigned int argc=1, long * argv=0x0012cfe8, long * rval=0x0012cfec) Line 1390 + 0x14 C js3250.dll!JS_CallFunctionValue(JSContext * cx=0x04c7db78, JSObject * obj=0x04dffb50, long fval=17624128, unsigned int argc=1, long * argv=0x0012cfe8, long * rval=0x0012cfec) Line 3831 + 0x1f C gklayout.dll!nsJSContext::CallEventHandler(JSObject * aTarget=0x04dffb50, JSObject * aHandler=0x010cec40, unsigned int argc=1, long * argv=0x0012cfe8, long * rval=0x0012cfec) Line 1401 + 0x21 C++ gklayout.dll!nsJSEventListener::HandleEvent(nsIDOMEvent * aEvent=0x035225e0) Line 205 + 0x2d C++ gklayout.dll!nsEventListenerManager::HandleEventSubType(nsListenerStruct * aListenerStruct=0x0499b0d0, nsIDOMEvent * aDOMEvent=0x035225e0, nsIDOMEventTarget * aCurrentTarget=0x044b004c, unsigned int aSubType=1, unsigned int aPhaseFlags=7) Line 1557 + 0x14 C++ gklayout.dll!nsEventListenerManager::HandleEvent(nsPresContext * aPresContext=0x0529c568, nsEvent * aEvent=0x0012d320, nsIDOMEvent * * aDOMEvent=0x0012d234, nsIDOMEventTarget * aCurrentTarget=0x044b004c, unsigned int aFlags=7, nsEventStatus * aEventStatus=0x0012d31c) Line 1656 C++ gklayout.dll!nsGlobalWindow::HandleDOMEvent(nsPresContext * aPresContext=0x0529c568, nsEvent * aEvent=0x0012d320, nsIDOMEvent * * aDOMEvent=0x0012d234, unsigned int aFlags=7, nsEventStatus * aEventStatus=0x0012d31c) Line 914 C++ gklayout.dll!DocumentViewerImpl::LoadComplete(unsigned int aStatus=0) Line 987 + 0x23 C++ docshell.dll!nsDocShell::EndPageLoad(nsIWebProgress * aProgress=0x04ab6624, nsIChannel * aChannel=0x0426bde0, unsigned int aStatus=0) Line 4578 C++ docshell.dll!nsWebShell::EndPageLoad(nsIWebProgress * aProgress=0x04ab6624, nsIChannel * channel=0x0426bde0, unsigned int aStatus=0) Line 665 C++ docshell.dll!nsDocShell::OnStateChange(nsIWebProgress * aProgress=0x04ab6624, nsIRequest * aRequest=0x0426bde0, unsigned int aStateFlags=131088, unsigned int aStatus=0) Line 4504 C++ docshell.dll!nsDocLoader::FireOnStateChange(nsIWebProgress * aProgress=0x04ab6624, nsIRequest * aRequest=0x0426bde0, int aStateFlags=131088, unsigned int aStatus=0) Line 1195 C++ docshell.dll!nsDocLoader::doStopDocumentLoad(nsIRequest * request=0x0426bde0, unsigned int aStatus=0) Line 832 C++ docshell.dll!nsDocLoader::DocLoaderIsEmpty() Line 729 C++ docshell.dll!nsDocLoader::DocLoaderIsEmpty() Line 732 C++ docshell.dll!nsDocLoader::OnStopRequest(nsIRequest * aRequest=0x04fc47d8, nsISupports * aCtxt=0x00000000, unsigned int aStatus=2152398850) Line 653 C++ necko.dll!nsLoadGroup::RemoveRequest(nsIRequest * request=0x04fc47d8, nsISupports * ctxt=0x00000000, unsigned int aStatus=2152398850) Line 732 + 0x2c C++ necko.dll!nsLoadGroup::Cancel(unsigned int status=2152398850) Line 400 C++ docshell.dll!nsDocLoader::Stop() Line 311 + 0x1f C++ docshell.dll!nsDocShell::Stop() Line 250 C++ docshell.dll!nsDocLoader::Stop() Line 308 C++ docshell.dll!nsDocShell::Stop() Line 250 C++ docshell.dll!nsDocShell::Stop(unsigned int aStopFlags=3) Line 3156 C++ docshell.dll!nsDocShell::Destroy() Line 3381 C++ webbrwsr.dll!nsWebBrowser::SetDocShell(nsIDocShell * aDocShell=0x00000000) Line 1616 C++ webbrwsr.dll!nsWebBrowser::InternalDestroy() Line 144 C++ webbrwsr.dll!nsWebBrowser::Destroy() Line 1222 C++ > mfcembed.exe!CBrowserView::DestroyBrowser() Line 383 C++ mfcembed.exe!CBrowserView::OnDestroy() Line 281 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=2, unsigned int wParam=0, long lParam=0, long * pResult=0x0012defc) Line 2023 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=2, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x040f8000, HWND__ * hWnd=0x00261bd2, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00261bd2, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00261bd2, unsigned int nMsg=2, unsigned int wParam=0, long lParam=0) Line 209 + 0x15 C++ user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_DispatchClientMessage@20() + 0x4d user32.dll!___fnDWORD@4() + 0x24 ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 user32.dll!_NtUserDestroyWindow@4() + 0xc mfcembed.exe!CBrowserFrame::OnClose() Line 130 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=16, unsigned int wParam=0, long lParam=0, long * pResult=0x0012e24c) Line 2023 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x040f7c00, HWND__ * hWnd=0x00151b40, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00151b40, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00151b40, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 209 + 0x15 C++ user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_DispatchClientMessage@20() + 0x4d user32.dll!___fnDWORD@4() + 0x24 ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 user32.dll!_NtUserMessageCall@28() + 0xc user32.dll!_RealDefWindowProcA@16() + 0x27 user32.dll!_DefWindowProcA@16() + 0x53 user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_CallWindowProcAorW@24() + 0x51 user32.dll!_CallWindowProcA@20() + 0x1b mfc71d.dll!CWnd::DefWindowProcA(unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 1024 + 0x20 C++ mfc71d.dll!CWnd::Default() Line 275 C++ mfc71d.dll!CWnd::OnSysCommand(unsigned int __formal=61536, unsigned int __formal=61536) Line 436 + 0xf C++ mfc71d.dll!CFrameWnd::OnSysCommand(unsigned int nID=61536, long lParam=0) Line 1047 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=274, unsigned int wParam=61536, long lParam=0, long * pResult=0x0012e778) Line 2051 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=0) Line 1745 + 0x1e C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x040f7c00, HWND__ * hWnd=0x00151b40, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00151b40, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00151b40, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=0) Line 209 + 0x15 C++ user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 user32.dll!_DispatchMessageWorker@8() + 0xdc user32.dll!_DispatchMessageW@4() + 0xf user32.dll!_DialogBox2@16() + 0x1a6 user32.dll!_InternalDialogBox@24() + 0xb6 user32.dll!_SoftModalMessageBox@4() + 0x677 user32.dll!_MessageBoxWorker@4() + 0x175 user32.dll!_MessageBoxTimeoutW@24() + 0x7a user32.dll!_MessageBoxTimeoutA@24() + 0x9c user32.dll!_MessageBoxExA@20() + 0x1b user32.dll!_MessageBoxA@16() + 0x45 mfcEmbedComponents.dll!CPromptService::Alert(nsIDOMWindow * parent=0x050aeb4c, const unsigned short * dialogTitle=0x00000000, const unsigned short * text=0x0012f448) Line 138 C++ embedcomponents.dll!nsPrompt::Alert(const unsigned short * dialogTitle=0x00000000, const unsigned short * text=0x0012f448) Line 209 + 0x2e C++ docshell.dll!nsDocShell::DisplayLoadError(unsigned int aError=2152398868, nsIURI * aURI=0x049930d0, const unsigned short * aURL=0x00000000, nsIChannel * aFailedChannel=0x0357da30) Line 2972 C++ docshell.dll!nsWebShell::EndPageLoad(nsIWebProgress * aProgress=0x04ffad4c, nsIChannel * channel=0x0357da30, unsigned int aStatus=2152398868) Line 851 C++ docshell.dll!nsDocShell::OnStateChange(nsIWebProgress * aProgress=0x04ffad4c, nsIRequest * aRequest=0x0357da30, unsigned int aStateFlags=131088, unsigned int aStatus=2152398868) Line 4504 C++ docshell.dll!nsDocLoader::FireOnStateChange(nsIWebProgress * aProgress=0x04ffad4c, nsIRequest * aRequest=0x0357da30, int aStateFlags=131088, unsigned int aStatus=2152398868) Line 1195 C++ docshell.dll!nsDocLoader::doStopDocumentLoad(nsIRequest * request=0x0357da30, unsigned int aStatus=2152398868) Line 832 C++ docshell.dll!nsDocLoader::DocLoaderIsEmpty() Line 729 C++ docshell.dll!nsDocLoader::OnStopRequest(nsIRequest * aRequest=0x0357da30, nsISupports * aCtxt=0x00000000, unsigned int aStatus=2152398868) Line 653 C++ necko.dll!nsLoadGroup::RemoveRequest(nsIRequest * request=0x0357da30, nsISupports * ctxt=0x00000000, unsigned int aStatus=2152398868) Line 732 + 0x2c C++ necko.dll!nsHttpChannel::OnStopRequest(nsIRequest * request=0x03852de8, nsISupports * ctxt=0x00000000, unsigned int status=2152398868) Line 3853 C++ necko.dll!nsInputStreamPump::OnStateStop() Line 507 C++ necko.dll!nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream * stream=0x0361abd8) Line 343 + 0xb C++ xpcom_core.dll!nsInputStreamReadyEvent::EventHandler(PLEvent * plevent=0x0574f72c) Line 120 C++ xpcom_core.dll!PL_HandleEvent(PLEvent * self=0x0574f72c) Line 698 + 0xa C xpcom_core.dll!PL_ProcessPendingEvents(PLEventQueue * self=0x01143078) Line 633 + 0x9 C xpcom_core.dll!_md_TimerProc(HWND__ * hwnd=0x000e12b6, unsigned int uMsg=275, unsigned int idEvent=0, unsigned long dwTime=2096734000) Line 1034 + 0x9 C user32.dll!_InternalCallWinProc@20() + 0x28 user32.dll!_UserCallWinProc@24() + 0xa1 user32.dll!_DispatchMessageWorker@8() + 0xcc6 user32.dll!_DispatchMessageA@4() + 0xf mfc71d.dll!AfxInternalPumpMessage() Line 188 C++ mfc71d.dll!CWinThread::PumpMessage() Line 916 C++ mfc71d.dll!CWinThread::Run() Line 637 + 0xb C++ mfc71d.dll!CWinApp::Run() Line 701 C++ mfc71d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00142384, int nCmdShow=10) Line 49 + 0xb C++ mfcembed.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00142384, int nCmdShow=10) Line 25 C++ mfcembed.exe!WinMainCRTStartup() Line 390 + 0x39 C kernel32.dll!_BaseProcessStart@4() + 0x23 from :SetActiveWindow - aActiveWindow 0x044b0024 {mRefCnt={mValue=14 } _mOwningThread={mThread=0x003f51b8 } mFirstDocumentLoad=0 ...} nsIDOMWindow * |- [nsGlobalWindow] {mRefCnt={mValue=14 } _mOwningThread={mThread=0x003f51b8 } mFirstDocumentLoad=0 ...} const nsGlobalWindow ||+ nsIScriptGlobalObject {...} nsIScriptGlobalObject ||+ nsPIDOMWindow {mChromeEventHandler={mRawPtr=0x04096df8 {mRefCnt={mValue=6 } _mOwningThread={mThread=0x003f51b8 } mWindow=0x044b0024 {mRefCnt={...} _mOwningThread={...} mFirstDocumentLoad=0 ...} ...} } mDocument={mRawPtr=0x04b07e4c {mChannel=??? mCompatMode=??? mImageMaps=??? ...} } mFrameElement=0x00000000 ...} nsPIDOMWindow ||+ nsIDOMJSWindow {...} nsIDOMJSWindow ||+ nsIScriptObjectPrincipal {...} nsIScriptObjectPrincipal ||+ nsIDOMEventReceiver {...} nsIDOMEventReceiver ||+ nsIDOM3EventTarget {...} nsIDOM3EventTarget ||+ nsIDOMViewCSS {...} nsIDOMViewCSS ||+ nsSupportsWeakReference {mProxy=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mReferent=??? } } nsSupportsWeakReference ||+ nsIInterfaceRequestor {...} nsIInterfaceRequestor ||+ mRefCnt {mValue=14 } nsAutoRefCnt ||+ _mOwningThread {mThread=0x003f51b8 } nsAutoOwningThread || mFirstDocumentLoad 0 unsigned char || mIsScopeClear 1 '␁' unsigned char || mFullScreen 0 unsigned char || mIsClosed 0 unsigned char || mInClose 0 unsigned char || mOpenerWasCleared 0 unsigned char || mIsPopupSpam 1 '␁' unsigned char ||+ mContext {mRawPtr=0x043fe828 {mRefCnt={mValue=4 } _mOwningThread={mThread=0x003f51b8 } mContext=0x04c7db78 ...} } nsCOMPtr<nsIScriptContext> ||+ mOpener {mRawPtr=0x04080614 {mRefCnt={mValue=4 } _mOwningThread={mThread=0x003f51b8 } mFirstDocumentLoad=0 ...} } nsCOMPtr<nsIDOMWindowInternal> ||+ mControllers {mRawPtr=0x043bc4b8 {mRefCnt={mValue=1 } _mOwningThread={mThread=0x003f51b8 } mControllers={mImpl=0x01a33420 {mBits=2147483656 mCount=2 mArray=0x01a33428 } } ...} } nsCOMPtr<nsIControllers> ||+ mListenerManager {mRawPtr=0x018903c0 {mRefCnt={mValue=2 } _mOwningThread={mThread=0x003f51b8 } mManagerType=1 '␁' ...} } nsCOMPtr<nsIEventListenerManager> || mJSObject 0x04dffb50 JSObject * ||+ mNavigator {mRawPtr=0x04251158 {mRefCnt={mValue=2 } _mOwningThread={mThread=0x003f51b8 } mMimeTypes={mRawPtr=0x00000000 {mRefCnt={...} _mOwningThread={...} mNavigator=??? ...} } ...} } nsRefPtr<nsNavigator> ||+ mScreen {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mDocShell=??? } } nsRefPtr<nsScreen> ||+ mHistory {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mDocShell=??? } } nsRefPtr<nsHistory> ||+ mFrames {mRawPtr=0x042a4608 {mRefCnt={mValue=1 } _mOwningThread={mThread=0x003f51b8 } mDocShellNode=0x04ab66b0 {mThread=0x003f51b8 mCharsetReloadState=eCharsetReloadInit mCommandManager={mRawPtr=0x00000000 } ...} } } nsRefPtr<nsDOMWindowList> ||+ mLocation {mRawPtr=0x053e3da0 {mRefCnt={mValue=1 } _mOwningThread={mThread=0x003f51b8 } mDocShell=0x04ab66a8 {mThread=0x003f51b8 mCharsetReloadState=eCharsetReloadInit mCommandManager={mRawPtr=0x00000000 } ...} } } nsRefPtr<nsLocation> ||+ mMenubar {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mToolbar {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mLocationbar {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mPersonalbar {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mStatusbar {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mScrollbars {mRawPtr=0x00000000 {mRefCnt={mValue=??? } _mOwningThread={mThread=??? } mBrowserChrome=??? } } nsRefPtr<nsBarProp> ||+ mWindowUtils {mRawPtr=0x00000000 } nsCOMPtr<nsIWeakReference> ||+ mTimeouts 0x00000000 {mWindow=??? mExpr=??? mFunObj=??? ...} nsTimeout * ||+ mTimeoutInsertionPoint 0x044b00b8 nsTimeout * * || mTimeoutPublicIdCounter 1 unsigned int || mTimeoutFiringDepth 0 unsigned int ||+ mStatus {...} nsString ||+ mDefaultStatus {...} nsString ||+ mGlobalObjectOwner 0x04ab66d0 {mThread=0x003f51b8 mCharsetReloadState=eCharsetReloadInit mCommandManager={mRawPtr=0x00000000 } ...} nsIScriptGlobalObjectOwner * ||+ mDocShell 0x04ab66a8 {mThread=0x003f51b8 mCharsetReloadState=eCharsetReloadInit mCommandManager={mRawPtr=0x00000000 } ...} nsIDocShell * ||+ mCurrentEvent 0x0012d320 {eventStructType=1 '␁' message=1100 point={x=0 y=0 } ...} nsEvent * ||+ mCrypto {mRawPtr=0x00000000 } nsCOMPtr<nsIDOMCrypto> ||+ mPkcs11 {mRawPtr=0x00000000 } nsCOMPtr<nsIDOMPkcs11> ||+ mDocumentPrincipal {mRawPtr=0x00000000 } nsCOMPtr<nsIPrincipal> ||+ mNavigatorHolder {mRawPtr=0x0441dba0 {mRefCnt={mValue=2 } _mOwningThread={mThread=0x003f51b8 } mMaybeScope=0x04e6f270 {gScopes=0x053e0880 {gScopes=0x053e0880 gDyingScopes=0x00000000 mRuntime=0x010c4598 ...} gDyingScopes=0x00000000 {gScopes=0x053e0880 gDyingScopes=0x00000000 mRuntime=??? ...} mRuntime=0x04baa918 {DEBUG_WrappedNativeHashtable=0x0407ad70 mStrings=0x01242c6c mStrIDs=0x04baa91c ...} ...} ...} } nsCOMPtr<nsIXPConnectJSObjectHolder> ||+ sSecMan 0x010c4100 {mRefCnt={mValue=11 } _mOwningThread={mThread=0x003f51b8 } sEnabledID=17623700 ...} nsIScriptSecurityManager * |\+ sComputedDOMStyleFactory 0x00000000 nsIFactory * \+ nsISupports {...} nsISupports + {,,necko.dll}((*(nsACString*)(&(*(nsCSubstring*)(&(*(nsStandardURL*){,,docshell .dll}((((*(nsDocShell*)(&*(nsWebShell*){,,gklayout.dll}((*(((*(nsGlobalWindow*) {*}((nsIDOMWindow*)0x044b0024)).mLocation).mRawPtr)).mDocShell)))).mCurrentURI) .mRawPtr)).mSpec))))).mData 0x04447568 "http://www.angelfire.com/sys/popup_source.shtml?search_string=blue%20in%20gree n" char * from highlighted frame: + {,,necko.dll}((*(nsACString*)(&(*(nsCSubstring*)(&(*(nsStandardURL*){,,docshell .dll}((((*(nsDocShell*)(&*(nsWebShell*){,,webbrwsr.dll}(((*(nsWebBrowser*){*}(( (*this).mWebNav).mRawPtr)).mDocShell).mRawPtr)))).mCurrentURI).mRawPtr)).mSpec) )))).mData 0x04447568 "http://www.angelfire.com/sys/popup_source.shtml?search_string=blue%20in%20gree n" char *
Attachment #162823 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #162823 -
Flags: review-
Attachment #162823 -
Flags: review+
Comment 4•20 years ago
|
||
so the patch was a no go?
it worked for one case but clearly isn't proper since it missed cases :(
Comment 6•20 years ago
|
||
Another case occurs when I try to visit http://www.w3.org, and Mozilla pops up alert dialogs requesting I install fonts. I click OK, and assert 3 times per dialog.
Comment 7•19 years ago
|
||
This assertion did not occur about a month ago. I also see a couple of warnings that seems related: WARNING: NS_ENSURE_TRUE(vm) failed, file c:/moz2/mozilla/docshell/base/nsDocShell.cpp, line 3712 WARNING: NS_ENSURE_TRUE(domdoc) failed, file c:/moz2/mozilla/xpfe/appshell/src/nsXULWindow.cpp, line 1567
Keywords: regression
Comment 8•19 years ago
|
||
(In reply to comment #7) > This assertion did not occur about a month ago. > I also see a couple of warnings that seems related: > > WARNING: NS_ENSURE_TRUE(vm) failed, file > c:/moz2/mozilla/docshell/base/nsDocShell.cpp, line 3712 > WARNING: NS_ENSURE_TRUE(domdoc) failed, file > c:/moz2/mozilla/xpfe/appshell/src/nsXULWindow.cpp, line 1567 20051124 SeaMonkey/1.5a similar results with slightly different line numbers: ###!!! ASSERTION: invalid active window: 'Error', file c:/mozilla/embedding/comp onents/windowwatcher/src/nsWindowWatcher.cpp, line 924 Break: at file c:/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher .cpp, line 924 WARNING: NS_ENSURE_TRUE(vm) failed, file c:/mozilla/docshell/base/nsDocShell.cpp , line 3721 WARNING: NS_ENSURE_TRUE(domdoc) failed, file c:/mozilla/xpfe/appshell/src/nsXULW indow.cpp, line 1570
Comment 9•19 years ago
|
||
Someone will have to explain to me why, in the stack, we go from NS_RELEASE(mWindow) to trying to give the window focus. That just doesn't make much sense.
Comment 10•19 years ago
|
||
*** Bug 300603 has been marked as a duplicate of this bug. ***
Comment 11•18 years ago
|
||
Same assertion happens (thrice) after Session Store startup dialog ("Do you want to restore your session?") gets dismissed. Pretty painful.Keywords: assertion
OS: Windows 2000 → Windows XP
| Assignee | ||
Comment 12•18 years ago
|
||
I don't know why it's only happening with dialogs. Possibly the dialog manager? Anyway what happens is that when its child is destroyed something sets focus to the outer window (three times!) although it's already been hidden by then.
| Assignee | ||
Comment 13•18 years ago
|
||
It looks as if the dialog manager might be responsible for two of the three...
| Assignee | ||
Comment 14•18 years ago
|
||
I think the Windows dialog class is playing with focus during destruction.
| Assignee | ||
Comment 15•18 years ago
|
||
Comment on attachment 245021 [details] [diff] [review] Don't try to subclass the Windows dialog class Pinging Aaron in case accessibility stuff wants us to use a dialog class (otherwise I could rewrite to use the generic window class).
Attachment #245021 -
Flags: review?(emaijala)
Attachment #245021 -
Flags: review?(aaronleventhal)
Attachment #245021 -
Flags: review?
| Reporter | ||
Comment 16•18 years ago
|
||
looks ok, but i don't build on windows anymore.
Comment 17•18 years ago
|
||
Comment on attachment 245021 [details] [diff] [review] Don't try to subclass the Windows dialog class Interesting but a bit scary. I need to test that this doesn't break any of the very delicate focus stuff with dialogs (see bug 189085 for all the awful details and links).
| Assignee | ||
Comment 18•18 years ago
|
||
Comment on attachment 245021 [details] [diff] [review] Don't try to subclass the Windows dialog class >@@ -1789,12 +1760,7 @@ NS_METHOD nsWindow::Show(PRBool bState) > } > } > } else { >- if (mWindowType != eWindowType_dialog) { >- ::ShowWindow(mWnd, SW_HIDE); >- } else { >- ::SetWindowPos(mWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | >- SWP_NOZORDER | SWP_NOACTIVATE); >- } >+ ::ShowWindow(mWnd, SW_HIDE); > } > } > You're right, this hunk breaks dialog activation. Rather than working off the window type, shouldn't it look for an owner?
Comment 19•18 years ago
|
||
Comment on attachment 245021 [details] [diff] [review] Don't try to subclass the Windows dialog class As far as I remember it's so because |::ShowWindow(mWnd, SW_HIDE);| on a dialog wreaks havoc trying to set the focus. Using SetWindowPos we can avoid Windows trying to mess us up. To be able to use ShowWindow it would be necessary to always make sure the parent can be activated before hiding the dialog and that would often be impractical.
Attachment #245021 -
Flags: review?(emaijala)
Attachment #245021 -
Flags: review?(aaronleventhal)
Attachment #245021 -
Flags: review-
| Assignee | ||
Comment 20•18 years ago
|
||
Attachment #245021 -
Attachment is obsolete: true
Attachment #245095 -
Flags: review?(emaijala)
Comment 21•18 years ago
|
||
I don't think adding MozillaDialogClass will break screen readers, but it might. We need to test with Window-Eyes and JAWS. As long is it's only for trunk, it's alright with me if you check it in. If there's actually a problem we may just ask the screen reader developers to deal with it on their end. But there shouldn't be, because the special behavior is based on MozillaContentWindow class, and that's going away eventually anyway. In fact, roc told me we're going to be windowless in Firefox 3 (other than the top level window). So, I'm not even sure that this will end up making it into the final release anyway.
Comment 22•18 years ago
|
||
Comment on attachment 245095 [details] [diff] [review] Updated to remove the hunk as mentioned in comment #18 This looks good to me. I can't see how to create a dialog without a real top level window. Or rather, what good would it be.
Attachment #245095 -
Flags: review?(emaijala) → review+
| Assignee | ||
Updated•18 years ago
|
Attachment #245095 -
Flags: superreview?(roc)
Attachment #245095 -
Flags: superreview?(roc) → superreview+
| Assignee | ||
Comment 23•18 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 24•18 years ago
|
||
The assertion still happens after dismissing the session restore dialog on startup for me (only once instead of 3 times though).
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•