Last Comment Bug 768765 - "Assertion failure: selection->Collapsed() (Selection not collapsed after delete)" with multiple selections, odd history
: "Assertion failure: selection->Collapsed() (Selection not collapsed after del...
Status: RESOLVED FIXED
: assertion, testcase
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: x86_64 Mac OS X
: -- critical (vote)
: mozilla16
Assigned To: Aryeh Gregor (:ayg) (next working March 28-April 26)
:
: Makoto Kato [:m_kato]
Mentors:
Depends on:
Blocks: 336383
  Show dependency treegraph
 
Reported: 2012-06-26 21:01 PDT by Jesse Ruderman
Modified: 2012-07-05 08:13 PDT (History)
3 users (show)
ayg: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (asserts fatally when loaded) (839 bytes, text/html)
2012-06-26 21:01 PDT, Jesse Ruderman
no flags Details
stack trace (13.33 KB, text/plain)
2012-06-26 21:01 PDT, Jesse Ruderman
no flags Details
Patch (2.69 KB, patch)
2012-07-02 04:01 PDT, Aryeh Gregor (:ayg) (next working March 28-April 26)
ehsan: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2012-06-26 21:01:34 PDT
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
Comment 1 Jesse Ruderman 2012-06-26 21:01:51 PDT
Created attachment 636994 [details]
stack trace
Comment 2 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-02 04:01:20 PDT
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
Comment 3 Aryeh Gregor (:ayg) (next working March 28-April 26) 2012-07-05 01:50:07 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/35db35b62cee

Note You need to log in before you can comment on or make changes to this bug.