The default bug view has changed. See this FAQ.

"Assertion failure: selection->Collapsed() (Selection not collapsed after delete)" with multiple selections, odd history

RESOLVED FIXED in mozilla16

Status

()

Core
Editor
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Assigned: ayg)

Tracking

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

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

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 636993 [details]
testcase (asserts fatally when loaded)

Assertion failure: selection->Collapsed() (Selection not collapsed after delete), at editor/libeditor/base/nsEditor.cpp:4457
(Reporter)

Comment 1

5 years ago
Created attachment 636994 [details]
stack trace
Created attachment 638299 [details] [diff] [review]
Patch

The assert is wrong: the selection might legitimately have multiple ranges that are all collapsed, in which case it won't be itself collapsed.  So let's instead just assert that the anchor/focus range is collapsed.  Try: https://tbpl.mozilla.org/?tree=Try&rev=99ea4154c5bf
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Attachment #638299 - Flags: review?(ehsan)

Updated

5 years ago
Attachment #638299 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/35db35b62cee
Flags: in-testsuite+
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/35db35b62cee
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.