<?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>131018</bug_id>
          
          <creation_ts>2014-04-01 01:38:36 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: prev != *this in WebCore::VisiblePosition::previous</short_desc>
          <delta_ts>2023-01-20 09:45:56 -0800</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>darin</cc>
    
    <cc>harrison</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>kling</cc>
    
    <cc>leviw</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>996187</commentid>
    <comment_count>0</comment_count>
      <attachid>228256</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2014-04-01 01:38:36 -0700</bug_when>
    <thetext>Created attachment 228256
Test case

The failing test:

&lt;head&gt;
   &lt;script&gt;
      function runTest () {
         document.execCommand(&quot;selectall&quot;, true, null);
         document.execCommand(&quot;insertorderedlist&quot;, false, null);
      }
   &lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;runTest();&quot; contenteditable=&quot;true&quot;&gt;
   &lt;video&gt; &lt;/video&gt;
   &lt;div&gt;
      &lt;textarea&gt;&lt;/textarea&gt;
   &lt;/div&gt;
&lt;/body&gt;y&gt;
&lt;/html&gt;


The backtrace:

ASSERTION FAILED: prev != *this
/home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/VisiblePosition.cpp(89) : WebCore::VisiblePosition WebCore::VisiblePosition::previous(WebCore::EditingBoundaryCrossingRule) const
1   0x7ffff5ed9db5 WTFCrash
2   0x7ffff10e335f WebCore::VisiblePosition::previous(WebCore::EditingBoundaryCrossingRule) const
3   0x7ffff10b1e8c WebCore::InsertListCommand::listifyParagraph(WebCore::VisiblePosition const&amp;, WebCore::QualifiedName const&amp;)
4   0x7ffff10b139c WebCore::InsertListCommand::doApplyForSingleParagraph(bool, WebCore::HTMLQualifiedName const&amp;, WebCore::Range*)
5   0x7ffff10b0a21 WebCore::InsertListCommand::doApply()
6   0x7ffff106123d WebCore::CompositeEditCommand::apply()
7   0x7ffff1061031 WebCore::applyCommand(WTF::PassRefPtr&lt;WebCore::CompositeEditCommand&gt;)
8   0x7ffff109a0cb
9   0x7ffff109d1b4 WebCore::Editor::Command::execute(WTF::String const&amp;, WebCore::Event*) const
10  0x7ffff0f575dc WebCore::Document::execCommand(WTF::String const&amp;, bool, WTF::String const&amp;)
11  0x7ffff1f334f1 WebCore::jsDocumentPrototypeFunctionExecCommand(JSC::ExecState*)
12  0x7fff9b6cb0b4

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5ed9dba in WTFCrash () at /home/reni2/data/REPOS/webkit_sec/Source/WTF/wtf/Assertions.cpp:333
333	    *(int *)(uintptr_t)0xbbadbeef = 0;
(gdb) bt
#0  0x00007ffff5ed9dba in WTFCrash () at /home/reni2/data/REPOS/webkit_sec/Source/WTF/wtf/Assertions.cpp:333
#1  0x00007ffff10e335f in WebCore::VisiblePosition::previous (this=0x7fffffffb7b0, rule=WebCore::CannotCrossEditingBoundary)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/VisiblePosition.cpp:89
#2  0x00007ffff10b1e8c in WebCore::InsertListCommand::listifyParagraph (this=0x1124410, originalStart=..., listTag=...)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/InsertListCommand.cpp:348
#3  0x00007ffff10b139c in WebCore::InsertListCommand::doApplyForSingleParagraph (this=0x1124410, forceCreateList=false, listTag=..., 
    currentSelection=0x1138530) at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/InsertListCommand.cpp:256
#4  0x00007ffff10b0a21 in WebCore::InsertListCommand::doApply (this=0x1124410)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/InsertListCommand.cpp:192
#5  0x00007ffff106123d in WebCore::CompositeEditCommand::apply (this=0x1124410)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:227
#6  0x00007ffff1061031 in WebCore::applyCommand (command=...) at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/CompositeEditCommand.cpp:182
#7  0x00007ffff109a0cb in WebCore::executeInsertOrderedList (frame=...) at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:551
#8  0x00007ffff109d1b4 in WebCore::Editor::Command::execute (this=0x7fffffffbc50, parameter=..., triggeringEvent=0x0)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/editing/EditorCommand.cpp:1741
#9  0x00007ffff0f575dc in WebCore::Document::execCommand (this=0x9e8ce0, commandName=..., userInterface=false, value=...)
    at /home/reni2/data/REPOS/webkit_sec/Source/WebCore/dom/Document.cpp:4217
#10 0x00007ffff1f334f1 in WebCore::jsDocumentPrototypeFunctionExecCommand (exec=0x7fffffffbd50)
    at /home/reni2/data/REPOS/webkit_sec/WebKitBuild/Debug/DerivedSources/WebCore/JSDocument.cpp:4736
#11 0x00007fff9b6cb0b4 in ?? ()
#12 0x00007fffffffbdb0 in ?? ()
#13 0x00007ffff5ec4fb5 in llint_op_call () from /home/reni2/data/REPOS/webkit_sec/WebKitBuild/Debug/lib/libjavascriptcore_efl.so.0
#14 0x0000000000000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1139922</commentid>
    <comment_count>1</comment_count>
      <attachid>264928</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2015-11-06 02:41:31 -0800</bug_when>
    <thetext>Created attachment 264928
Test

Replacing the original test case since it doesn&apos;t reproduce the issue anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217176</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-03 14:09:33 -0700</bug_when>
    <thetext>This reproduces under r204037.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217177</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-08-03 14:09:49 -0700</bug_when>
    <thetext>&lt;rdar://problem/27685432&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1926936</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-20 09:45:56 -0800</bug_when>
    <thetext>This still assert using attached test while using debug build based of WebKit revision 259136@main.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>228256</attachid>
            <date>2014-04-01 01:38:36 -0700</date>
            <delta_ts>2015-11-06 02:41:31 -0800</delta_ts>
            <desc>Test case</desc>
            <filename>lastCrash.html</filename>
            <type>text/html</type>
            <size>363</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">ICAgPGhlYWQ+CiAgICAgIDxzY3JpcHQ+CiAgICAgICAgIGZ1bmN0aW9uIHJ1blRlc3QgKCkgewog
ICAgICAgICAgICBkb2N1bWVudC5leGVjQ29tbWFuZCgic2VsZWN0YWxsIiwgdHJ1ZSwgbnVsbCk7
CiAgICAgICAgICAgIGRvY3VtZW50LmV4ZWNDb21tYW5kKCJpbnNlcnRvcmRlcmVkbGlzdCIsIGZh
bHNlLCBudWxsKTsKICAgICAgICAgfQogICAgICA8L3NjcmlwdD4KICAgPC9oZWFkPgogICA8Ym9k
eSBvbmxvYWQ9InJ1blRlc3QoKTsiIGNvbnRlbnRlZGl0YWJsZT0idHJ1ZSI+CiAgICAgIDx2aWRl
bz4gPC92aWRlbz4KICAgICAgPGRpdj4KICAgICAgICAgPHRleHRhcmVhPjwvdGV4dGFyZWE+CiAg
ICAgIDwvZGl2PgogICA8L2JvZHk+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>264928</attachid>
            <date>2015-11-06 02:41:31 -0800</date>
            <delta_ts>2015-11-06 02:41:31 -0800</delta_ts>
            <desc>Test</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>229</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdWIgY29udGVudGVkaXRhYmxlPSJmYWxzZSI+PC9zdWI+CjxzcGFu
Pjwvc3Bhbj4KPGxpPjwvbGk+CjxzY3JpcHQ+CiAgICBkb2N1bWVudC5kZXNpZ25Nb2RlID0gJ29u
JzsKICAgIGRvY3VtZW50LmV4ZWNDb21tYW5kKCJzZWxlY3RBbGwiLCBmYWxzZSwgbnVsbCk7CiAg
ICBkb2N1bWVudC5leGVjQ29tbWFuZCgiaW5kZW50IiAsIGZhbHNlICwgbnVsbCk7Cjwvc2NyaXB0
Pg==
</data>

          </attachment>
      

    </bug>

</bugzilla>