Closed Bug 339022 Opened 18 years ago Closed 18 years ago

Assertion failure: !JS_IsExceptionPending(cx) on Startup for SeaMonkey XUL App Linux builds

Categories

(Core :: XBL, defect)

defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: standard8, Assigned: dbaron)

References

Details

(Keywords: crash, fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

I'm working on suiterunner (SeaMonkey + MOZ_XUL_APP = 1) debug builds - release builds appear to be fine. For the last couple of days, I've been getting the following failure on startup when trying to start browser:

Assertion failure: !JS_IsExceptionPending(cx), at /opt/mozmaster/mozilla/js/src/jsiter.c:540
./run-mozilla.sh: line 131: 15347 Trace/breakpoint trap   "$prog" ${1+"$@"}

Attempting to bring up about: (from the address book window for instance) also crashes in the same way.

I've been told to file a bug here because any crash in js engine is bad apparently.

The stack from ddd is:

#0  JS_Assert (s=0x400e6cb3 "!JS_IsExceptionPending(cx)", file=0x400e6cd0 "/opt/mozmaster/mozilla/js/src/jsiter.c", ln=540) at /opt/mozmaster/mozilla/js/src/jsutil.c:62
#1  0x40096699 in js_ThrowStopIteration (cx=0x83ddcc8, obj=0x88de198) at /opt/mozmaster/mozilla/js/src/jsiter.c:540
#2  0x4009579d in iterator_next (cx=0x83ddcc8, obj=0x88de198, argc=0, argv=0x0, rval=0xbf7fdca4) at /opt/mozmaster/mozilla/js/src/jsiter.c:251
#3  0x400961a4 in js_CallIteratorNext (cx=0x83ddcc8, iterobj=0x88de198, flags=<value optimized out>, idp=0xbf7fdc78, rval=0xbf7fdca4) at /opt/mozmaster/mozilla/js/src/jsiter.c:443
#4  0x40083b22 in js_Interpret (cx=0x83ddcc8, pc=0x88cc753 "=", result=0xbf7fdd5c) at /opt/mozmaster/mozilla/js/src/jsinterp.c:2672
#5  0x40080547 in js_Invoke (cx=0x83ddcc8, argc=0, flags=2) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1347
#6  0x400807ca in js_InternalInvoke (cx=0x83ddcc8, obj=0x881d498, fval=93, flags=0, argc=0, argv=0x0, rval=0xbf7fdee8) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1422
#7  0x40056919 in JS_CallFunctionValue (cx=0x83ddcc8, obj=0x881d498, fval=143515864, argc=0, argv=0x0, rval=0xbf7fdee8) at /opt/mozmaster/mozilla/js/src/jsapi.c:4313
#8  0x42122c8b in nsXBLProtoImplAnonymousMethod::Execute (this=0x88b6570, aBoundElement=0x85ed5f0) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp:344
#9  0x42117a54 in nsXBLPrototypeBinding::BindingAttached (this=0x5d, aBoundElement=0x85ed5f0) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp:386
#10 0x42115ed0 in nsXBLBinding::ExecuteAttachedHandler (this=0x8892b58) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLBinding.cpp:782
#11 0x42115eaf in nsXBLBinding::ExecuteAttachedHandler (this=0x88b5398) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLBinding.cpp:779
#12 0x421acba5 in nsElementSH::PostCreate (this=0x84b32a0, wrapper=0x88014c0, cx=0x83ddcc8, obj=0x881d498) at /opt/mozmaster/mozilla/dom/src/base/nsDOMClassInfo.cpp:6875
#13 0x40e8dedc in XPCWrappedNative::GetNewOrUsed (ccx=@0xbf7fe4ec, Object=0x85ed60c, Scope=0x83eca58, Interface=0x84ab9e0, resultWrapper=0xbf7fe158) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:461
#14 0x40e6b7b8 in XPCConvert::NativeInterface2JSObject (ccx=@0xbf7fe4ec, dest=0xbf7fe1b4, src=0x85ed60c, iid=0xbf7fe450, scope=0x8346348, allowNativeWrapper=1, pErr=0xbf7fe474) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcconvert.cpp:1064
#15 0x40e6e81d in XPCConvert::NativeData2JS (ccx=@0xbf7fe4ec, d=0xbf7fe470, s=0xbf7fe3d0, type=@0xbf7fe481, iid=0xbf7fe450, scope=0x8346348, pErr=0xbf7fe474) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcconvert.cpp:466
#16 0x40e8b66a in XPCWrappedNative::CallMethod (ccx=@0xbf7fe4ec, mode=XPCWrappedNative::CALL_METHOD) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:2234
#17 0x40e934c1 in XPC_WN_CallMethod (cx=0x83ddcc8, obj=0x8346348, argc=1, argv=0x8884164, vp=0xbf7fe630) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1445
#18 0x400804d6 in js_Invoke (cx=0x83ddcc8, argc=1, flags=0) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1328
#19 0x4008caa0 in js_Interpret (cx=0x83ddcc8, pc=0x845b0ae "=", result=0xbf7fe94c) at /opt/mozmaster/mozilla/js/src/jsinterp.c:3982
#20 0x40080547 in js_Invoke (cx=0x83ddcc8, argc=1, flags=2) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1347
#21 0x400807ca in js_InternalInvoke (cx=0x83ddcc8, obj=0x83e2d08, fval=93, flags=0, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1422
#22 0x40056919 in JS_CallFunctionValue (cx=0x83ddcc8, obj=0x83e2d08, fval=139151656, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/js/src/jsapi.c:4313
#23 0x42162b71 in nsJSContext::CallEventHandler (this=0x83ddc88, aTarget=0x83e2d08, aHandler=0x84b4928, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/dom/src/base/nsJSEnvironment.cpp:1428
#24 0x421b9ba0 in nsJSEventListener::HandleEvent (this=0x85c4d30, aEvent=0x83e9b98) at /opt/mozmaster/mozilla/dom/src/events/nsJSEventListener.cpp:186
#25 0x42003341 in nsEventListenerManager::HandleEventSubType (this=0x85c4880, aListenerStruct=0x85c4d88, aListener=0x85c4d30, aDOMEvent=0x83e9b98, aCurrentTarget=0x83dda78, aSubType=1, aPhaseFlags=6) at /opt/mozmaster/mozilla/content/events/src/nsEventListenerManager.cpp:1631
#26 0x42005407 in nsEventListenerManager::HandleEvent (this=0x85c4880, aPresContext=0x85c1f08, aEvent=0xbf7ff058, aDOMEvent=0xbf7fef1c, aCurrentTarget=0x83dda78, aFlags=6, aEventStatus=0xbf7fef20) at /opt/mozmaster/mozilla/content/events/src/nsEventListenerManager.cpp:1732
#27 0x4202483c in nsEventTargetChainItem::HandleEvent (this=0xbf7fefe8, aVisitor=@0xbf7fef14, aFlags=6) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:334
#28 0x42024981 in nsEventTargetChainItem::HandleEventTargetChain (this=0xbf7fef5c, aVisitor=@0xbf7fef14, aFlags=6, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:453
#29 0x42024c1d in nsEventTargetChainItem::CreateChainAndHandleEvent (this=0xbf7fef5c, aVisitor=@0xbf7fefc4, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:401
#30 0x42024bd7 in nsEventTargetChainItem::CreateChainAndHandleEvent (this=0xbf7fefe8, aVisitor=@0xbf7fefc4, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:392
#31 0x42024eaf in nsEventDispatcher::Dispatch (aTarget=0x83dda78, aPresContext=0x85c1f08, aEvent=0xbf7ff058, aDOMEvent=0x0, aEventStatus=0xbf7ff0b0, aCallback=0x0, aTargetIsChromeHandler=0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:575
#32 0x41da0c88 in DocumentViewerImpl::LoadComplete (this=0x83d9bc0, aStatus=0) at /opt/mozmaster/mozilla/layout/base/nsDocumentViewer.cpp:1064
#33 0x4141f7db in nsDocShell::EndPageLoad (this=0x83d81d0, aProgress=0x83d81e4, aChannel=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsDocShell.cpp:4853
#34 0x4143a175 in nsWebShell::EndPageLoad (this=0x83d81d0, aProgress=0x83d81e4, channel=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsWebShell.cpp:870
#35 0x41411ed8 in nsDocShell::OnStateChange (this=0x83d81d0, aProgress=0x83d81e4, aRequest=0x83ff4f8, aStateFlags=131088, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsDocShell.cpp:4768
#36 0x4144df2e in nsDocLoader::FireOnStateChange (this=0x83d81d0, aProgress=0x83d81e4, aRequest=0x83ff4f8, aStateFlags=131088, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:1214
#37 0x4144e1b7 in nsDocLoader::doStopDocumentLoad (this=0x83d81d0, request=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:837
#38 0x4144e301 in nsDocLoader::DocLoaderIsEmpty (this=0x83d81d0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:743
#39 0x4144eb89 in nsDocLoader::OnStopRequest (this=0x83d81d0, aRequest=0x8805558, aCtxt=0x0, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:662
#40 0x40f3c8b8 in nsLoadGroup::RemoveRequest (this=0x83d85b0, request=0x8805558, ctxt=0x0, aStatus=0) at /opt/mozmaster/mozilla/netwerk/base/src/nsLoadGroup.cpp:685
#41 0x4241a66f in imgRequestProxy::RemoveFromLoadGroup (this=0x8805558, releaseLoadGroup=1) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequestProxy.cpp:159
#42 0x4241a7d1 in imgRequestProxy::OnStopRequest (this=0x8805558, request=0x8804dd8, ctxt=0x0, statusCode=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequestProxy.cpp:482
#43 0x4241761e in imgRequest::OnStopRequest (this=0x8804bb0, aRequest=0x8804dd8, ctxt=0x0, status=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequest.cpp:738
#44 0x4241080a in ProxyListener::OnStopRequest (this=0x88051f0, aRequest=0x8804dd8, ctxt=0x0, status=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgLoader.cpp:868
#45 0x4127de4c in nsJARChannel::OnStopRequest (this=0x8804dd8, req=0x8805340, ctx=0x0, status=0) at /opt/mozmaster/mozilla/modules/libjar/nsJARChannel.cpp:749
#46 0x40f323cf in nsInputStreamPump::OnStateStop (this=0x8805340) at /opt/mozmaster/mozilla/netwerk/base/src/nsInputStreamPump.cpp:566
#47 0x40f324af in nsInputStreamPump::OnInputStreamReady (this=0x8805340, stream=0x88053dc) at /opt/mozmaster/mozilla/netwerk/base/src/nsInputStreamPump.cpp:391
#48 0x40199627 in nsInputStreamReadyEvent::Run (this=0x8804c40) at /opt/mozmaster/mozilla/xpcom/io/nsStreamUtils.cpp:111
#49 0x401c0c74 in nsThread::ProcessNextEvent (this=0x806cd40, mayWait=1, result=0x0) at /opt/mozmaster/mozilla/xpcom/threads/nsThread.cpp:482
#50 0x401603ca in NS_ProcessNextEvent_P (thread=0x806cd40, mayWait=1) at nsThreadUtils.cpp:225
#51 0x419b0e95 in nsBaseAppShell::Run (this=0x8089820) at /opt/mozmaster/mozilla/widget/src/xpwidgets/nsBaseAppShell.cpp:153
#52 0x414904cd in nsAppStartup::Run (this=0x81a8f20) at /opt/mozmaster/mozilla/toolkit/components/startup/src/nsAppStartup.cpp:171
#53 0x401022bb in XRE_main (argc=1, argv=0xbf7fff14, aAppData=0x8049840) at /opt/mozmaster/mozilla/toolkit/xre/nsAppRunner.cpp:2343
#54 0x08048683 in main (argc=1, argv=0xbf7fff14) at /opt/mozmaster/mozilla/suite/app/nsSuiteApp.cpp:62
(gdb) #0  JS_Assert (s=0x400e6cb3 "!JS_IsExceptionPending(cx)", file=0x400e6cd0 "/opt/mozmaster/mozilla/js/src/jsiter.c", ln=540) at /opt/mozmaster/mozilla/js/src/jsutil.c:62
#1  0x40096699 in js_ThrowStopIteration (cx=0x83ddcc8, obj=0x88de198) at /opt/mozmaster/mozilla/js/src/jsiter.c:540
#2  0x4009579d in iterator_next (cx=0x83ddcc8, obj=0x88de198, argc=0, argv=0x0, rval=0xbf7fdca4) at /opt/mozmaster/mozilla/js/src/jsiter.c:251
#3  0x400961a4 in js_CallIteratorNext (cx=0x83ddcc8, iterobj=0x88de198, flags=<value optimized out>, idp=0xbf7fdc78, rval=0xbf7fdca4) at /opt/mozmaster/mozilla/js/src/jsiter.c:443
#4  0x40083b22 in js_Interpret (cx=0x83ddcc8, pc=0x88cc753 "=", result=0xbf7fdd5c) at /opt/mozmaster/mozilla/js/src/jsinterp.c:2672
#5  0x40080547 in js_Invoke (cx=0x83ddcc8, argc=0, flags=2) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1347
#6  0x400807ca in js_InternalInvoke (cx=0x83ddcc8, obj=0x881d498, fval=93, flags=0, argc=0, argv=0x0, rval=0xbf7fdee8) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1422
#7  0x40056919 in JS_CallFunctionValue (cx=0x83ddcc8, obj=0x881d498, fval=143515864, argc=0, argv=0x0, rval=0xbf7fdee8) at /opt/mozmaster/mozilla/js/src/jsapi.c:4313
#8  0x42122c8b in nsXBLProtoImplAnonymousMethod::Execute (this=0x88b6570, aBoundElement=0x85ed5f0) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLProtoImplMethod.cpp:344
#9  0x42117a54 in nsXBLPrototypeBinding::BindingAttached (this=0x5d, aBoundElement=0x85ed5f0) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp:386
#10 0x42115ed0 in nsXBLBinding::ExecuteAttachedHandler (this=0x8892b58) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLBinding.cpp:782
#11 0x42115eaf in nsXBLBinding::ExecuteAttachedHandler (this=0x88b5398) at /opt/mozmaster/mozilla/content/xbl/src/nsXBLBinding.cpp:779
#12 0x421acba5 in nsElementSH::PostCreate (this=0x84b32a0, wrapper=0x88014c0, cx=0x83ddcc8, obj=0x881d498) at /opt/mozmaster/mozilla/dom/src/base/nsDOMClassInfo.cpp:6875
#13 0x40e8dedc in XPCWrappedNative::GetNewOrUsed (ccx=@0xbf7fe4ec, Object=0x85ed60c, Scope=0x83eca58, Interface=0x84ab9e0, resultWrapper=0xbf7fe158) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:461
#14 0x40e6b7b8 in XPCConvert::NativeInterface2JSObject (ccx=@0xbf7fe4ec, dest=0xbf7fe1b4, src=0x85ed60c, iid=0xbf7fe450, scope=0x8346348, allowNativeWrapper=1, pErr=0xbf7fe474) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcconvert.cpp:1064
#15 0x40e6e81d in XPCConvert::NativeData2JS (ccx=@0xbf7fe4ec, d=0xbf7fe470, s=0xbf7fe3d0, type=@0xbf7fe481, iid=0xbf7fe450, scope=0x8346348, pErr=0xbf7fe474) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcconvert.cpp:466
#16 0x40e8b66a in XPCWrappedNative::CallMethod (ccx=@0xbf7fe4ec, mode=XPCWrappedNative::CALL_METHOD) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp:2234
#17 0x40e934c1 in XPC_WN_CallMethod (cx=0x83ddcc8, obj=0x8346348, argc=1, argv=0x8884164, vp=0xbf7fe630) at /opt/mozmaster/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1445
#18 0x400804d6 in js_Invoke (cx=0x83ddcc8, argc=1, flags=0) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1328
#19 0x4008caa0 in js_Interpret (cx=0x83ddcc8, pc=0x845b0ae "=", result=0xbf7fe94c) at /opt/mozmaster/mozilla/js/src/jsinterp.c:3982
#20 0x40080547 in js_Invoke (cx=0x83ddcc8, argc=1, flags=2) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1347
#21 0x400807ca in js_InternalInvoke (cx=0x83ddcc8, obj=0x83e2d08, fval=93, flags=0, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/js/src/jsinterp.c:1422
#22 0x40056919 in JS_CallFunctionValue (cx=0x83ddcc8, obj=0x83e2d08, fval=139151656, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/js/src/jsapi.c:4313
#23 0x42162b71 in nsJSContext::CallEventHandler (this=0x83ddc88, aTarget=0x83e2d08, aHandler=0x84b4928, argc=1, argv=0xbf7fec04, rval=0xbf7febf4) at /opt/mozmaster/mozilla/dom/src/base/nsJSEnvironment.cpp:1428
#24 0x421b9ba0 in nsJSEventListener::HandleEvent (this=0x85c4d30, aEvent=0x83e9b98) at /opt/mozmaster/mozilla/dom/src/events/nsJSEventListener.cpp:186
#25 0x42003341 in nsEventListenerManager::HandleEventSubType (this=0x85c4880, aListenerStruct=0x85c4d88, aListener=0x85c4d30, aDOMEvent=0x83e9b98, aCurrentTarget=0x83dda78, aSubType=1, aPhaseFlags=6) at /opt/mozmaster/mozilla/content/events/src/nsEventListenerManager.cpp:1631
#26 0x42005407 in nsEventListenerManager::HandleEvent (this=0x85c4880, aPresContext=0x85c1f08, aEvent=0xbf7ff058, aDOMEvent=0xbf7fef1c, aCurrentTarget=0x83dda78, aFlags=6, aEventStatus=0xbf7fef20) at /opt/mozmaster/mozilla/content/events/src/nsEventListenerManager.cpp:1732
#27 0x4202483c in nsEventTargetChainItem::HandleEvent (this=0xbf7fefe8, aVisitor=@0xbf7fef14, aFlags=6) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:334
#28 0x42024981 in nsEventTargetChainItem::HandleEventTargetChain (this=0xbf7fef5c, aVisitor=@0xbf7fef14, aFlags=6, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:453
#29 0x42024c1d in nsEventTargetChainItem::CreateChainAndHandleEvent (this=0xbf7fef5c, aVisitor=@0xbf7fefc4, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:401
#30 0x42024bd7 in nsEventTargetChainItem::CreateChainAndHandleEvent (this=0xbf7fefe8, aVisitor=@0xbf7fefc4, aCallback=0x0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:392
#31 0x42024eaf in nsEventDispatcher::Dispatch (aTarget=0x83dda78, aPresContext=0x85c1f08, aEvent=0xbf7ff058, aDOMEvent=0x0, aEventStatus=0xbf7ff0b0, aCallback=0x0, aTargetIsChromeHandler=0) at /opt/mozmaster/mozilla/content/events/src/nsEventDispatcher.cpp:575
#32 0x41da0c88 in DocumentViewerImpl::LoadComplete (this=0x83d9bc0, aStatus=0) at /opt/mozmaster/mozilla/layout/base/nsDocumentViewer.cpp:1064
#33 0x4141f7db in nsDocShell::EndPageLoad (this=0x83d81d0, aProgress=0x83d81e4, aChannel=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsDocShell.cpp:4853
#34 0x4143a175 in nsWebShell::EndPageLoad (this=0x83d81d0, aProgress=0x83d81e4, channel=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsWebShell.cpp:870
#35 0x41411ed8 in nsDocShell::OnStateChange (this=0x83d81d0, aProgress=0x83d81e4, aRequest=0x83ff4f8, aStateFlags=131088, aStatus=0) at /opt/mozmaster/mozilla/docshell/base/nsDocShell.cpp:4768
#36 0x4144df2e in nsDocLoader::FireOnStateChange (this=0x83d81d0, aProgress=0x83d81e4, aRequest=0x83ff4f8, aStateFlags=131088, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:1214
#37 0x4144e1b7 in nsDocLoader::doStopDocumentLoad (this=0x83d81d0, request=0x83ff4f8, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:837
#38 0x4144e301 in nsDocLoader::DocLoaderIsEmpty (this=0x83d81d0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:743
#39 0x4144eb89 in nsDocLoader::OnStopRequest (this=0x83d81d0, aRequest=0x8805558, aCtxt=0x0, aStatus=0) at /opt/mozmaster/mozilla/uriloader/base/nsDocLoader.cpp:662
#40 0x40f3c8b8 in nsLoadGroup::RemoveRequest (this=0x83d85b0, request=0x8805558, ctxt=0x0, aStatus=0) at /opt/mozmaster/mozilla/netwerk/base/src/nsLoadGroup.cpp:685
#41 0x4241a66f in imgRequestProxy::RemoveFromLoadGroup (this=0x8805558, releaseLoadGroup=1) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequestProxy.cpp:159
#42 0x4241a7d1 in imgRequestProxy::OnStopRequest (this=0x8805558, request=0x8804dd8, ctxt=0x0, statusCode=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequestProxy.cpp:482
#43 0x4241761e in imgRequest::OnStopRequest (this=0x8804bb0, aRequest=0x8804dd8, ctxt=0x0, status=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgRequest.cpp:738
#44 0x4241080a in ProxyListener::OnStopRequest (this=0x88051f0, aRequest=0x8804dd8, ctxt=0x0, status=0) at /opt/mozmaster/mozilla/modules/libpr0n/src/imgLoader.cpp:868
#45 0x4127de4c in nsJARChannel::OnStopRequest (this=0x8804dd8, req=0x8805340, ctx=0x0, status=0) at /opt/mozmaster/mozilla/modules/libjar/nsJARChannel.cpp:749
#46 0x40f323cf in nsInputStreamPump::OnStateStop (this=0x8805340) at /opt/mozmaster/mozilla/netwerk/base/src/nsInputStreamPump.cpp:566
#47 0x40f324af in nsInputStreamPump::OnInputStreamReady (this=0x8805340, stream=0x88053dc) at /opt/mozmaster/mozilla/netwerk/base/src/nsInputStreamPump.cpp:391
#48 0x40199627 in nsInputStreamReadyEvent::Run (this=0x8804c40) at /opt/mozmaster/mozilla/xpcom/io/nsStreamUtils.cpp:111
#49 0x401c0c74 in nsThread::ProcessNextEvent (this=0x806cd40, mayWait=1, result=0x0) at /opt/mozmaster/mozilla/xpcom/threads/nsThread.cpp:482
#50 0x401603ca in NS_ProcessNextEvent_P (thread=0x806cd40, mayWait=1) at nsThreadUtils.cpp:225
#51 0x419b0e95 in nsBaseAppShell::Run (this=0x8089820) at /opt/mozmaster/mozilla/widget/src/xpwidgets/nsBaseAppShell.cpp:153
#52 0x414904cd in nsAppStartup::Run (this=0x81a8f20) at /opt/mozmaster/mozilla/toolkit/components/startup/src/nsAppStartup.cpp:171
#53 0x401022bb in XRE_main (argc=1, argv=0xbf7fff14, aAppData=0x8049840) at /opt/mozmaster/mozilla/toolkit/xre/nsAppRunner.cpp:2343
#54 0x08048683 in main (argc=1, argv=0xbf7fff14) at /opt/mozmaster/mozilla/suite/app/nsSuiteApp.cpp:62
This is almost certainly not a JS engine bug.

First, you need to dig into what the pending exception that was ignored is: in a debugger (I'll use gdb syntax),

p/x cx->exception

If the value looks like a pointer and is 0 mod 8,

p *(JSObject *)$
p *(JSClass *)($->slots[2]-1)

If it's 4 mod 8,

p *(JSString *)($-4)
x/Nch $.chars

where N is the value of $.length (the JSString.length member).

Also, go to the nearest js_Interpret frame (frame 4 in the stack in comment 0) and do

p *script
call js_PCToLineNumber(cx, script, pc)

The last command may require you to stop in JS_Assert before it delivers the SIGABRT or equivalent.

Something is failing to propagate a JS exception, yet also failing to clear it. Presumption of guilt is wrong, and I'm not blaming Suiterunner, but this should start out in the reporting app's bugzilla product and a "general" component.

/be
Component: JavaScript Engine → General
Product: Core → Mozilla Application Suite
Assignee: general → general
QA Contact: general → general
> This is almost certainly not a JS engine bug.
> 
> Something is failing to propagate a JS exception, yet also failing to clear it.
> Presumption of guilt is wrong, and I'm not blaming Suiterunner, but this should
> start out in the reporting app's bugzilla product and a "general" component.

Ok, my apologies, thank you for the useful debugging tips.

(gdb) print *script
$1 = {code = 0x8b8c948 ";", length = 90, main = 0x8b8c948 ";", version = 0, numGlobalVars = 0, atomMap = {vector = 0x8b8c9d0, length = 8}, filename = 0x8b75a51 "chrome://global/content/autocomplete.xml", lineno = 1531, depth = 8, trynotes = 0x0, principals = 0x81b06a4, object = 0x0}(In reply to comment #1)

So, lxr gives that here:

http://lxr.mozilla.org/seamonkey/source/xpfe/components/autocomplete/resources/content/autocomplete.xml#1531

I'm guessing this could be due to suiterunner not having got toolbars set up correctly, but why do release builds seem to be ok?

Neil - have we changed anything in this area recently that may now be causing this? (I'm thinking the last week or two). Alternately, any ideas as to the fix?
Blocks: suiterunner
(In reply to comment #2)
>I'm guessing this could be due to suiterunner not having got toolbars set up
You say that you can open the address book window; what about the Compose window? Its autocomplete isn't in a primary toolbar.

>Alternately, any ideas as to the fix?
Maybe if there was a way to find out what the exception was?
(In reply to comment #3)
> Maybe if there was a way to find out what the exception was?

See comment 1.

/be
So can someone debug cx->exception per comment 1 and report back?

/be
(In reply to comment #5)
> So can someone debug cx->exception per comment 1 and report back?
> 
> /be
> 
The best I've got for that so far is:

{name = 0x400e0e9b "Error", flags = 285212673, addProperty = 0x40051d1a <JS_PropertyStub>, delProperty = 0x40051d1a <JS_PropertyStub>, getProperty = 0x40051d1a <JS_PropertyStub>, setProperty = 0x40051d1a <JS_PropertyStub>, enumerate = 0x40051d24 <JS_EnumerateStub>, resolve = 0x40051d2e <JS_ResolveStub>, convert = 0x40051d38 <JS_ConvertStub>, finalize = 0x40074f99 <exn_finalize>, getObjectOps = 0, checkAccess = 0, call = 0, construct = 0x400760e9 <Exception>, xdrObject = 0, hasInstance = 0, mark = 0, reserveSlots = 0}

(In reply to comment #3)
> (In reply to comment #2)
> >I'm guessing this could be due to suiterunner not having got toolbars set up
> You say that you can open the address book window; what about the Compose
> window? Its autocomplete isn't in a primary toolbar.

The compose window starts up fine. Though I haven't tried using it as I haven't got a full profile up and running.
From a debugging session on IRC:

Standard8	brendan, a try/catch didn't seem to work around here: http://lxr.mozilla.org/seamonkey/source/xpfe/components/autocomplete/resources/content/autocomplete.xml#1531
gavin	Standard8: is it the "for (var name in aAttrs)" construct that's causing the problem?
Standard8	brendan, so I commented out lines 1533-1534, and p *script says its now crashing at http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/navigator.js#78
gavin	Standard8: maybe related to bug 338307 ?
Standard8	gavin, I belive I've already pulled in mrbkap's patch for jsiter.c / bug 338307
Standard8	I was hoping that was the fix.
brendan	gavin: that bug would not lose an exception
brendan	we need to find out who threw the exception that is pending when StopIteration is about to be thrown

Standard8	right I'm in gdb, I've got a breakpoint on JS_Assert which I'm at.
brendan	p *(JSObject *)cx.exception
brendan	p *(JSClass*)($.slots[2]-1)

Standard8	brendan, I have p *(JSClass*)($.slots[2]-1), do you want to see?
brendan	it's "Error", still?
Standard8	yep
brendan	ok, say $1 is the object named by $ in your last line here
brendan	p *$1.map

Standard8	{nrefs = 1, ops = 0x400f46e0, nslots = 8, freeslot = 8}
brendan	ok, x/8x $1.slots

Standard8	0x8a4d46c: 0x08adc4c8 0x08710cf0 0x400f36a1 0x08b65ea1
0x8a4d47c: 0x08adc7cc 0x08adc7d4 0x00000107 0x08adc7ec

mrbkap	Standard8: for fun: p *(JSString*)(0x08adc7ec - 4)
Standard8	$6 = {length = 204, chars = 0x8b66630}

mrbkap	x/30ch $.chars

Standard8	0x8b66630: 40 '(' 41 ')' 64 '@' 99 'c' 104 'h' 114 'r' 111 'o' 109 'm'
0x8b66640: 101 'e' 58 ':' 47 '/' 47 '/' 103 'g' 108 'l' 111 'o' 98 'b'
0x8b66650: 97 'a' 108 'l' 47 '/' 99 'c' 111 'o' 110 'n' 116 't' 101 'e'
0x8b66660: 110 'n' 116 't' 47 '/' 98 'b' 105 'i' 110 'n'
mrbkap	ah, that's the stack.

brendan	Standard8: p *(JSString *)0x08adc7c8
Standard8	{length = 29, chars = 0x8b65da0}

brendan	Standard8: x/29ch $.chars
brendan	and then p *(JSString *)0x08adc7d0
Standard8	0x8b65da0: 116 't' 104 'h' 105 'i' 115 's' 46 '.' 101 'e' 100 'd' 105 'i'
0x8b65db0: 116 't' 111 'o' 114 'r' 32 ' ' 104 'h' 97 'a' 115 's' 32 ' '
0x8b65dc0: 110 'n' 111 'o' 32 ' ' 112 'p' 114 'r' 111 'o' 112 'p' 101 'e'
0x8b65dd0: 114 'r' 116 't' 105 'i' 101 'e' 115 's'

brendan	and x/Nch $.chars for N=$.length
mrbkap	There's your problem.
brendan	cool, that's the message
mrbkap	"this.editor has no properties"
brendan	Standard8: do the other string

Standard8	0x8b65de0: 99 'c' 104 'h' 114 'r' 111 'o' 109 'm' 101 'e' 58 ':' 47 '/'
0x8b65df0: 47 '/' 103 'g' 108 'l' 111 'o' 98 'b' 97 'a' 108 'l' 47 '/'
0x8b65e00: 99 'c' 111 'o' 110 'n' 116 't' 101 'e' 110 'n' 116 't' 47 '/'
0x8b65e10: 98 'b' 105 'i' 110 'n' 100 'd' 105 'i' 110 'n' 103 'g' 115 's'
0x8b65e20: 47 '/' 116 't' 101 'e' 120 'x' 116 't' 98 'b' 111 'o' 120 'x'
0x8b65e30: 46 '.' 120 'x' 109 'm' 108 'l'

brendan	something suppressed propagation of that exception, yet left it pending
brendan	that's bad
mrbkap	I blame XBL.

Standard8	brendan, mrbkap is there a way to find the line number, thought it looks like it could be here: http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/textbox.xml#133
mrbkap	Standard8: In opt builds the assertion goes away and the exception just loses.

mrbkap	Standard8: The C++ code that calls the JS function constructor seems like it needs looking at.
mrbkap	(and the stack from that)
brendan	lineno is 263
brendan	107 hex, from the slots dump
<brendan>	seems like two bugs: one resulting in this.editor has no properties, the other ignoring the exception and returning true or NS_OK
JFTR: I'm seeing the very same problem on Mac OSX 10.4.6 with a SuiteRunner debug build -> All/All.
OS: Linux → All
Hardware: PC → All
So _if_ I'm seeing the same bug, I have more info... My steps to reproduce are to start Firefox and click "Uninstall" for any extension in extension manager.  I get this assert.  The chain of events there seems to be:

1)  init() (from toolkit/mozapps/extensions/content/list.js) gets called
2)  This triggers an XBL constructor for some binding, by creating a wrapper
    for a node.
3)  The constructor throws.
4)  We tell XPConnect that we threw and return an error.  The error return is
    ignored, since nsXBLBinding::ExecuteAttachedHandler is a void method.

Perhaps executing a constructor or destructor should simply report any errors that get thrown and then clear the exception?  It's not like these exceptions should be propagating to any actual JS on the stack anyway, imo.
Attached patch possible patch (obsolete) — Splinter Review
This fixes the assert that Boris and I were seeing doing extension uninstall.  It goes along with the simple ignore-errors philosophy, since apparently changing XBL to do anything else would be hard.  (What we'd probably really want to do is, for constructors, skip the more derived constructors and not install the binding.  But we would want to run the relevant destructors.  And probably always plow through destructors when they throw.)
I see a similar crash in Thunderbird checking for new rss messages. The rss code is in mail/extensions/newsblog/js/newsblog.js. The c++ stack is a little strange because it shows a recursive call to nsRssIncomingServer::GetNewMail(), which doesn't happen. I'll try the patch.

 	js3250.dll!JS_Assert(const char * s=0x005261b4, const char * file=0x00526190, int ln=0x0000022d)  Line 62	C
 	js3250.dll!js_ThrowStopIteration(JSContext * cx=0x033a0140, JSObject * obj=0x04036bd0)  Line 557 + 0x26 bytes	C
 	js3250.dll!iterator_next(JSContext * cx=0x033a0140, JSObject * obj=0x04036bd0, unsigned int argc=0x00000000, long * argv=0x00000000, long * rval=0x0012b5c8)  Line 257 + 0xd bytes	C
 	js3250.dll!js_CallIteratorNext(JSContext * cx=0x033a0140, JSObject * iterobj=0x04036bd0, unsigned int flags=0x00000004, long * idp=0x0012b4dc, long * rval=0x0012b5c8)  Line 461 + 0x15 bytes	C
 	js3250.dll!js_Interpret(JSContext * cx=0x033a0140, unsigned char * pc=0x01f230dd, long * result=0x0012b70c)  Line 2674 + 0x31 bytes	C
 	js3250.dll!js_Invoke(JSContext * cx=0x033a0140, unsigned int argc=0x00000006, unsigned int flags=0x00000002)  Line 1347 + 0x13 bytes	C
 	xpc3250.dll!nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS * wrapper=0x054aed50, unsigned short methodIndex=0x0003, const nsXPTMethodInfo * info=0x0544b9e8, nsXPTCMiniVariant * nativeParams=0x0012ba70)  Line 1380 + 0x14 bytes	C++
 	xpc3250.dll!nsXPCWrappedJS::CallMethod(unsigned short methodIndex=0x0003, const nsXPTMethodInfo * info=0x0544b9e8, nsXPTCMiniVariant * params=0x0012ba70)  Line 466	C++
 	xpcom_core.dll!PrepareAndDispatch(nsXPTCStubBase * self=0x054aed50, unsigned int methodIndex=0x00000003, unsigned int * args=0x0012bb38, unsigned int * stackBytesToPop=0x0012bb28)  Line 117 + 0x1e bytes	C++
 	xpcom_core.dll!SharedStub()  Line 147	C++
>	mail.dll!nsRssIncomingServer::GetNewMail(nsIMsgWindow * aMsgWindow=0x054a3940, nsIUrlListener * aUrlListener=0x03eea708, nsIMsgFolder * aFolder=0x00000000, nsIURI * * _retval=0x04fedca0)  Line 220 + 0x39 bytes	C++
 	mail.dll!nsRssIncomingServer::GetNewMail(nsIMsgWindow * aMsgWindow=0x03d6e120, nsIUrlListener * aUrlListener=0x03eea710, nsIMsgFolder * aFolder=0x03eea708, nsIURI * * _retval=0x00000000)  Line 220 + 0x39 bytes	C++
Attached patch possible patchSplinter Review
More efficient to leave the !ok check.
Attachment #223877 - Attachment is obsolete: true
(In reply to comment #13)
> Created an attachment (id=223941) [edit]
> possible patch
> 
> More efficient to leave the !ok check.
> 

Both these patches work, I now get the text below on the console instead of the assertion, which I think is one of the other bugs that we have in progress:

JavaScript error: chrome://global/content/bindings/textbox.xml, line 132: this.editor has no properties
Attachment #223941 - Flags: superreview?(brendan)
Attachment #223941 - Flags: review?(bzbarsky)
Comment on attachment 223941 [details] [diff] [review]
possible patch

Yeah, this is good.

We'll want this on the 1.8 branch soon for the js1.7 landing.  Presuming the authority to branch approve it.

/be
Attachment #223941 - Flags: superreview?(brendan)
Attachment #223941 - Flags: superreview+
Attachment #223941 - Flags: approval-branch-1.8.1+
Assignee: general → general
Component: General → XBL
Product: Mozilla Application Suite → Core
QA Contact: general → ian
This patch doesn't help my crash - I don't think XBL is involved at all in the problem I'm seeing.
(In reply to comment #16)
> This patch doesn't help my crash - I don't think XBL is involved at all in the
> problem I'm seeing.

Find some JS head on #content and we'll figure out what the pending exception is.  Or if you are game, try looking at cx->exception yourself when that JS_Assert botches (go up one frame, of course):

Print cx->exception in hex, make sure it ends in 0 or 8
Let $obj = *(JSObject *)cx->exception
Look at *(JSClass *)($obj->slots[2]-1)
If the class name is "Error", look at *(JSExnPrivate *)($obj->slots[3]-1)
Also try looking at *(JSString *)($obj->slots[4]-4)
and *(JSString *)($obj->slots[5]-4)
and $obj->slots[6] >> 1
and *(JSString *)($obj->slots[7]-4)

These are message, filename, lineNumber, and stack property values, respectively. All together they should tell a lot (lineNumber unfortunately less so because the XUL preprocessor does not yet take advantage of //@line comments).

/be
Comment on attachment 223941 [details] [diff] [review]
possible patch

Yeah, makes sense.  I assume that bug 299741 continues to be ok with this change, right?
Attachment #223941 - Flags: review?(bzbarsky) → review+
if I've done things right,

classname of (JSClass *)($obj->slots[2]-1) is OBJECT

(JSString *) obj->slots[4]-4 is "chrome://messenger-newsblog/content/Feed.js"

which presumably is the source file. I'll dig around a bit and see if I can pinpoint where it is in the source file.
Did a recent change to the JavaScript engine make this assertion failure easier to hit?  I'm asking because David Bienvenu is seeing it in Thunderbird when feeds-checking is enabled, and I'm seeing it in Firefox sometimes(=can't make a reduced testcase easily) when I use the testcase in bug 326633.
Errors are reported now that weren't before; I don't see a particular testcase there to test, but I think it should improve things.

Also, I should probably put back the "return NS_ERROR_FAILURE".

Fix checked in on trunk and 1.8 branch.

We should probably get other bugs filed on other problems and not try to use this bug for every occurrence of the assertion.
Assignee: general → dbaron
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8.1beta2
This assertion is in a file recently added to the JS engine.
I've filed bug 340019 for the TB issue.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: