<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>19075</bug_id>
          
          <creation_ts>2008-05-15 04:20:11 -0700</creation_ts>
          <short_desc>ASSERT in editing code, ASSERTION FAILED: selection.isCaretOrRange()</short_desc>
          <delta_ts>2008-06-10 19:23:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>18858</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>justin.garcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80485</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-05-15 04:20:11 -0700</bug_when>
    <thetext>ASSERT in editing code, ASSERTION FAILED: selection.isCaretOrRange()

ASSERTION FAILED: selection.isCaretOrRange()
(/Users/eseidel/Projects/WebKit/WebCore/editing/ReplaceSelectionCommand.cpp:594 virtual void WebCore::ReplaceSelectionCommand::doApply())

The commands:
  doc.execCommand(&apos;createLink&apos;, 0, &apos;&lt;/td&gt;&apos;);
  doc.execCommand(&apos;justifyright&apos;, 1, &apos;&lt;script src=https://webkit.org&gt;&apos;);
  doc.execCommand(&apos;cut&apos;, 0, &apos;javascript:1&apos;);
  doc.execCommand(&apos;insertunorderedlist&apos;, 1, &apos;courier&apos;);
  doc.execCommand(&apos;insertunorderedlist&apos;, 1, &apos;courier&apos;);
  doc.execCommand(&apos;insertunorderedlist&apos;, 0, &apos;&apos;);
  doc.execCommand(&apos;createLink&apos;, 0, &apos;&lt;tr&gt;&apos;);
  doc.execCommand(&apos;insertunorderedlist&apos;, 1, &apos;&lt;table&gt;&apos;);
  doc.execCommand(&apos;paste&apos;, 1, &apos;red&apos;);
  doc.execCommand(&apos;insertorderedlist&apos;, 1, &apos;&apos;);
  doc.execCommand(&apos;insertparagraph&apos;, 0, &apos;javascript:1&apos;);
  doc.execCommand(&apos;justifycenter&apos;, 0, &apos;https://www.webkit.org&apos;);
  doc.execCommand(&apos;createLink&apos;, 1, &apos;&lt;iframe src=about:blank&gt;&apos;);
  doc.execCommand(&apos;indent&apos;, 0, &apos;red&apos;);
  doc.execCommand(&apos;outdent&apos;, 0, &apos;&lt;/tr&gt;&apos;);

Unfortunately my reduction script reduced it far enough that it no longer crashes in Safari, but it does crash in DRT.  You&apos;ll have to run this test under DRT to see the crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80486</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-05-15 04:20:48 -0700</bug_when>
    <thetext>The value parameters for most of those calls can probably be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80487</commentid>
    <comment_count>2</comment_count>
      <attachid>21159</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-05-15 04:24:11 -0700</bug_when>
    <thetext>Created attachment 21159
test case (ONLY ASSERTS under DRT in Debug mode)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82882</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-06-10 19:23:31 -0700</bug_when>
    <thetext>I still hit this ASSERT with the fuzzer, but not with this test case.   I guess I&apos;ll close and open a new bug with a new test case.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>21159</attachid>
            <date>2008-05-15 04:24:11 -0700</date>
            <delta_ts>2008-05-15 04:24:11 -0700</delta_ts>
            <desc>test case (ONLY ASSERTS under DRT in Debug mode)</desc>
            <filename>reduce-test.html</filename>
            <type>text/html</type>
            <size>955</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">PGlmcmFtZSBpZD1mIG5hbWU9ZiBzcmM9ImFib3V0OmJsYW5rIiB3aWR0aD0xMDAlIGhlaWdodD01
MCU+PC9pZnJhbWU+CjxzY3JpcHQ+CnZhciBpZnJhbWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJ
ZCgiZiIpOwpkb2MgPSBpZnJhbWUuY29udGVudERvY3VtZW50Owpkb2MuYWRkRXZlbnRMaXN0ZW5l
cigiY2xpY2siLCBnb3RGb2N1cywgdHJ1ZSk7CmRvYy5kZXNpZ25Nb2RlID0gJ29uJzsKZnVuY3Rp
b24gZ290Rm9jdXMoKSB7CiAgZG9jLmV4ZWNDb21tYW5kKCdjcmVhdGVMaW5rJywgMCwgJzwvdGQ+
Jyk7CiAgZG9jLmV4ZWNDb21tYW5kKCdqdXN0aWZ5cmlnaHQnKTsKICBkb2MuZXhlY0NvbW1hbmQo
J2N1dCcpOwogIGRvYy5leGVjQ29tbWFuZCgnaW5zZXJ0dW5vcmRlcmVkbGlzdCcpOwogIGRvYy5l
eGVjQ29tbWFuZCgnaW5zZXJ0dW5vcmRlcmVkbGlzdCcpOwogIGRvYy5leGVjQ29tbWFuZCgnaW5z
ZXJ0dW5vcmRlcmVkbGlzdCcpOwogIGRvYy5leGVjQ29tbWFuZCgnY3JlYXRlTGluaycsIDAsICc8
dHI+Jyk7CiAgZG9jLmV4ZWNDb21tYW5kKCdpbnNlcnR1b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