Closed Bug 411870 Opened 17 years ago Closed 17 years ago

"ASSERTION: running past end" with -moz-column, direction:rtl

Categories

(Core :: Layout, defect, P3)

x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: roc)

References

Details

(Keywords: assertion, regression, testcase, Whiteboard: post 1.8-branch)

Attachments

(2 files, 2 obsolete files)

Loading the testcase triggers:

###!!! ASSERTION: running past end: 'mCurrent != mListLink', file /Users/jruderman/trunk/mozilla/layout/base/../generic/nsLineBox.h, line 621

I think this assertion usually leads to a crash.  I don't know whether it does for this testcase, because I have it set to abort.
Is this a mac-only crash? I see the assertion on trunk windows but don't crash (nor do I crash in an opt build).

Don't crash or assert in 1.8.1.12 builds. Since the assert is from 2001 I assume that means we don't have the problem on the 1.8 branch.
Flags: wanted1.8.1.x-
Keywords: regression
Whiteboard: post 1.8-branch
If I turn off the abort, it actually doesn't crash for me.  I tried reloading a bunch of times (in case there was random memory corruption), and didn't see any bad stuff happen.
Keywords: crash
It's bad though.
Assignee: nobody → roc
Flags: blocking1.9?
Stack:

#0  NS_DebugBreak_P (aSeverity=1, aStr=0x13e59f50 "running past end", aExpr=0x13e59f38 "mCurrent != mListLink", aFile=0x13e59efc "/Users/roc/mozilla-trunk/layout/base/../generic/nsLineBox.h", aLine=620) at /Users/roc/mozilla-trunk/xpcom/base/nsDebugImpl.cpp:263
#1  0x13ee8d39 in nsLineList_iterator::operator-> (this=0xbfffae74) at /Users/roc/mozilla-trunk/layout/base/../generic/nsLineBox.h:620
#2  0x1380caa7 in nsBidiPresUtils::Resolve (this=0x3f7d7800, aBlockFrame=0x27972c4, aIsVisualFormControl=0) at /Users/roc/mozilla-trunk/layout/base/nsBidiPresUtils.cpp:442
#3  0x138215b8 in nsBlockFrame::ResolveBidi (this=0x27972c4) at /Users/roc/mozilla-trunk/layout/generic/nsBlockFrame.cpp:6745

Relevant frame tree:

          ColumnSet(body)(3)@0x2796f88 next=0x27974e8 {480,480,56400,1152} [state=00001021] [content=0x249ece0] [sc=0x2796fc8]<
            Block(body)(3)@0x27970c0 next=0x2797998 next-in-flow=0x2797998 {56399,0,1,1152} [state=08001001] sc=0x2797020(i=0,b=1) pst=:-moz-column-content<
              line 0x27974c0: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x4048] {0,0,1,1152} <
                Block(div)(0)@0x27972c4 next-in-flow=0x2797918 {0,0,1,1152} [state=00001001] sc=0x2797070(i=0,b=0)<
                >
              >
            >
            Block(body)(3)@0x2797998 next=0x2797a70 prev-in-flow=0x27970c0 next-in-flow=0x2797a70 {961,0,1,1152} [state=00000004] sc=0x2797020(i=0,b=1) pst=:-moz-column-content<
              line 0x2797970: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x4008] {0,0,1,1152} <
                Block(div)(0)@0x2797918 prev-in-flow=0x27972c4 next-in-flow=0x27979f0 {0,0,1,1152} [state=00000004] sc=0x2797070(i=1,b=0)<
                  line 0x2797884: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:linebr[0x5100] {1,0,0,1152} <
                    Text(0)@0x2797458[0,1,F]  next-continuation=0x27978ac {1,96,0,960} [state=00620000] [content=0x24ebb68] sc=0x2797408 pst=:-moz-non-element<
                      "\n"
                    >
                  >
                >
              >
            >
            Block(body)(3)@0x2797a70 prev-in-flow=0x2797998 {0,0,1,1152} [state=00001004] sc=0x2797020(i=1,b=1) pst=:-moz-column-content<
              line 0x2797a48: count=1 state=block,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x4008] {0,0,1,1152} <
                Block(div)(0)@0x27979f0 next=0x2797380 prev-in-flow=0x2797918 {0,0,1,1152} [state=00000004] sc=0x2797070(i=1,b=0)<
                  line 0x27978f0: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:linebr[0x5100] {1,0,0,1152} <
                    Text(0)@0x27978ac[1,1,T]  prev-continuation=0x2797458 {1,96,0,960} [state=00620004] [content=0x24ebb68] sc=0x2797408 pst=:-moz-non-element<
                      "\n"
                    >
                  >
                >
              >
              line 0x2797498: count=1 state=inline,dirty,prevmarginclean,not impacted,not wrapped,before:nobr,after:nobr[0x4001] {0,0,0,0} <
                Inline(span)(1)@0x2797380 {0,0,0,0} [state=00000402] [content=0x24ebaf8] [sc=0x2797330]<
                  Text(0)@0x2797260[0,1,T]  {0,0,0,0} [state=00020402] [content=0x24ebb20] sc=0x27973b8 pst=:-moz-non-element<
                    "\n"
                  >
                >
              >
            >
          >
        >
        
Attached patch fix (obsolete) — Splinter Review
Unless I'm missing something, this line-tracking code doesn't work at all across block continuations. This makes it use nsBlockInFlowLineIterator.
Attachment #298396 - Flags: review?(smontagu)
Whiteboard: post 1.8-branch → post 1.8-branch [needs review]
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Attachment #298396 - Flags: review?(smontagu) → review+
checked in with test.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: post 1.8-branch [needs review] → post 1.8-branch
I had to back this out, it caused layout/generic/test/test_bug384527.html to crash.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch fix (obsolete) — Splinter Review
This fixes the regression. Our loop in AdvanceLineIteratorToFrame that was supposed to find the nearest ancestor of aFrame that's a direct child of the block was failing --- the IsFrameOfType(eLineParticipant) test was returning false for a floated first-letter frame. I changed the check to call nsLayoutUtils::GetAsBlock so we stop when our parent is a genuine nsBlockFrame. I'll reland with this.
Relanded.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Backed out again, crashed in layout/generic/test/test_bug389630.html this time
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch fix v3Splinter Review
We actually need to walk up following floats to their placeholders here.
Attachment #298396 - Attachment is obsolete: true
Attachment #299787 - Attachment is obsolete: true
Attachment #299954 - Flags: review?(smontagu)
Whiteboard: post 1.8-branch → post 1.8-branch [needs review]
I ran Mochitests with this and we don't crash anymore.
Attachment #299954 - Flags: review?(smontagu) → review+
Run reftests and crashtests too, please?
Did that and they passed
Checked in a third time!
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Whiteboard: post 1.8-branch [needs review] → post 1.8-branch
Group: core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: