Closed Bug 515533 Opened 15 years ago Closed 15 years ago

[HTML5] ###!!! ASSERTION: Bad life cycle.: 'mLifeCycle == STREAM_ENDING', file /[...]/parser/html/nsHtml5Parser.cpp, line 772

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mozilla+ben, Unassigned)

References

Details

Attachments

(1 file)

It appears the parser life cycle is still set to PARSING when Terminate is called as a result of changing the document location.

Marking as dependent on bug 499642 because this may be fixed already.  Jesse, can you post your test case?

#0  0x91541e42 in __kill ()
#1  0x91541e34 in kill$UNIX2003 ()
#2  0x915b423a in raise ()
#3  0x0058a445 in Break (aMsg=0xbfffb10c "###!!! ASSERTION: Bad life cycle.: 'mLifeCycle == STREAM_ENDING', file /Users/jruderman/central/parser/html/nsHtml5Parser.cpp, line 772") at /Users/jruderman/central/xpcom/base/nsDebugImpl.cpp:483
#4  0x0058a79c in NS_DebugBreak_P (aSeverity=1, aStr=0x189a02a0 "Bad life cycle.", aExpr=0x189a0284 "mLifeCycle == STREAM_ENDING", aFile=0x1899ff20 "/Users/jruderman/central/parser/html/nsHtml5Parser.cpp", aLine=772) at /Users/jruderman/central/xpcom/base/nsDebugImpl.cpp:354
#5  0x1861a748 in nsHtml5Parser::DidBuildModel (this=0x1b741b10) at /Users/jruderman/central/parser/html/nsHtml5Parser.cpp:772
#6  0x1861c56f in nsHtml5Parser::Terminate (this=0x1b741b10) at /Users/jruderman/central/parser/html/nsHtml5Parser.cpp:440
#7  0x1824d5ab in nsDocument::StopDocumentLoad (this=0x11c5a00) at /Users/jruderman/central/content/base/src/nsDocument.cpp:2246
#8  0x183d8e50 in nsHTMLDocument::StopDocumentLoad (this=0x11c5a00) at /Users/jruderman/central/content/html/document/src/nsHTMLDocument.cpp:989
#9  0x17f72ae1 in DocumentViewerImpl::Stop (this=0x1b741720) at /Users/jruderman/central/layout/base/nsDocumentViewer.cpp:1591
#10 0x17ccc5aa in nsDocShell::Stop (this=0x2076d020, aStopFlags=3) at /Users/jruderman/central/docshell/base/nsDocShell.cpp:3964
#11 0x17cd41bb in nsDocShell::InternalLoad (this=0x2076d020, aURI=0x1b74e7a0, aReferrer=0x1b741830, aOwner=0x1b7417e0, aFlags=0, aWindowTarget=0x1b74e6e0, aTypeHint=0x0, aPostData=0x0, aHeadersData=0x0, aLoadType=142606337, aSHEntry=0x0, aFirstParty=1, aDocShell=0x0, aRequest=0x0) at /Users/jruderman/central/docshell/base/nsDocShell.cpp:7953
#12 0x17cba6b7 in nsDocShell::LoadURI (this=0x2076d020, aURI=0x1b74e7a0, aLoadInfo=0x1b74e6a0, aLoadFlags=0, aFirstParty=1) at /Users/jruderman/central/docshell/base/nsDocShell.cpp:1354
#13 0x1854031f in nsLocation::SetURI (this=0x1b74e0b0, aURI=0x1b74e7a0, aReplace=1) at /Users/jruderman/central/dom/base/nsLocation.cpp:316
#14 0x18540a0d in nsLocation::SetHrefWithBase (this=0x1b74e0b0, aHref=@0xbfffc220, aBase=0x1b741050, aReplace=1) at /Users/jruderman/central/dom/base/nsLocation.cpp:590
#15 0x18540c01 in nsLocation::SetHrefWithContext (this=0x1b74e0b0, cx=0x165aa00, aHref=@0xbfffc220, aReplace=1) at /Users/jruderman/central/dom/base/nsLocation.cpp:537
#16 0x18540d20 in nsLocation::Replace (this=0x1b74e0b0, aUrl=@0xbfffc220) at /Users/jruderman/central/dom/base/nsLocation.cpp:840
#17 0x00596b8f in NS_InvokeByIndex_P (that=0x1b74e0b0, methodIndex=20, paramCount=1, params=0xbfffbf64) at /Users/jruderman/central/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_x86.cpp:179
#18 0x11854690 in XPCWrappedNative::CallMethod (ccx=@0xbfffc1b0, mode=XPCWrappedNative::CALL_METHOD) at /Users/jruderman/central/js/src/xpconnect/src/xpcwrappednative.cpp:2710
#19 0x11860eb8 in XPC_WN_CallMethod (cx=0x165aa00, obj=0x1588f120, argc=1, argv=0x1703820, vp=0xbfffc2d0) at /Users/jruderman/central/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1740
#20 0x00312db5 in js_Invoke (cx=0x165aa00, argc=1, vp=0x1703818, flags=2) at jsinterp.cpp:1364
#21 0x002fd858 in js_Interpret (cx=0x165aa00) at jsops.cpp:2198
#22 0x003117db in js_Execute (cx=0x165aa00, chain=0x15854b60, script=0x23521000, down=0x0, flags=0, result=0x0) at jsinterp.cpp:1601
#23 0x0028d78d in JS_EvaluateUCScriptForPrincipals (cx=0x165aa00, obj=0x15854b60, principals=0x1b7417e4, chars=0x2352de08, length=1099, filename=0x2076cf28 "http://ad.doubleclick.net/adi/scrm/integrateddefs;pos=0;pth=sDefinition;kw=;gci=211776;tax=;clu=NONE;adg=;sz=310x950;dcopt=;ptile=4;iid=;iin=;rci=;nl=;ses=;track=;ptag=;tag=;blog=;!category=prestitial"..., lineno=0, rval=0x0) at /Users/jruderman/central/js/src/jsapi.cpp:5089
#24 0x184f4c61 in nsJSContext::EvaluateString (this=0x2076d5e0, aScript=@0xbfffce24, aScopeObject=0x15854b60, aPrincipal=0x1b7417e0, aURL=0x2076cf28 "http://ad.doubleclick.net/adi/scrm/integrateddefs;pos=0;pth=sDefinition;kw=;gci=211776;tax=;clu=NONE;adg=;sz=310x950;dcopt=;ptile=4;iid=;iin=;rci=;nl=;ses=;track=;ptag=;tag=;blog=;!category=prestitial"..., aLineNo=0, aVersion=0, aRetValue=0x0, aIsUndefined=0xbfffcda4) at /Users/jruderman/central/dom/base/nsJSEnvironment.cpp:1682
#25 0x182cd046 in nsScriptLoader::EvaluateScript (this=0x1b7416f0, aRequest=0x1b74d260, aScript=@0xbfffce24) at /Users/jruderman/central/content/base/src/nsScriptLoader.cpp:686
#26 0x182cd452 in nsScriptLoader::ProcessRequest (this=0x1b7416f0, aRequest=0x1b74d260) at /Users/jruderman/central/content/base/src/nsScriptLoader.cpp:600
#27 0x182ce6b8 in nsScriptLoader::ProcessScriptElement (this=0x1b7416f0, aElement=0x1b746ee4) at /Users/jruderman/central/content/base/src/nsScriptLoader.cpp:554
#28 0x182c9e12 in nsScriptElement::MaybeProcessScript (this=0x1b746ee4) at /Users/jruderman/central/content/base/src/nsScriptElement.cpp:193
#29 0x1839ceef in nsHTMLScriptElement::MaybeProcessScript (this=0x1b746ec0) at /Users/jruderman/central/content/html/content/src/nsHTMLScriptElement.cpp:538
#30 0x1839bf89 in nsHTMLScriptElement::DoneAddingChildren (this=0x1b746ec0, aHaveNotified=1) at /Users/jruderman/central/content/html/content/src/nsHTMLScriptElement.cpp:475
#31 0x1861b096 in nsHtml5Parser::ExecuteScript (this=0x1b741b10) at /Users/jruderman/central/parser/html/nsHtml5Parser.cpp:1317
#32 0x1861e252 in nsHtml5Parser::ParseUntilSuspend (this=0x1b741b10) at /Users/jruderman/central/parser/html/nsHtml5Parser.cpp:1243
#33 0x1861e42a in nsHtml5Parser::OnDataAvailable (this=0x1b741b10, aRequest=0x2076f0d0, aContext=0x0, aInStream=0x1b7465c0, aSourceOffset=0, aLength=1359) at /Users/jruderman/central/parser/html/nsHtml5Parser.cpp:682
#34 0x17cfc349 in nsDocumentOpenInfo::OnDataAvailable (this=0x2076f690, request=0x2076f0d0, aCtxt=0x0, inStr=0x1b7465c0, sourceOffset=0, count=1359) at /Users/jruderman/central/uriloader/base/nsURILoader.cpp:306
#35 0x11a97895 in nsHTTPCompressConv::do_OnDataAvailable (this=0x1b745680, request=0x2076f0d0, context=0x0, offset=0, buffer=0x2351d200 "<html><head><title>Click here to find out more!</title></head><body bgcolor=#ffffff marginwidth=0 marginheight=0 leftmargin=0 topmargin=0><!-- Template Id = 3092 Template Name = 310x950_Content_Templa"..., count=1359) at /Users/jruderman/central/netwerk/streamconv/converters/nsHTTPCompressConv.cpp:375
#36 0x11a97f6f in nsHTTPCompressConv::OnDataAvailable (this=0x1b745680, request=0x2076f0d0, aContext=0x0, iStr=0x1b7463b0, aSourceOffset=0, aCount=632) at /Users/jruderman/central/netwerk/streamconv/converters/nsHTTPCompressConv.cpp:306
#37 0x11a725d6 in nsStreamListenerTee::OnDataAvailable (this=0x1b745750, request=0x2076f0d0, context=0x0, input=0x207db0bc, offset=0, count=632) at /Users/jruderman/central/netwerk/base/src/nsStreamListenerTee.cpp:97
#38 0x11b171dc in nsHttpChannel::OnDataAvailable (this=0x2076f0a0, request=0x207db1d0, ctxt=0x0, input=0x207db0bc, offset=0, count=632) at /Users/jruderman/central/netwerk/protocol/http/src/nsHttpChannel.cpp:5334
#39 0x11a3da63 in nsInputStreamPump::OnStateTransfer (this=0x207db1d0) at /Users/jruderman/central/netwerk/base/src/nsInputStreamPump.cpp:508
#40 0x11a3e56c in nsInputStreamPump::OnInputStreamReady (this=0x207db1d0, stream=0x207db0bc) at /Users/jruderman/central/netwerk/base/src/nsInputStreamPump.cpp:398
#41 0x00545af8 in nsInputStreamReadyEvent::Run (this=0x1b721b60) at /Users/jruderman/central/xpcom/io/nsStreamUtils.cpp:112
#42 0x00579bb4 in nsThread::ProcessNextEvent (this=0xc13c30, mayWait=0, result=0xbfffd924) at /Users/jruderman/central/xpcom/threads/nsThread.cpp:527
#43 0x004fe368 in NS_ProcessPendingEvents_P (thread=0xc13c30, timeout=20) at nsThreadUtils.cpp:180
#44 0x11da2763 in nsBaseAppShell::NativeEventCallback (this=0xc338b0) at /Users/jruderman/central/widget/src/xpwidgets/nsBaseAppShell.cpp:121
#45 0x11d57158 in nsAppShell::ProcessGeckoEvents (aInfo=0xc338b0) at /Users/jruderman/central/widget/src/cocoa/nsAppShell.mm:413
#46 0x94aba3c5 in CFRunLoopRunSpecific ()
#47 0x94abaaa8 in CFRunLoopRunInMode ()
#48 0x9560f2ac in RunCurrentEventLoopInMode ()
#49 0x9560effe in ReceiveNextEventCommon ()
#50 0x9560ef39 in BlockUntilNextEventMatchingListInMode ()
#51 0x918006d5 in _DPSNextEvent ()
#52 0x917fff88 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#53 0x917f8f9f in -[NSApplication run] ()
#54 0x11d55182 in nsAppShell::Run (this=0xc338b0) at /Users/jruderman/central/widget/src/cocoa/nsAppShell.mm:766
#55 0x12a38f8a in nsAppStartup::Run (this=0xc4dae0) at /Users/jruderman/central/toolkit/components/startup/src/nsAppStartup.cpp:182
#56 0x000bcaf1 in XRE_main (argc=4, argv=0xbfffef90, aAppData=0xc0e5d0) at /Users/jruderman/central/toolkit/xre/nsAppRunner.cpp:3479
#57 0x000026f3 in main (argc=4, argv=0xbfffef90) at /Users/jruderman/central/browser/app/nsBrowserApp.cpp:156
Attached file testcase
Still happens in 9061f43b86bd+ (Sep 20).  With 65bfeea3c2d7+ (Sep 22) it's "worse", with two assertions:

###!!! ASSERTION: Bad life cycle.: 'mLifeCycle == STREAM_ENDING', file /Users/jruderman/central/parser/html/nsHtml5TreeOpExecutor.cpp, line 126

###!!! ASSERTION: Tried to post continue event when the parser is done.: 'mExecutor->GetLifeCycle() != TERMINATED', file /Users/jruderman/central/parser/html/nsHtml5Parser.cpp, line 643

I'm guessing the patch in bug 499642 is responsible for this change.
With the patch for bug 503473 (and everything leading up to it) applied, I no longer see an assertion from the HTML5 parser but I see:
WARNING: NS_ENSURE_SUCCESS(rv, 0) failed with result 0x8000FFFF: file /Users/Shared/Projects/mozilla-html5/content/base/src/nsContentUtils.cpp, line 2755
Depends on: 503473
I believe this was fixed together with bug 503473.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Crashtest checked in: http://hg.mozilla.org/mozilla-central/rev/45fd81ea3f4b
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: