Closed Bug 492014 Opened 15 years ago Closed 15 years ago

"ASSERTION: aContent2 must not be null" with caption, td, iframe

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1

People

(Reporter: jruderman, Assigned: tnikkel)

References

Details

(4 keywords, Whiteboard: [fixed1.9.1b99])

Attachments

(4 files, 3 obsolete files)

Attached file testcase
###!!! ASSERTION: aContent2 must not be null: 'aContent2', file /Users/jruderman/central/layout/base/nsLayoutUtils.cpp, line 344

###!!! ASSERTION: aContent1 must not be null: 'aContent1', file /Users/jruderman/central/layout/base/nsLayoutUtils.cpp, line 343
In IsContentLEQ we have:

429       return nsLayoutUtils::CompareTreePosition(
430           aItem1->GetUnderlyingFrame()->GetContent(),
431           aItem2->GetUnderlyingFrame()->GetContent(),
432           static_cast<nsIContent*>(aClosure)) <= 0;

aItem2->GetUnderlyingFrame() is the viewport in this case, so it has no content. aItem2 is an nsDisplaySolidColor*, added in bug 485275.  aItem1 is the iframe's border item.

This doesn't look like a tables issue except insofar as nsTableOuterFrame::BuildDisplayList calls SortAllByContentOrder on the list it builds (and happens to be the only current consumer of said API).  That said, it doesn't make much sense to sort by content order a list that might include content from different documents (it certainly includes frames from different documents!)...  roc, any idea how that's expecting to work here?
Blocks: 485275
Component: Layout: Tables → Layout
Keywords: regression
QA Contact: layout.tables → layout
(In reply to comment #2)
> That said,
> it doesn't make much sense to sort by content order a list that might include
> content from different documents (it certainly includes frames from different
> documents!)...  roc, any idea how that's expecting to work here?

See bug 490376, comment 5.
Ah, yes.  Well, maybe we should just fix that here.  It'd certainly resolve this bug!
Attached patch patch (obsolete) — Splinter Review
Here is a patch doing that.

I added the testcase as a crashtest even though it doesn't crash, perhaps we will start checking assertions. Is there a better way to test this?

Maybe give this a spin on try-server to be on the safe side?
Assignee: nobody → tnikkel
Attachment #376539 - Flags: review?(roc)
Comment on attachment 376539 [details] [diff] [review]
patch

+  if (f)
+    aBuilder->LeavePresShell(f, dirty);

{} around this statement.

Thanks!
Attachment #376539 - Flags: superreview+
Attachment #376539 - Flags: review?(roc)
Attachment #376539 - Flags: review+
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #376539 - Attachment is obsolete: true
Attachment #376542 - Flags: review+
We plan to start doing fatal asserts during crashtests, yes.
(In reply to comment #8)
> We plan to start doing fatal asserts during crashtests, yes.

No, we plan to make unexpected assertions during crashtests cause a test failure but not prevent the rest of the tests from running, and we plan to have a way to mark known assertions so we can get the numbers down.  (That does leave room for assertions to regress between now and when we get debug unit test tinderboxes running, but once it's running we'll have a mechanism for pushing the numbers down.)
Flags: blocking1.9.1?
The patch for this bug will conflict with the patch for bug 491848. So here is a patch that can be applied after bug 491848.
Attachment #376542 - Attachment is obsolete: true
Attachment #377003 - Flags: review+
This bug no longer has any dependency on bug 491848 so I figured I'd refresh the patch so there was no confusion.
Attachment #377003 - Attachment is obsolete: true
Attachment #377557 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/9aac3ff92a06
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 approval]
Attachment #377788 - Flags: approval1.9.1?
Attachment #377557 - Flags: approval1.9.1?
Attachment #377788 - Flags: approval1.9.1? → approval1.9.1+
Flags: blocking1.9.1? → wanted1.9.1+
Whiteboard: [needs 191 approval] → [needs 191 landing]
Keywords: checkin-needed
Attachment #377788 - Attachment description: 1.9.1 patch v4 → 1.9.1 patch v4 [Checkin: Comment 14]
Comment on attachment 377788 [details] [diff] [review]
1.9.1 patch v4
[Checkin: Comment 14]


http://hg.mozilla.org/releases/mozilla-1.9.1/rev/560b588c0ae8

after fixing context for
{
patching file layout/base/crashtests/crashtests.list
Hunk #1 FAILED at 135
1 out of 1 hunks FAILED
}
Attachment #377557 - Attachment description: patch v4 → patch v4 [Checkin: Comment 12]
Whiteboard: [needs 191 landing] → [fixed1.9.1b5]
Target Milestone: --- → mozilla1.9.2a1
verified FIXED on debug builds(no crash or assert):

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090528 Shiretoko/3.5pre ID:20090528130303

and

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090528 Minefield/3.6a1pre ID:20090528112613
Status: RESOLVED → VERIFIED
Whiteboard: [fixed1.9.1b5] → [fixed1.9.1b99]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: