Closed Bug 462992 Opened 16 years ago Closed 16 years ago

Assertion running toolkit/components/downloads/test/test_download_manager.js in debug builds

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: Waldo, Assigned: Waldo)

Details

(Keywords: assertion)

Attachments

(1 file)

This prevents |make check| from running to completion, making it impossible to run unit tests in debug builds except piecemeal.

#4  0x017ac27c in Abort (aMsg=0xbfffe05c "###!!! ASSERTION: XPConnect is being called on a scope without a 'Components' property!: 'Error', file /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappednativescope.cpp, line 761") at /Users/jwalden/moz/2/xpcom/base/nsDebugImpl.cpp:372
#5  0x017ac5bf in NS_DebugBreak_P (aSeverity=1, aStr=0x309a6f0 "XPConnect is being called on a scope without a 'Components' property!", aExpr=0x3091c28 "Error", aFile=0x309a560 "/Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappednativescope.cpp", aLine=761) at /Users/jwalden/moz/2/xpcom/base/nsDebugImpl.cpp:355
#6  0x03055179 in DEBUG_CheckForComponentsInScope (ccx=@0xbfffe55c, obj=0xfd1a0, OKIfNotInitialized=0) at /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappednativescope.cpp:761
#7  0x03055af0 in XPCWrappedNativeScope::FindInJSObjectScope (ccx=@0xbfffe55c, obj=0xfd1a0, OKIfNotInitialized=0) at /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappednativescope.cpp:809
#8  0x0303e349 in GetContextFromObject (obj=0xbf660) at /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappedjsclass.cpp:526
#9  0x03040b2c in nsXPCWrappedJSClass::CallMethod (this=0x3376d0, wrapper=0x338a10, methodIndex=3, info=0x2906c70, nativeParams=0xbfffe994) at /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappedjsclass.cpp:1156
#10 0x0303a321 in nsXPCWrappedJS::CallMethod (this=0x338a10, methodIndex=3, info=0x2906c70, params=0xbfffe994) at /Users/jwalden/moz/2/js/src/xpconnect/src/xpcwrappedjs.cpp:563
#11 0x017b44ce in PrepareAndDispatch (self=0x338a00, methodIndex=3, args=0xbfffeab4) at /Users/jwalden/moz/2/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_x86.cpp:93
#12 0x017b452c in nsXPTCStubBase::Stub3 (this=0x338a00) at ../../../../../../dist/include/xpcom/xptcstubsdef.inc:1
#13 0x017b4214 in NS_InvokeByIndex_P (that=0x338a00, methodIndex=3, paramCount=2, params=0x3773d0) at /Users/jwalden/moz/2/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp:179
#14 0x017a8dd1 in nsProxyObjectCallInfo::Run (this=0x3773f0) at /Users/jwalden/moz/2/xpcom/proxy/src/nsProxyEvent.cpp:181
#15 0x017a1907 in nsThread::ProcessNextEvent (this=0x309ac0, mayWait=1, result=0xbfffec1c) at /Users/jwalden/moz/2/xpcom/threads/nsThread.cpp:510
#16 0x0174473b in NS_ProcessNextEvent_P (thread=0x309ac0, mayWait=1) at nsThreadUtils.cpp:227
#17 0x017a1f9a in nsThread::Shutdown (this=0x320240) at /Users/jwalden/moz/2/xpcom/threads/nsThread.cpp:465
#18 0x03fade35 in nsSocketTransportService::Shutdown (this=0x285ac00) at /Users/jwalden/moz/2/netwerk/base/src/nsSocketTransportService2.cpp:445
#19 0x03f8ee78 in nsIOService::SetOffline (this=0x31bc90, offline=1) at /Users/jwalden/moz/2/netwerk/base/src/nsIOService.cpp:618
#20 0x03f90fe6 in nsIOService::Observe (this=0x31bc90, subject=0x30dff4, topic=0x17dce80 "xpcom-shutdown", data=0x0) at /Users/jwalden/moz/2/netwerk/base/src/nsIOService.cpp:789
#21 0x01756697 in nsObserverList::NotifyObservers (this=0x29216dc, aSubject=0x30dff4, aTopic=0x17dce80 "xpcom-shutdown", someData=0x0) at /Users/jwalden/moz/2/xpcom/ds/nsObserverList.cpp:128
#22 0x01756d41 in nsObserverService::NotifyObservers (this=0x31b9a0, aSubject=0x30dff4, aTopic=0x17dce80 "xpcom-shutdown", someData=0x0) at /Users/jwalden/moz/2/xpcom/ds/nsObserverService.cpp:181
#23 0x0174d49d in NS_ShutdownXPCOM_P (servMgr=0x0) at /Users/jwalden/moz/2/xpcom/build/nsXPComInit.cpp:752
#24 0x0005aa45 in NS_ShutdownXPCOM (svcMgr=0x0) at /Users/jwalden/moz/2/xpcom/stub/nsXPComStub.cpp:175
#25 0x00005ce7 in main (argc=11, argv=0xbffff0b8, envp=0xbffff0e8) at /Users/jwalden/moz/2/js/src/xpconnect/shell/xpcshell.cpp:1522

|info->name| in nsXPCWrappedJSClass::CallMethod is 'onSocketAccepted', so the HTTP server is receiving a new connection during shutdown, after the xpcshell scope has been cleared.  I'm also not sure, given this, that the server's been properly shut down.  Still more investigation to do yet...
The download added in test_download_normal doesn't reach the DOWNLOAD_DOWNLOADING state, so there's an imbalance in do_test_pending/do_test_finished calls.  The |getDownloadListener()| listener isn't called because that download doesn't finish and isn't canceled (we start quitting before it can complete), so the server isn't shut down, so when the download is received on the server we're into shutdown and get the assertion.  Looking at a log, the observer doesn't even seem to be used outside of the cancel situation, so we can chop it down to just observe dl-cancel and remove the do_test_finished call in there to fix things.
Attachment #346302 - Flags: review?(sdwilsh)
Attachment #346302 - Flags: review?(sdwilsh) → review+
Comment on attachment 346302 [details] [diff] [review]
Don't unbalance do_test_pending/finished calls in the observer

r=sdwilsh
Landed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: