Closed Bug 184399 Opened 23 years ago Closed 13 years ago

nsDocShell::SetVisibility and callers need to check rv. [@ nsWindow::ProcessMessage]

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: timeless, Assigned: timeless)

Details

(Keywords: assertion, crash)

Crash Data

ok, this is an almost current cvs build from yesterday except something was broken. There are actually a bunch of problems here but i'd only like to post the log with annotations once. (note, i'm using links, sorry for the line spacing). console output: Type Manifest File: I:\build\mozilla\debug-i686-pc-cygwin\dist\bin\components\xpti.dat nsNativeComponentLoader: autoregistering begins. *** Registering nsAbSyncModule components (all right -- a generic module!) *** Registering nsAbModule components (all right -- a generic module!) *** Registering application components (all right -- a generic module!) *** Registering appshell components (all right -- a generic module!) *** Registering nsAutoConfigModule components (all right -- a generic module!) *** Registering nsBayesianFilterModule components (all right -- a generic module!) *** Registering nsChromeModule components (all right -- a generic module!) *** Registering nsComposerModule components (all right -- a generic module!) *** Registering embedcomponents components (all right -- a generic module!) *** Registering nsMimeEmitterModule components (all right -- a generic module!) *** Registering nsContentModule components (all right -- a generic module!) *** Registering nsLayoutModule components (all right -- a generic module!) *** Registering nsParserModule components (all right -- a generic module!) *** Registering nsViewModule components (all right -- a generic module!) *** Registering nsWidgetModule components (all right -- a generic module!) *** Registering nsIconDecoderModule components (all right -- a generic module!) *** Registering nsComm4xMailImportModule components (all right -- a generic module!) *** Registering nsEudoraImportModule components (all right -- a generic module!) *** Registering nsImportServiceModule components (all right -- a generic module!) *** Registering nsOEImport components (all right -- a generic module!) *** Registering nsOutlookImport components (all right -- a generic module!) *** Registering nsTextImportModule components (all right -- a generic module!) *** Registering nsInspectorModule components (all right -- a generic module!) *** Registering DOM_components components (all right -- a generic module!) *** Registering javascript__protocol components (all right -- a generic module!) *** Registering nsMsgMailViewModule components (all right -- a generic module!) *** Registering nsMorkModule components (all right -- a generic module!) *** Registering nsMsgBaseModule components (all right -- a generic module!) *** Registering nsMsgComposeModule components (all right -- a generic module!) *** Registering nsMsgDBModule components (all right -- a generic module!) *** Registering IMAP_factory components (all right -- a generic module!) *** Registering msgMapiModule components (all right -- a generic module!) *** Registering nsMsgMdnModule components (all right -- a generic module!) *** Registering nsMsgNewsModule components (all right -- a generic module!) *** Registering nsMsgSMIMEModule components (all right -- a generic module!) *** Registering necko_core_and_primary_protocols components (all right -- a generic module!) *** Registering NSS components (all right -- a generic module!) *** Registering PKI components (all right -- a generic module!) *** Registering nsProfileModule components (all right -- a generic module!) *** Registering nsRDFModule components (all right -- a generic module!) *** Registering nsRegistryViewerModule components (all right -- a generic module!) *** Registering Session_History_Module components (all right -- a generic module!) *** Registering TransformiixModule components (all right -- a generic module!) *** Registering nsURILoaderModule components (all right -- a generic module!) *** Registering nsVCardModule components (all right -- a generic module!) *** Registering nsWalletModule components (all right -- a generic module!) *** Registering Browser_Embedding_Module components (all right -- a generic module!) *** Registering nsWalletViewerModule components (all right -- a generic module!) *** Registering nsXMLExtrasModule components (all right -- a generic module!) *** Registering nsPrefModule components (all right -- a generic module!) nsNativeComponentLoader: autoregistering succeeded nNCL: registering deferred (0) WARNING: Cannot create startup observer : service,@mozilla.org/typeaheadfind;1, file i:/build/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp, line 114 WARNING: Cannot create startup observer : service,@mozilla.org/accessproxy;1, file i:/build/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp, line 114 WARNING: Cannot create startup observer : @mozilla.org/js/jsd/app-start-observer;2, file i:/build/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp, line 114 WARNING: Cannot create startup observer : @mozilla.org/scriptsecuritymanager;1, file i:/build/mozilla/embedding/components/appstartup/src/nsAppStartupNotifier.cpp, line 114 WARNING: NS_ENSURE_TRUE(securityManager) failed, file i:/build/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp, line 1223 WEBSHELL+ = 1 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2187 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2624 WARNING: NS_ENSURE_TRUE(foundInterface) failed, file i:/build/mozilla/dom/src/base/nsGlobalWindow.cpp, line 5131 ###!!! ASSERTION: This is not supposed to fail!: 'Error', file i:/build/mozilla/js/src/xpconnect/src/nsXPConnect.cpp, line 411 Break: at file i:/build/mozilla/js/src/xpconnect/src/nsXPConnect.cpp, line 411 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsJSEnvironment.cpp, line 1180 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsJSEnvironment.cpp, line 1758 WARNING: NS_ENSURE_TRUE(mScriptContext) failed, file i:/build/mozilla/docshell/base/nsDocShell.cpp, line 6605 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(EnsureScriptEnvironment())) failed, file i:/build/mozilla/docshell/base/nsWebShell.cpp, line 307 [bug #2] This (really critical) failure doesn't bubble up through to: nsWindowWatcher::OpenWindowJS(nsWindowWatcher * const 0x0104b8ec, nsIDOMWindow * 0x00000000, const char * 0x045f6010, const char * 0x0427d954, const char * 0x0427d58c, int 1, unsigned int 1, long * 0x045f56a0, nsIDOMWindow * * 0x0012fa40) line 633 nsWindowWatcher::OpenWindow(nsWindowWatcher * const 0x0104b8e8, nsIDOMWindow * 0x00000000, const char * 0x045f6010, const char * 0x0427d954, const char * 0x0427d58c, nsISupports * 0x0107aab8, nsIDOMWindow * * 0x0012fa40) line 459 + 48 bytes nsProfile::LoadDefaultProfileDir(nsCString & {...}, int 1) line 523 + 94 bytes nsProfile::StartupWithArgs(nsProfile * const 0x04616578, nsICmdLineService * 0x01037d80, int 1) line 355 + 16 bytes nsAppShellService::DoProfileStartup(nsAppShellService * const 0x01084330, nsICmdLineService * 0x01037d80, int 1) line 266 + 31 bytes InitializeProfileService(nsICmdLineService * 0x01037d80) line 1175 + 31 bytes main1(int 1, char * * 0x002e44d0, nsISupports * 0x002d6f08) line 1454 + 14 bytes main(int 1, char * * 0x002e44d0) line 1902 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e87903() -- walking out i finally hit ###!!! ASSERTION: Redeclaration of DOM classinfo proto chain interface!: '!d.mProtoChainInterface', file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 1252 Break: at file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 1252 [bug #3] In a real mozilla (in the past i've only hit it in xpcshell). classinfo spews out over 3000 lines of stuff, i've snipped it because i never have a buffer large enough not to, and it's not useful. Classinfo needs to be improved so that it spews out 5 or fewer warnings in this case. jst/peterv: if you can explain what's going on here, that'd be great. If you want an xpcshell testcase instead, that's easily arranged. NTDLL! 77f9f9df() nsDebug::Assertion(const char * 0x03aaf960, const char * 0x03aaf948, const char * 0x03aaf914, int 1252) line 280 + 13 bytes nsDOMClassInfo::Init() line 1252 + 42 bytes nsDOMClassInfo::GetClassInfoInstance(nsDOMClassInfoID eDOMClassInfo_ChromeWindow_id) line 2622 + 5 bytes nsGlobalChromeWindow::QueryInterface(nsGlobalChromeWindow * const 0x0461d028, const nsID & {...}, void * * 0x0012f030) line 5131 + 25 bytes nsQueryInterface::operator()(const nsID & {...}, void * * 0x0012f030) line 47 + 25 bytes XPC3250.DLL! 045a57fb() XPC3250.DLL! 045a5672() XPC3250.DLL! 0459e579() XPC3250.DLL! 0457ecf0() XPC3250.DLL! 045689d6() XPC3250.DLL! 0456841e() nsJSContext::InitContext(nsJSContext * const 0x0461d1e8, nsIScriptGlobalObject * 0x0461d028) line 1179 + 66 bytes NS_CreateScriptContext(nsIScriptGlobalObject * 0x0461d028, nsIScriptContext * * 0x0108a19c) line 1757 + 27 bytes nsDOMSOFactory::NewScriptContext(nsDOMSOFactory * const 0x0106eba0, nsIScriptGlobalObject * 0x0461d028, nsIScriptContext * * 0x0108a19c) line 155 + 13 bytes nsDocShell::EnsureScriptEnvironment(nsDocShell * const 0x0108a0e8) line 6604 + 68 bytes nsWebShell::GetInterface(nsWebShell * const 0x0108a110, const nsID & {...}, void * * 0x0012f4fc) line 298 + 19 bytes nsGetInterface::operator()(const nsID & {...}, void * * 0x0012f4fc) line 53 + 31 bytes nsCOMPtr<nsIScriptGlobalObject>::assign_from_helper(const nsCOMPtr_helper & {...}, const nsID & {...}) line 922 + 18 bytes nsCOMPtr<nsIScriptGlobalObject>::nsCOMPtr<nsIScriptGlobalObject>(const nsCOMPtr_helper & {...}) line 554 nsWindowWatcher::ReadyOpenedDocShellItem(nsIDocShellTreeItem * 0x0108a0ec, nsIDOMWindow * 0x00000000, nsIDOMWindow * * 0x0012fa40) line 1450 + 27 bytes nsWindowWatcher::OpenWindowJS(nsWindowWatcher * const 0x0104b8ec, nsIDOMWindow * 0x00000000, const char * 0x045f6010, const char * 0x0427d954, const char * 0x0427d58c, int 1, unsigned int 1, long * 0x045f56a0, nsIDOMWindow * * 0x0012fa40) line 640 + 22 bytes nsWindowWatcher::OpenWindow(nsWindowWatcher * const 0x0104b8e8, nsIDOMWindow * 0x00000000, const char * 0x045f6010, const char * 0x0427d954, const char * 0x0427d58c, nsISupports * 0x0107aab8, nsIDOMWindow * * 0x0012fa40) line 459 + 48 bytes nsProfile::LoadDefaultProfileDir(nsCString & {...}, int 1) line 523 + 94 bytes nsProfile::StartupWithArgs(nsProfile * const 0x04616578, nsICmdLineService * 0x01037d80, int 1) line 355 + 16 bytes nsAppShellService::DoProfileStartup(nsAppShellService * const 0x01084330, nsICmdLineService * 0x01037d80, int 1) line 266 + 31 bytes InitializeProfileService(nsICmdLineService * 0x01037d80) line 1175 + 31 bytes main1(int 1, char * * 0x002e44d0, nsISupports * 0x002d6f08) line 1454 + 14 bytes main(int 1, char * * 0x002e44d0) line 1902 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e87903() So there are lots of those... eventually... ###!!! ASSERTION: Redeclaration of DOM classinfo interface list!: '!d.mInterfaces', file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2135 Break: at file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2135 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2187 WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file i:/build/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 2624 WARNING: NS_ENSURE_TRUE(foundInterface) failed, file i:/build/mozilla/dom/src/base/nsGlobalWindow.cpp, line 5131 ###!!! ASSERTION: This is not supposed to fail!: 'Error', file i:/build/mozilla/js/src/xpconnect/src/nsXPConnect.cpp, line 411 Break: at file i:/build/mozilla/js/src/xpconnect/src/nsXPConnect.cpp, line 411 NTDLL! 77f9f9df() nsDebug::Assertion(const char * 0x045c1170, const char * 0x10137b00, const char * 0x045c1194, int 411) line 280 + 13 bytes nsDebug::Error(const char * 0x045c1170, const char * 0x045c1194, int 411) line 463 + 22 bytes XPC3250.DLL! 045680c8() XPC3250.DLL! 045686d7() nsJSContext::InitContext(nsJSContext * const 0x0461d1e8, nsIScriptGlobalObject * 0x0461d028) line 1179 + 66 bytes NS_CreateScriptContext(nsIScriptGlobalObject * 0x0461d028, nsIScriptContext * * 0x0108a19c) line 1757 + 27 bytes nsDOMSOFactory::NewScriptContext(nsDOMSOFactory * const 0x0106eba0, nsIScriptGlobalObject * 0x0461d028, nsIScriptContext * * 0x0108a19c) line 155 + 13 bytes nsDocShell::EnsureScriptEnvironment(nsDocShellService * const 0x01084330, nsICmdLineService * 0x01037d80, int 1) line 266 + 31 bytes InitializeProfileService(nsICmdLineService * 0x01037d80) line 1175 + 31 bytes main1(int 1, char * * 0x002e44d0, nsISupports * 0x002d6f08) line 1454 + 14 bytes main(int 1, char * * 0x002e44d0) line 1902 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e87903() [bug #5] another not supposed to fail rv is dropped --- nsDocShell::SetVisibility(nsDocShell * const 0x04429e6c, int 1) line 3267 nsXULWindow::SetVisibility(nsXULWindow * const 0x0442c0e8, int 1) line 654 nsXULWindow::OnChromeLoaded() line 853 nsWebShellWindow::OnStateChange(nsWebShellWindow * const 0x0442c14c, nsIWebProgress * 0x0443146c, nsIRequest * 0x044b3768, unsigned int 786448, unsigned int 0) line 1305 nsDocLoaderImpl::FireOnStateChange(nsIWebProgress * 0x0443146c, nsIRequest * 0x044b3768, int 786448, unsigned int 0) line 1235 nsDocLoaderImpl::doStopDocumentLoad(nsIRequest * 0x044b3768, unsigned int 0) line 871 nsDocLoaderImpl::DocLoaderIsEmpty() line 768 nsDocLoaderImpl::OnStopRequest(nsDocLoaderImpl * const 0x0443145c, nsIRequest * 0x045bd360, nsISupports * 0x00000000, unsigned int 0) line 699 nsLoadGroup::RemoveRequest(nsLoadGroup * const 0x04431330, nsIRequest * 0x045bd360, nsISupports * 0x00000000, unsigned int 0) line 694 + 35 bytes nsJARChannel::OnStopRequest(nsJARChannel * const 0x045bd364, nsIRequest * 0x045bd4c4, nsISupports * 0x00000000, unsigned int 0) line 612 nsOnStopRequestEvent::HandleEvent() line 213 nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x04572534) line 116 PL_HandleEvent(PLEvent * 0x04572534) line 644 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x010984d8) line 574 + 9 bytes _md_EventReceiverProc(HWND__ * 0x000a0ce8, unsigned int 49306, unsigned int 0, long 17401048) line 1335 + 9 bytes USER32! 77e13eb0() USER32! 77e1401a() USER32! 77e192da() nsXULWindow::ShowModal(nsXULWindow * const 0x0442c0f0) line 301 nsWebShellWindow::ShowModal(nsWebShellWindow * const 0x0442c0f0) line 1109 nsContentTreeOwner::ShowAsModal(nsContentTreeOwner * const 0x0445e3bc) line 449 nsWindowWatcher::OpenWindowJS(nsWindowWatcher * const 0x0443e324, nsIDOMWindow * 0x00000000, const char * 0x0443d598, const char * 0x046dd954, const char * 0x046dd58c, int 1, unsigned int 1, long * 0x0443d610, nsIDOMWindow * * 0x0012fa40) line 792 nsWindowWatcher::OpenWindow(nsWindowWatcher * const 0x0443e320, nsIDOMWindow * 0x00000000, const char * 0x0443d598, const char * 0x046dd954, const char * 0x046dd58c, nsISupports * 0x0443d8c0, nsIDOMWindow * * 0x0012fa40) line 459 + 48 bytes nsProfile::LoadDefaultProfileDir(nsCString & {...}, int 1) line 523 + 94 bytes nsProfile::StartupWithArgs(nsProfile * const 0x0443ee28, nsICmdLineService * 0x04482ac8, int 1) line 355 + 16 bytes nsAppShellService::DoProfileStartup(nsAppShellService * const 0x04461858, nsICmdLineService * 0x04482ac8, int 1) line 266 + 31 bytes InitializeProfileService(nsICmdLineService * 0x04482ac8) line 1175 + 31 bytes main1(int 1, char * * 0x002e44d0, nsISupports * 0x002d6f08) line 1454 + 14 bytes main(int 1, char * * 0x002e44d0) line 1902 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e87903() DocumentViewerImpl::Show returned 2147500035 ./xpcshell ~/xpcshell.js load ("/home3/timeless/public_html/nsError.js") js> analyze(2147500035) nsresult(2147500035) Module: undefined Severity: 1 Code: 16387 Name: NS_ERROR_INVALID_POINTER NS_IMETHODIMP nsDocShell::SetVisibility(PRBool aVisibility) { if (!mContentViewer) return NS_OK; if (aVisibility) { NS_ENSURE_SUCCESS(EnsureContentViewer(), NS_ERROR_FAILURE); mContentViewer->Show(); <- does not check return value!! } else if (mContentViewer) mContentViewer->Hide(); return NS_OK; } [bug #6] nor does caller: mWindow->Show(aVisibility); nsCOMPtr<nsIWindowMediator> windowMediator(do_GetService(kWindowMediatorCID)); <- msvc says crash goes through here Crash is: nsWindow::ProcessMessage(unsigned int 783, unsigned int 0, long 0, long * 0x0012eea4) line 4316 + 22 bytes nsWindow::WindowProc(HWND__ * 0x00050d1a, unsigned int 783, unsigned int 0, long 0442c14c, nsIWebProgress * 0x0443146c, nsIRequest * 0x044b3768, unsigned int 786448, unsigned int 0) line 1305 nsDocLoaderImpl::FireOnStateChange(nsIWebProgress * 0x0443146c, nsIRequest * 0x044b3768, int 786448, unsigned int 0) line 1235 nsDocLoaderImpl::doStopDocumentLoad(nsIRequest * 0x044b3768, unsigned int 0) line 871 nsDocLoaderImpl::DocLoaderIsEmpty() line 768 nsDocLoaderImpl::OnStopRequest(nsDocLoaderImpl * const 0x0443145c, nsIRequest * 0x045bd360, nsISupports * 0x00000000, unsigned int 0) line 699 nsLoadGroup::RemoveRequest(nsLoadGroup * const 0x04431330, nsIRequest * 0x045bd360, nsISupports * 0x00000000, unsigned int 0) line 694 + 35 bytes nsJARChannel::OnStopRequest(nsJARChannel * const 0x045bd364, nsIRequest * 0x045bd4c4, nsISupports * 0x00000000, unsigned int 0) line 612 nsOnStopRequestEvent::HandleEvent() line 213 nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x04572534) line 116 PL_HandleEvent(PLEvent * 0x04572534) line 644 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x010984d8) line 574 + 9 bytes _md_EventReceiverProc(HWND__ * 0x000a0ce8, unsigned int 49306, unsigned int 0, long 17401048) line 1335 + 9 bytes USER32! 77e13eb0() USER32! 77e1401a() USER32! 77e192da() nsXULWindow::ShowModal(nsXULWindow * const 0x0442c0f0) line 301 nsWebShellWindow::ShowModal(nsWebShellWindow * const 0x0442c0f0) line 1109 nsContentTreeOwner::ShowAsModal(nsContentTreeOwner * const 0x0445e3bc) line 449 nsWindowWatcher::OpenWindowJS(nsWindowWatcher * const 0x0443e324, nsIDOMWindow * 0x00000000, const char * 0x0443d598, const char * 0x046dd954, const char * 0x046dd58c, int 1, unsigned int 1, long * 0x0443d610, nsIDOMWindow * * 0x0012fa40) line 792 nsWindowWatcher::OpenWindow(nsWindowWatcher * const 0x0443e320, nsIDOMWindow * 0x00000000, const char * 0x0443d598, const char * 0x046dd954, const char * 0x046dd58c, nsISupports * 0x0443d8c0, nsIDOMWindow * * 0x0012fa40) line 459 + 48 bytes nsProfile::LoadDefaultProfileDir(nsCString & {...}, int 1) line 523 + 94 bytes nsProfile::StartupWithArgs(nsProfile * const 0x0443ee28, nsICmdLineService * 0x04482ac8, int 1) line 355 + 16 bytes nsAppShellService::DoProfileStartup(nsAppShellService * const 0x04461858, nsICmdLineService * 0x04482ac8, int 1) line 266 + 31 bytes InitializeProfileService(nsICmdLineService * 0x04482ac8) line 1175 + 31 bytes main1(int 1, char * * 0x002e44d0, nsISupports * 0x002d6f08) line 1454 + 14 bytes main(int 1, char * * 0x002e44d0) line 1902 + 37 bytes mainCRTStartup() line 338 + 17 bytes KERNEL32! 77e87903()
I don't follow your line of reasoning, but if propagating the error code out of SetVisibility is actually useful, go for it. You're sure the thousand error party wouldn't just move down to the next house?
QA Contact: adamlock → docshell
Crash Signature: [@ nsWindow::ProcessMessage]
This bug has no information on current versions and no clear lead as to what the crashes that it tracks are. This should either be updated with current info and reopened or new bugs be filed on concrete actions/crashes on current code.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.