Note: There are a few cases of duplicates in user autocompletion which are being worked on.

"ASSERTION: Invalid offset" with soft hyphen, white-space:pre

RESOLVED FIXED

Status

()

Core
Layout: Text
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Assigned: jfkthame)

Tracking

(Blocks: 2 bugs, {assertion, testcase})

Trunk
x86
Mac OS X
assertion, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

6 years ago
Created attachment 526491 [details]
testcase

###!!! ASSERTION: Invalid offset: 'aOffset <= mSkipChars->mCharCount', file gfx/thebes/gfxSkipChars.cpp, line 92
(Reporter)

Comment 1

6 years ago
Created attachment 526493 [details]
stack trace
(Assignee)

Comment 2

6 years ago
Looks like more fallout from bug 418975 and its followup fixes (sigh).
Blocks: 418975
Assignee: nobody → jfkthame
(Assignee)

Comment 3

6 years ago
Created attachment 526712 [details] [diff] [review]
patch, limit length for PropertyProvider to what's actually in the textrun

It looks like the problem here arises because the presence of the preformatted newline in the text node means that the textrun ends up "truncated" at that point, so it doesn't cover all the text that the code was expecting it to.

To handle this case, we can set len for the PropertyProvider to the minimum of the actual content length and the length covered by the textrun.
Attachment #526712 - Flags: review?(roc)
(Assignee)

Comment 4

6 years ago
Created attachment 526714 [details] [diff] [review]
add the testcase as a crashtest
Attachment #526714 - Flags: review?(roc)
Attachment #526712 - Flags: review?(roc) → review+
Attachment #526714 - Flags: review?(roc) → review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/mozilla-central/rev/dc4b44f3e3f7 (patch)
http://hg.mozilla.org/mozilla-central/rev/b17d5f8022af (testcase)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Comment on attachment 526712 [details] [diff] [review]
patch, limit length for PropertyProvider to what's actually in the textrun

>+    len = PR_MIN(GetContentOffset() + GetInFlowContentLength(),
>+                 tmp.ConvertSkippedToOriginal(flowEndInTextRun)) - iter.GetOriginalOffset();

This really should have been NS_MIN.
You need to log in before you can comment on or make changes to this bug.