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

"ASSERTION: aOffset must be in the frame's range" with caret browsing

RESOLVED FIXED in mozilla13

Status

()

Core
Editor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jesse Ruderman, Assigned: Ehsan)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
mozilla13
x86_64
Mac OS X
assertion, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 4 obsolete attachments)

(Reporter)

Description

6 years ago
Created attachment 571582 [details]
testcase (requires focus, requires browse-with-caret pref)

With
  user_pref("accessibility.browsewithcaret", true);
the testcase triggers:

###!!! ASSERTION: aOffset must be in the frame's range: 'aOffset >= contentOffset && aOffset <= contentOffset + contentLength', file layout/generic/nsTextFrameThebes.cpp, line 5122
(Reporter)

Comment 1

6 years ago
Created attachment 571583 [details]
stack traces
nsTextFrame::GetChildFrameContainingOffset will happily return offsets that are outside of a frame's offset range.  I don't know why, but is that something which should be fixed?
That should only happen if the offset is beyond the text node length. Is that the situation here?
Yes.  aOffset is 2, the text node length is 1.
I reckon we should leave that code as-is, assert that the offset is within the text node length, and fix any callers that aren't doing that.
Created attachment 589924 [details] [diff] [review]
Patch (v1)

Due to the fact that this test case requires caret browsing, I don't think there is a good way for us to import it as a crashtest...
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #589924 - Flags: review?(roc)
Attachment #589924 - Flags: review?(roc) → review+
(Reporter)

Comment 7

6 years ago
> Due to the fact that this test case requires caret browsing, I don't think
> there is a good way for us to import it as a crashtest...

Try this in the crashtest manifest:

   pref(accessibility.browsewithcaret,true) load ...
(In reply to Jesse Ruderman from comment #7)
> > Due to the fact that this test case requires caret browsing, I don't think
> > there is a good way for us to import it as a crashtest...
> 
> Try this in the crashtest manifest:
> 
>    pref(accessibility.browsewithcaret,true) load ...

Neat!
Created attachment 590320 [details] [diff] [review]
Test case
Attachment #590320 - Flags: review?(roc)
Attachment #590320 - Flags: review?(roc) → review+
Created attachment 591926 [details] [diff] [review]
Patch for landing
Attachment #589924 - Attachment is obsolete: true
Attachment #590320 - Attachment is obsolete: true
Created attachment 591927 [details] [diff] [review]
Patch for landing
Attachment #591926 - Attachment is obsolete: true
Whiteboard: [autoland]

Updated

6 years ago
Whiteboard: [autoland] → [autoland-in-queue]
Whiteboard: [autoland-in-queue] → [autoland]

Updated

6 years ago
Whiteboard: [autoland] → [autoland-in-queue]

Comment 12

6 years ago
Autoland Patchset:
	Patches: 591927
	Branch: mozilla-central => try
	Destination: ssh://hg.mozilla.org/try
Try run started, revision 5ad14c5b0d1a. To cancel or monitor the job, see: https://build.mozilla.org/buildapi/self-serve/try/rev/5ad14c5b0d1a

Comment 13

6 years ago
Try run for 5ad14c5b0d1a is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=5ad14c5b0d1a
Results (out of 208 total builds):
    exception: 2
    success: 174
    warnings: 32
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-5ad14c5b0d1a

Updated

6 years ago
Whiteboard: [autoland-in-queue]
Created attachment 593207 [details] [diff] [review]
Fixed a bunch of test issues

Only do the check for text frames, and also fix a test issue which was causing orange.
Attachment #591927 - Attachment is obsolete: true
Attachment #593207 - Flags: review?(roc)
Attachment #593207 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/7dcf885c2139
Flags: in-testsuite+
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/7dcf885c2139
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.