Closed Bug 490747 Opened 16 years ago Closed 16 years ago

"ASSERTION: aPos out of range" and hang with bidi, :first-letter

Categories

(Core :: Layout: Text and Fonts, defect)

x86
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: smontagu)

References

Details

(4 keywords)

Attachments

(2 files)

###!!! ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file /Users/jruderman/central/gfx/thebes/src/gfxSkipChars.cpp, line 92 ###!!! ASSERTION: aPos out of range: '0 <= aPos && aPos < mCharacterCount', file ../../../dist/include/thebes/gfxFont.h, line 857 Hang
Same assertions as bug 489691
Assignee: nobody → smontagu
Blocks: 332655
Same first assertion, at least.
Attached patch Patch (deleted) — Splinter Review
What happens here is that when rebuilding text runs after bidi resolution BuildTextRunsScanner::ContinueTextRunAcrossFrames splits the text runs between the Latin text frame and the Arabic text frame (http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrameThebes.cpp?mark=1316-1325#1299). Later, however, the frame with the Arabic text is removed (http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsLineLayout.cpp?mark=1001-1011#985), and the previous frame is left with offsets pointing beyond the end of its text run. I'm not sure if this is the ideal fix: it might be better to prevent the previous frame from being marked as NS_FRAME_COMPLETE, but I'm not quite sure where that happens.
Attachment #375189 - Flags: superreview?(roc)
Attachment #375189 - Flags: review?(roc)
(The patch fixes bug 489691 also, so I have added crashtests for both bugs)
Blocks: 489691
Comment on attachment 375189 [details] [diff] [review] Patch + if (mPrevContinuation) { + nsTextFrame* textFrame = static_cast<nsTextFrame*>(mPrevContinuation); + if (textFrame) { + textFrame->ClearTextRun(); You don't have to recheck textFrame for null here.
Attachment #375189 - Flags: superreview?(roc)
Attachment #375189 - Flags: superreview+
Attachment #375189 - Flags: review?(roc)
Attachment #375189 - Flags: review+
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
verified FIXED on debug builds (no crash or asserts): 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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: