Closed Bug 2476 Opened 26 years ago Closed 26 years ago

SetInitialChildList methods need rework

Categories

(Core :: Layout: Tables, defect, P4)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: peterl-retired, Assigned: karnaze)

References

()

Details

This is an important public CSS test page for us. Please fix soon. Assertion during initial reflow, it appears to be a null frame list atom when creating col group frames. nsDebug::PreCondition(char * 0x0067b738, char * 0x0067b720, char * 0x0067b6f0, int 36) line 110 + 13 bytes nsFrameList::AppendFrames(nsIFrame * 0x00000000, nsIFrame * 0x00000000) line 36 + 29 bytes nsTableColGroupFrame::AppendNewFrames(nsTableColGroupFrame * const 0x03839ce0, nsIPresContext & {...}, nsIFrame * 0x00000000) line 122 nsTableColGroupFrame::SetInitialChildList(nsTableColGroupFrame * const 0x03839ce0, nsIPresContext & {...}, nsIAtom * 0x00000000 {???}, nsIFrame * 0x00000000) line 130 + 23 bytes HTMLStyleSheetImpl::ConstructTableFrame(nsIPresContext * 0x035c6b30, nsIContent * 0x0374d4cc, nsIFrame * 0x036efd20, nsIStyleContext * 0x03b21b18, nsAbsoluteItems & {...}, nsIFrame * & 0x03838ed0) line 1339 HTMLStyleSheetImpl::ConstructFrameByDisplayType(nsIPresContext * 0x035c6b30, const nsStyleDisplay * 0x03b21ce8, nsIContent * 0x0374d4cc, nsIFrame * 0x036efd20, nsIStyleContext * 0x03b21b18, nsAbsoluteItems & {...}, nsIFrame * & 0x03838ed0) line 1980 + 32 bytes HTMLStyleSheetImpl::ConstructFrame(nsIPresContext * 0x035c6b30, nsIContent * 0x0374d4cc, nsIFrame * 0x036efd20, nsAbsoluteItems & {...}, nsIFrame * & 0x03838ed0) line 2224 + 36 bytes HTMLStyleSheetImpl::ContentAppended(HTMLStyleSheetImpl * const 0x03560184, nsIPresContext * 0x035c6b30, nsIContent * 0x036fbedc, int 0) line 2391 StyleSetImpl::ContentAppended(StyleSetImpl * const 0x035ba4c0, nsIPresContext * 0x035c6b30, nsIContent * 0x036fbedc, int 0) line 742 PresShell::ContentAppended(PresShell * const 0x035ba5a8, nsIDocument * 0x03540c70, nsIContent * 0x036fbedc, int 0) line 1019 + 33 bytes nsDocument::ContentAppended(nsDocument * const 0x03540c70, nsIContent * 0x036fbedc, int 0) line 941 nsHTMLDocument::ContentAppended(nsHTMLDocument * const 0x03540c70, nsIContent * 0x036fbedc, int 0) line 532 HTMLContentSink::CloseBody(HTMLContentSink * const 0x035b1ca0, const nsIParserNode & {...}) line 1684 CNavDTD::CloseBody(const nsIParserNode & {...}) line 1971 + 22 bytes CNavDTD::CloseContainer(const nsIParserNode & {...}, nsHTMLTag eHTMLTag_unknown, int 0) line 2180 + 12 bytes CNavDTD::CloseContainersTo(int 0, nsHTMLTag eHTMLTag_unknown, int 0) line 2227 + 20 bytes CNavDTD::DidBuildModel(CNavDTD * const 0x035bb2a0, unsigned int 0, int 1, nsIParser * 0x03590da0) line 514 + 14 bytes nsParser::DidBuildModel(unsigned int 0) line 485 + 48 bytes nsParser::ResumeParse(nsIDTD * 0x00000000) line 677 nsParser::EnableParser(int 1) line 543 + 19 bytes HTMLContentSink::ResumeParsing() line 2383 nsDoneLoadingStyle(nsIUnicharStreamLoader * 0x03516120, nsString & {"/*Import Test File*/ @import url(lastlinkimport.css); @import url(lastlinkimportmediascreen.css) screen; @import url(lastlinki"}, void * 0x03516460, unsigned int 0) line 2175 nsUnicharStreamLoader::OnStopBinding(nsUnicharStreamLoader * const 0x03516124, nsIURL * 0x03516770, unsigned int 0, unsigned short * 0x036dd990) line 148 + 31 bytes nsDocumentBindInfo::OnStopBinding(nsDocumentBindInfo * const 0x03517be0, nsIURL * 0x03516770, unsigned int 0, unsigned short * 0x036dd990) line 1729 + 30 bytes OnStopBindingProxyEvent::HandleEvent(OnStopBindingProxyEvent * const 0x036dd940) line 584 + 45 bytes StreamListenerProxyEvent::HandlePLEvent(PLEvent * 0x036dd944) line 464 + 12 bytes PL_HandleEvent(PLEvent * 0x036dd944) line 395 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x03472e40) line 357 + 9 bytes _md_EventReceiverProc(void * 0x001107a2, unsigned int 49323, unsigned int 0, long 54996544) line 675 + 9 bytes USER32! 77e713ed()
Assignee: karnaze → troy
I haven't looked at the code yet, but looking at the stack trace it could well be something introduced by Troy when he added nsFrameList. Troy, could you quickly look at this and verify that it's really a table bug. Reassign to buster if it is, and I'll nail it today.
Assignee: troy → karnaze
First, I didn't add the nsFrameList code, and I quick look at the CVS log would have shown that. Now, the bug is going to Chris and not for tables and here's why. Having the pre-condition check in nsFrameList seems reasonable, so let's leave it. The real problem is that SetInitialChildList() is being called with a NULL child-list. Unfortunately I can't change the frame construction code to only call SetInitialChildList() if there are child frames (as te header indicates is the case), because Chris has form code that always expects SetInitialChildlist() to get called and it does general "initialization" stuff Now that Init() has been added (a long time ago I might add), Chris needs to move his "initialization" code to Init() instead. Steve, if you want to fix this quickly then change nsTableColGroupFrame::AppendNewFrames() to check for a NULL frame-list and only call AppendFrames() if it's non-NULL
The page now loads. I added the check for null before calling nsFrameList::AppendFrames as Troy suggested. That fixes this particular page. But Chris should work with Troy to clean up the rest of the code, so I'm leaving the bug open and assigned to karnaze.
Assignee: karnaze → troy
Ok, new problem. Back to troy, then back to karnaze for the table init stuff. Now this page asserts in: void nsHTMLReflowState::ComputeHorizontalValue(nscoord aContainingBlockWidth, nsStyleUnit aUnit, const nsStyleCoord& aCoord, nscoord& aResult) { NS_PRECONDITION(eStyleUnit_Inherit != aUnit, "unexpected unit");
Assignee: troy → karnaze
It's not asserting for me. I just did a full pull and rebuild so maybe something changed to fix the assert
Page moved today, so just updating the uri. Move along now...
Status: NEW → ASSIGNED
Setting all current Open Critical and Major to M3
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
It is not a simple matter to move initialization code out of SetInitialChildList and into Init. For example, CreateViewForFrame gets called after Init but before SetInitialChildList, so initialization code that depends on that being set must go into SetInitialChildList. I tried moving some initialzation code out of SetInitialChildList and ran into these kinds of problems. For now, I'm considering SetInitialChildList to be the 2nd initialization routine that gets called (Init being the 1st), until the aforementioned issues can be resolved.
Status: RESOLVED → REOPENED
You can't do that Chris. The semantics of SetInitialChildList() are not it ONLY gets called if there are actually child frames, and we can't turn that on (i.e. not always call it), until this code is fixed. If there's a bigger problem (e.g., the ordering problem), then let's discuss it and see what else needs to change
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
QA Contact: 4110 → 4015
Reassigning qa contact to gerardok@netscape.com. Looks like whitebox.
Status: REOPENED → ASSIGNED
Resolution: WONTFIX → ---
Severity: critical → normal
Priority: P2 → P4
Summary: Assertion during page load → SetInitialChildList methods need rework
Target Milestone: M3 → M4
This page no longer crashes and there are still issues related to SetInitialChildList needing to be reworked in the Forms code. I am changing the summary, priority, severity and moving it out of M3.
Target Milestone: M4 → M6
moving to M6
Status: ASSIGNED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
nsIFormControlFrame SetInitialChildList methods no longer need to be called if there are not children.
Status: RESOLVED → VERIFIED
Verified that the page isn't crashing anymore on 0427 build. Since it appears there are no more issues related to SetInitialChildList, I'm marking this bug as verified. If you think otherwise, please reopen and add any relevant comment. Thanks.
You need to log in before you can comment on or make changes to this bug.