Closed Bug 646561 Opened 9 years ago Closed 9 years ago

"ASSERTION: Invalid offset" with soft hyphen in table, bidi

Categories

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

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: jruderman, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

Attached file testcase
ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file gfx/thebes/gfxSkipChars.cpp, line 92

First seen at 4am today. I bet it's a regression from bug 418975.
Attached file stack trace
(In reply to comment #0)
> Created attachment 523061 [details]
> testcase
> 
> ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file
> gfx/thebes/gfxSkipChars.cpp, line 92
> 
> First seen at 4am today. I bet it's a regression from bug 418975.

Argh - yes, I expect it is. I'll take a look.... if it's not easy to fix, we may have have to back that out.
In the mixed-direction case, the text represented by the textRun (up to flowEndInTextRun) may not correspond to the whole of the nsTextFragment, as assumed by the patch from bug 418975. Instead I think we should be using GetInFlowContentLength() to find the relevant length for the PropertyProvider.

(We should also add this testcase as a crashtest.)
Assignee: nobody → jfkthame
Attachment #523122 - Flags: review?(roc)
Comment on attachment 523122 [details] [diff] [review]
patch, use GetInFlowContentLength() rather than frag->GetLength() as the basis for length of text the PropertyProvider covers

Yes, definitely add the test.
Attachment #523122 - Flags: review?(roc) → review+
Pushed to cedar, as m-c lacks a sheriff:
http://hg.mozilla.org/projects/cedar/rev/af3ed0b17ec7 (patch)
http://hg.mozilla.org/projects/cedar/rev/fbffbfe69e5d (crashtest)
Whiteboard: [fixed-in-cedar]
http://hg.mozilla.org/mozilla-central/rev/af3ed0b17ec7
http://hg.mozilla.org/mozilla-central/rev/fbffbfe69e5d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-cedar]
Target Milestone: --- → mozilla2.2
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.