Closed Bug 39876 Opened 25 years ago Closed 25 years ago

nsXULTemplateBuilder fails to build content

Categories

(Core :: XUL, defect, P3)

All
Windows NT
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: vishy, Assigned: waterson)

Details

Attachments

(1 file)

Manifests as lots of assertions. I'd like this to be investigate since it may be masking a more serious problem. Just play around with AIM on Windows a bit and you will hit this assertion, esp if you have a large buddy list. Thanks, Vishy Yeah, Alex was seeing this on Tuesday night. It's probably my fault: the nsXULTemplateBuilder is failing to build content for some reason. Can you file a bug on me? chris David Hyatt wrote: > > > > --------------------------------------------------------------- > > Subject: lots of assertions > Date: Thu, 18 May 2000 13:23:03 -0700 > From: vishy@netscape.com (Viswanath Ramachandran) > Organization: Netscape > To: David Hyatt <hyatt@netscape.com> > > > I hit the following assertion a lot when loading some of our (AIM) > windows. Any idea what is wrong in our XUL/CSS, and what I should be > looking for. > > Thanks, > Vishy > > NTDLL! 77f7629c() > nsDebug::Assertion(const char * 0x01d15104, const char * 0x01d150f0, > const char * 0x01d150bc, int 2091) line 242 + 13 bytes > nsXULDocument::CreateContents(nsXULDocument * const 0x03ac15f4, > nsIContent * 0x03ea3050) line 2091 + 38 bytes > nsXULElement::EnsureContentsGenerated() line 3828 + 27 bytes > nsXULElement::ChildCount(const nsXULElement * const 0x03ea3050, int & > 63032736) line 2565 + 8 bytes > nsCSSFrameConstructor::TableProcessChildren(nsIPresShell * 0x03add980, > nsIPresContext * 0x03a36250, nsFrameConstructorState & {...}, > nsIContent * 0x03ea3050, nsIFrame * 0x02e9f1d8, nsTableCreator & > {...}, nsFrameItems & {...}, nsIFrame * & 0x00000000) line 2944 > nsCSSFrameConstructor::ConstructTableRowFrame(nsIPresShell * > 0x03add980, nsIPresContext * 0x03a36250, nsFrameConstructorState & > {...}, nsIContent * 0x03ea3050, nsIFrame * 0x02ec7acc, nsIStyleContext > * 0x03ea2b60, nsTableCreator & {...}, int 0, nsFrameItems & {...}, > nsIFrame * & 0x02e9f1d8, int & 0) line 2653 + 42 bytes > nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell * 0x03add980, > nsIPresContext * 0x03a36250, nsFrameConstructorState & {...}, > nsIContent * 0x03ea3050, nsIFrame * 0x02ec7acc, nsIAtom * 0x0157f840, > nsIStyleContext * 0x03ea2b60, nsFrameItems & {...}, int & 0) line 5700 > + 53 bytes > nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * > 0x03add980, nsIPresContext * 0x03a36250, nsFrameConstructorState & > {...}, nsIContent * 0x03ea3050, nsIFrame * 0x02ec7acc, nsIAtom * > 0x0157f840, nsIStyleContext * 0x03ea2b60, nsFrameItems & {...}, int 0) > line 7252 + 44 bytes > nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x03add980, > nsIPresContext * 0x03a36250, nsFrameConstructorState & {...}, > nsIContent * 0x03ea3050, nsIFrame * 0x02ec7acc, nsFrameItems & {...}) > line 7181 + 52 bytes > nsCSSFrameConstructor::CreateTreeWidgetContent(nsCSSFrameConstructor * > const 0x03addcf0, nsIPresContext * 0x03a36250, nsIFrame * 0x02ec7acc, > nsIFrame * 0x00000000, nsIContent * 0x03ea3050, nsIFrame * * > 0x02ec7b1c, int 1, int 0, nsILayoutHistoryState * 0x00000000) line > 11760 + 43 bytes > nsTreeRowGroupFrame::GetFirstFrameForReflow(nsIPresContext * > 0x03a36250) line 1211 > nsTableRowGroupFrame::ReflowMappedChildren(nsTableRowGroupFrame * > const 0x02ec7acc, nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & > {...}, RowGroupReflowState & {...}, unsigned int & 0, nsTableRowFrame > * 0x00000000, nsReflowReason eReflowReason_Resize, int 1, int 0) line > 352 + 18 bytes > nsTableRowGroupFrame::Reflow(nsTableRowGroupFrame * const 0x02ec7acc, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 1074 + 38 bytes > nsContainerFrame::ReflowChild(nsIFrame * 0x02ec7acc, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, int 0, int 0, unsigned int 0, unsigned int & 0) line 643 + 31 > bytes > nsTableRowGroupFrame::ReflowMappedChildren(nsTableRowGroupFrame * > const 0x02ec7a34, nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & > {...}, RowGroupReflowState & {...}, unsigned int & 0, nsTableRowFrame > * 0x00000000, nsReflowReason eReflowReason_Resize, int 1, int 0) line > 413 + 45 bytes > nsTableRowGroupFrame::Reflow(nsTableRowGroupFrame * const 0x02ec7a34, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 1074 + 38 bytes > nsContainerFrame::ReflowChild(nsIFrame * 0x02ec7a34, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, int 0, int 0, unsigned int 0, unsigned int & 0) line 643 + 31 > bytes > nsTableFrame::ReflowMappedChildren(nsTableFrame * const 0x02ec736c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, > InnerTableReflowState & {...}, unsigned int & 0) line 2993 + 47 bytes > nsTableFrame::ResizeReflowPass2(nsTableFrame * const 0x02ec736c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 1971 + 31 bytes > nsTableFrame::Reflow(nsTableFrame * const 0x02ec736c, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0) line 1614 + 34 bytes > nsTreeFrame::Reflow(nsTreeFrame * const 0x02ec736c, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0) line 422 + 25 bytes > nsContainerFrame::ReflowChild(nsIFrame * 0x02ec736c, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, int 0, int 0, unsigned int 3, unsigned int & 0) line 643 + 31 > bytes > nsTableOuterFrame::OuterReflowChild(nsTableOuterFrame * const > 0x02ec6f3c, nsIPresContext * 0x03a36250, nsIFrame * 0x02ec736c, const > nsHTMLReflowState & {...}, nsHTMLReflowMetrics & {...}, int * > 0x00000000, nsSize & {...}, nsMargin & {...}, nsMargin & {...}, > nsReflowReason eReflowReason_Incremental, unsigned int & 0) line 883 + > 47 bytes > nsTableOuterFrame::IR_InnerTableReflow(nsTableOuterFrame * const > 0x02ec6f3c, nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, > const nsHTMLReflowState & {...}, unsigned int & 0) line 1181 + 54 > bytes > nsTableOuterFrame::IR_ReflowDirty(nsTableOuterFrame * const > 0x02ec6f3c, nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, > const nsHTMLReflowState & {...}, unsigned int & 0) line 1088 + 31 > bytes > nsTableOuterFrame::IR_TargetIsMe(nsTableOuterFrame * const 0x02ec6f3c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 1136 + 31 bytes > nsTableOuterFrame::IncrementalReflow(nsTableOuterFrame * const > 0x02ec6f3c, nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, > const nsHTMLReflowState & {...}, unsigned int & 0) line 928 + 31 bytes > > nsTableOuterFrame::Reflow(nsTableOuterFrame * const 0x02ec6f3c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 1372 + 31 bytes > nsTreeOuterFrame::Reflow(nsTreeOuterFrame * const 0x02ec6f3c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 135 + 25 bytes > nsBlockReflowContext::ReflowBlock(nsIFrame * 0x02ec6f3c, const nsRect > & {...}, int 0, int 0, int 1, nsMargin & {...}, unsigned int & 0) line > 470 + 45 bytes > nsBlockFrame::ReflowBlockFrame(nsBlockReflowState & {...}, nsLineBox * > 0x02ec74a4, int * 0x0012c19c) line 3838 + 56 bytes > nsBlockFrame::ReflowLine(nsBlockReflowState & {...}, nsLineBox * > 0x02ec74a4, int * 0x0012c19c, int 1) line 3102 + 23 bytes > nsBlockFrame::ReflowDirtyLines(nsBlockReflowState & {...}) line 2909 + > 27 bytes > nsBlockFrame::Reflow(nsBlockFrame * const 0x02e9f560, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0) line 1727 + 15 bytes > nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState & {...}, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0, int 75, int 345, int 3240, int 1065, int 1) > line 737 > nsBoxToBlockAdaptor::Layout(nsBoxToBlockAdaptor * const 0x02e72a98, > nsBoxLayoutState & {...}) line 411 + 52 bytes > nsSprocketLayout::Layout(nsSprocketLayout * const 0x015592d0, nsIBox * > 0x02e72548, nsBoxLayoutState & {...}) line 388 > nsContainerBox::Layout(nsContainerBox * const 0x02e72548, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02e72548, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsStackLayout::Layout(nsStackLayout * const 0x01559290, nsIBox * > 0x02ec7340, nsBoxLayoutState & {...}) line 237 > nsContainerBox::Layout(nsContainerBox * const 0x02ec7340, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02ec7340, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsDeckFrame::Layout(nsDeckFrame * const 0x02ec7340, nsBoxLayoutState & > {...}) line 224 + 13 bytes > nsSprocketLayout::Layout(nsSprocketLayout * const 0x015592d0, nsIBox * > 0x02ec7004, nsBoxLayoutState & {...}) line 388 > nsContainerBox::Layout(nsContainerBox * const 0x02ec7004, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02ec7004, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsSprocketLayout::Layout(nsSprocketLayout * const 0x015592d0, nsIBox * > 0x02e9f76c, nsBoxLayoutState & {...}) line 388 > nsContainerBox::Layout(nsContainerBox * const 0x02e9f76c, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02e9f76c, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsSprocketLayout::Layout(nsSprocketLayout * const 0x015592d0, nsIBox * > 0x02e71e14, nsBoxLayoutState & {...}) line 388 > nsContainerBox::Layout(nsContainerBox * const 0x02e71e14, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02e71e14, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsStackLayout::Layout(nsStackLayout * const 0x01559290, nsIBox * > 0x02e71d84, nsBoxLayoutState & {...}) line 237 > nsContainerBox::Layout(nsContainerBox * const 0x02e71d84, > nsBoxLayoutState & {...}) line 553 + 34 bytes > nsBoxFrame::Layout(nsBoxFrame * const 0x02e71d84, nsBoxLayoutState & > {...}) line 799 + 13 bytes > nsBoxFrame::Reflow(nsBoxFrame * const 0x02e71d4c, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0) line 653 > nsRootBoxFrame::Reflow(nsRootBoxFrame * const 0x02e71d4c, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const > nsHTMLReflowState & {...}, unsigned int & 0) line 211 > nsContainerFrame::ReflowChild(nsIFrame * 0x02e71d4c, nsIPresContext * > 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, int 0, int 0, unsigned int 0, unsigned int & 0) line 643 + 31 > bytes > ViewportFrame::Reflow(ViewportFrame * const 0x02e71d10, nsIPresContext > * 0x03a36250, nsHTMLReflowMetrics & {...}, const nsHTMLReflowState & > {...}, unsigned int & 0) line 546 > nsHTMLReflowCommand::Dispatch(nsHTMLReflowCommand * const 0x03ea49a0, > nsIPresContext * 0x03a36250, nsHTMLReflowMetrics & {...}, const nsSize > & {...}, nsIRenderingContext & {...}) line 145 > PresShell::ProcessReflowCommands(int 0) line 3780 > PresShell::FlushPendingNotifications(PresShell * const 0x03add980) > line 2931 > nsTreeRowGroupFrame::OnContentAdded(nsIPresContext * 0x03a36250) line > 1420 > nsCSSFrameConstructor::ContentAppended(nsCSSFrameConstructor * const > 0x03addcf0, nsIPresContext * 0x03a36250, nsIContent * 0x03ea1eb0, int > 0) line 7811 > StyleSetImpl::ContentAppended(StyleSetImpl * const 0x03addf80, > nsIPresContext * 0x03a36250, nsIContent * 0x03ea1eb0, int 0) line 1022 > > PresShell::ContentAppended(PresShell * const 0x03add988, nsIDocument * > 0x03ac15f0, nsIContent * 0x03ea1eb0, int 0) line 3017 + 46 bytes > nsXULDocument::ContentAppended(nsXULDocument * const 0x03ac15f0, > nsIContent * 0x03ea1eb0, int 0) line 1568 > nsXULElement::AppendChildTo(nsXULElement * const 0x03ea1eb0, > nsIContent * 0x03ea4920, int 1) line 2725 > XULSortServiceImpl::InsertContainerNode(XULSortServiceImpl * const > 0x03864730, nsIRDFCompositeDataSource * 0x03b7d5d0, nsRDFSortState * > 0x03b7dd78, nsIContent * 0x03b7b350, nsIContent * 0x03b7b350, > nsIContent * 0x03ea1eb0, nsIContent * 0x03ea4920, int 1) line 2245 > nsXULTemplateBuilder::BuildContentFromTemplate(nsIContent * > 0x03b7ccc0, nsIContent * 0x03b7b350, nsIContent * 0x03ea1eb0, int 1, > nsIRDFResource * 0x03d2aa20, int 1, Match * 0x02e8edf0, nsIContent * * > 0x00000000, int * 0x00000000) line 5158 + 82 bytes > nsXULTemplateBuilder::BuildContentFromTemplate(nsIContent * > 0x03b7cde0, nsIContent * 0x03b7b350, nsIContent * 0x03b7b350, int 1, > nsIRDFResource * 0x03d2aa20, int 1, Match * 0x02e8edf0, nsIContent * * > 0x00000000, int * 0x00000000) line 4947 + 61 bytes > nsXULTemplateBuilder::FireNewlyMatchedRules(const ClusterKeySet & > {...}) line 4442 + 64 bytes > nsXULTemplateBuilder::OnAssert(nsXULTemplateBuilder * const > 0x03b7dd58, nsIRDFResource * 0x0381aa80, nsIRDFResource * 0x015ac270, > nsIRDFNode * 0x03d2aa20) line 4478 + 15 bytes > CompositeDataSourceImpl::OnAssert(CompositeDataSourceImpl * const > 0x03b7d5d4, nsIRDFResource * 0x0381aa80, nsIRDFResource * 0x015ac270, > nsIRDFNode * 0x03d2aa20) line 1416 > InMemoryDataSource::Assert(InMemoryDataSource * const 0x0381b220, > nsIRDFResource * 0x0381aa80, nsIRDFResource * 0x015ac270, nsIRDFNode * > 0x03d2aa20, int 1) line 1153 > RDFContainerImpl::AppendElement(RDFContainerImpl * const 0x03ea28e0, > nsIRDFNode * 0x03d2aa20) line 232 + 40 bytes > nsCAimDataSource::AddBuddyGroup(nsCAimDataSource * const 0x03819d60, > const unsigned short * 0x001564ec, nsIRDFResource * 0x00000000) line > 480 + 44 bytes > nsCAimBuddy::LoadBuddyListFromFeedbag() line 1833 + 208 bytes > nsCAimBuddy::OnStateChange(nsCAimBuddy * const 0x0381d984, int 7) line > 1001 > nsCAimSession::nsCSessionListener::NotifyChildrenOfStateChange(int 7) > line 1580 > nsCAimSession::nsCSessionListener::OnStateChange(nsCAimSession::nsCSessionListen er > * const 0x03818090, ISession * 0x038184cc, > __MIDL___MIDL_itf_AimTypes_0000_0015 OnlineState_Online, IError * > 0x00000000) line 1359 > COOLBUCKY! 4015f67d() > COOLBUCKY! 4015f60c() > COOLBUCKY! 4015f860() > XPRT! 40010acd() > USER32! 77e71820() > 04443140()
vishy: could you include steps to reproduce? (also, why are new bugs that you file "unconfirmed"?)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → M17
(I got gerardo to use his magic bugzilla to bump up the permissions on vishy's account, so in the future, vishy's new bugs should come in as new (also vishy can now edit all bug fields, etc.). Vishy: let me know if you have any problems).
Thanks guys! Didnt realize my permissions were not set.
vishy: are you still seeing this?
I still see this assertion. Seems to be different line from the last one, but basically happens on opening the AIM window. I just keep ignoring them, and it seems to do okay but am afraid if its masking some bug. Thanks, Vishy ###!!! ASSERTION: error creating content: 'NS_SUCCEEDED(rv)', file d:\may25\mozi lla\rdf\content\src\nsXULDocument.cpp, line 2115
Attached patch proposed fixSplinter Review
rjc: can you code review this change for me? It's a no brainer. In nsXULTemplateBuilder::BuildContentsFromTemplate(), we were checking the element to see if it was an HTML element before trying to build its contents. If it wasn't an HMTL Element, we assumed it was a XUL element, and panicked if it wasn't. The fix is to just QI() to see if it's a XUL element (rather than asking for its namespace): if it is, great -- we'll set the lazy state. If it's not, then we recursively build its contents. This lets us handle XUL, HTML, and arbitrary XML tags, too.
vishy: FWIW, you may want to check the template you're using to build the buddy list. Did you *really* mean to have non-XUL, non-HTML content in there?
Looks like we had an extra comment close --> inside the template for the buddy list in SPBuddyOrgOverlay.xul. Removing it made the assertion go away in my tree. Amazing that the XUL would work as expected in spite of this syntax error ;-). Thanks.
Code change looks fine to me.
fix checked in, r=rjc
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: