<?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>137954</bug_id>
          
          <creation_ts>2014-10-22 05:30:57 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: !document.inPageCache() in WebCore::FrameView::layout</short_desc>
          <delta_ts>2016-08-03 17:41:35 -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>Frames</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>116980</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Renata Hodovan">rhodovan.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1043426</commentid>
    <comment_count>0</comment_count>
      <attachid>240268</attachid>
    <who name="Renata Hodovan">rhodovan.u-szeged</who>
    <bug_when>2014-10-22 05:30:57 -0700</bug_when>
    <thetext>Created attachment 240268
Test case

The failing test case:

&lt;!DOCTYPE html&gt;
&lt;script&gt;
function test() {
    document.execCommand(&quot;selectAll&quot;, false, null);
    document.execCommand(&quot;unlink&quot;   ,true,   null);
    window.open(&quot;chrome-extension://foo.bar&quot;,&quot;_top&quot;,&quot;toolbar=0,width=10&quot;,false);
}
&lt;/script&gt;
&lt;body onload=&apos;test()&apos;&gt;
&lt;object&gt;


Backtrace:

ASSERTION FAILED: !document.inPageCache()
../../Source/WebCore/page/FrameView.cpp(1160) : void WebCore::FrameView::layout(bool)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff98c1f700 (LWP 3602)]
0x00007fffedae91b5 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
321     *(int *)(uintptr_t)0xbbadbeef = 0;
#0  0x00007fffedae91b5 in WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:321
#1  0x00007ffff365f4fb in WebCore::FrameView::layout (this=0x84ff60, allowSubtree=true) at ../../Source/WebCore/page/FrameView.cpp:1160
#2  0x00007ffff302a527 in WebCore::Document::updateLayout (this=0x788a60) at ../../Source/WebCore/dom/Document.cpp:1868
#3  0x00007ffff302a62a in WebCore::Document::updateLayoutIgnorePendingStylesheets (this=0x788a60, runPostLayoutTasks=WebCore::Document::Asynchronously) at ../../Source/WebCore/dom/Document.cpp:1900
#4  0x00007ffff31a8319 in WebCore::updateSelectionByUpdatingLayoutOrStyle (frame=...) at ../../Source/WebCore/editing/FrameSelection.cpp:350
#5  0x00007ffff31aecf5 in WebCore::FrameSelection::absoluteCaretBounds (this=0x899910) at ../../Source/WebCore/editing/FrameSelection.cpp:1361
#6  0x00007ffff29dc0c1 in WebKit::WebPage::editorState (this=0x97a030) at ../../Source/WebKit2/WebProcess/WebPage/WebPage.cpp:781
#7  0x00007ffff29e93e1 in WebKit::WebPage::didChangeSelection (this=0x97a030) at ../../Source/WebKit2/WebProcess/WebPage/WebPage.cpp:4331
#8  0x00007ffff2999693 in WebKit::WebEditorClient::respondToChangedSelection (this=0xb06210, frame=0x898e20) at ../../Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp:194
#9  0x00007ffff3197941 in WebCore::Editor::respondToChangedSelection (this=0x899660, options=6) at ../../Source/WebCore/editing/Editor.cpp:3313
#10 0x00007ffff31a80c8 in WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance (this=0x899910, newSelectionPossiblyWithoutDirection=..., options=6, align=WebCore::FrameSelection::AlignCursorOnScrollIfNeeded, granularity=WebCore::CharacterGranularity) at ../../Source/WebCore/editing/FrameSelection.cpp:317
#11 0x00007ffff31ae53d in WebCore::FrameSelection::prepareForDestruction (this=0x899910) at ../../Source/WebCore/editing/FrameSelection.cpp:1284
#12 0x00007ffff3510685 in WebCore::FrameLoader::clear (this=0x898eb8, newDocument=0x8ab330, clearWindowProperties=true, clearScriptObjects=true, clearFrameView=true) at ../../Source/WebCore/loader/FrameLoader.cpp:629
#13 0x00007ffff35029a1 in WebCore::DocumentWriter::begin (this=0xa7bb50, urlReference=..., dispatch=false, ownerDocument=0x0) at ../../Source/WebCore/loader/DocumentWriter.cpp:140
#14 0x00007ffff34f0726 in WebCore::DocumentLoader::commitData (this=0xa7bab0, bytes=0xa7e110 &quot;&lt;html&gt;&lt;body&gt;URL cannot be shown&lt;/body&gt;&lt;/html&gt;&quot;, length=45) at ../../Source/WebCore/loader/DocumentLoader.cpp:790
#15 0x00007ffff29a20c7 in WebKit::WebFrameLoaderClient::committedLoad (this=0x97a800, loader=0xa7bab0, data=0xa7e110 &quot;&lt;html&gt;&lt;body&gt;URL cannot be shown&lt;/body&gt;&lt;/html&gt;&quot;, length=45) at ../../Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:891
#16 0x00007ffff34f0575 in WebCore::DocumentLoader::commitLoad (this=0xa7bab0, data=0xa7e110 &quot;&lt;html&gt;&lt;body&gt;URL cannot be shown&lt;/body&gt;&lt;/html&gt;&quot;, length=45) at ../../Source/WebCore/loader/DocumentLoader.cpp:771
#17 0x00007ffff34f0bb9 in WebCore::DocumentLoader::dataReceived (this=0xa7bab0, resource=0x0, data=0xa7e110 &quot;&lt;html&gt;&lt;body&gt;URL cannot be shown&lt;/body&gt;&lt;/html&gt;&quot;, length=45) at ../../Source/WebCore/loader/DocumentLoader.cpp:888
#18 0x00007ffff34f0400 in WebCore::DocumentLoader::continueAfterContentPolicy (this=0xa7bab0, policy=WebCore::PolicyUse) at ../../Source/WebCore/loader/DocumentLoader.cpp:750
#19 0x00007ffff34efafc in WebCore::DocumentLoader::responseReceived (this=0xa7bab0, resource=0x0, response=...) at ../../Source/WebCore/loader/DocumentLoader.cpp:653
#20 0x00007ffff34eea49 in WebCore::DocumentLoader::handleSubstituteDataLoadNow (this=0xa7bab0) at ../../Source/WebCore/loader/DocumentLoader.cpp:476
#21 0x00007ffff34fdbcc in std::_Mem_fn&lt;void (WebCore::DocumentLoader::*)(WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt;::operator()&lt;WebCore::Timer&lt;WebCore::DocumentLoader&gt;*&amp;, void&gt; (this=0xa3b250, __object=0xa7bab0) at /usr/include/c++/4.8/functional:601
#22 0x00007ffff34fcf8d in std::_Bind&lt;std::_Mem_fn&lt;void (WebCore::DocumentLoader::*)(WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt; (WebCore::DocumentLoader*, WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt;::__call&lt;void, , 0ul, 1ul&gt;(std::tuple&lt;&gt;&amp;&amp;, std::_Index_tuple&lt;0ul, 1ul&gt;) (this=0xa3b250, __args=&lt;unknown type in /home/reni/data/REPOS/webkit/WebKitBuild/Debug/lib/libwebkit2gtk-4.0.so.37, CU 0x2988f338, DIE 0x299c22c1&gt;) at /usr/include/c++/4.8/functional:1296
#23 0x00007ffff34fbb20 in std::_Bind&lt;std::_Mem_fn&lt;void (WebCore::DocumentLoader::*)(WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt; (WebCore::DocumentLoader*, WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt;::operator()&lt;, void&gt;() (this=0xa3b250) at /usr/include/c++/4.8/functional:1355
#24 0x00007ffff34fa06f in std::_Function_handler&lt;void (), std::_Bind&lt;std::_Mem_fn&lt;void (WebCore::DocumentLoader::*)(WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt; (WebCore::DocumentLoader*, WebCore::Timer&lt;WebCore::DocumentLoader&gt;*)&gt; &gt;::_M_invoke(std::_Any_data const&amp;) (__functor=...) at /usr/include/c++/4.8/functional:2071
#25 0x00007ffff26dc5a6 in std::function&lt;void ()&gt;::operator()() const (this=0xa7c340) at /usr/include/c++/4.8/functional:2464
#26 0x00007ffff34feb54 in WebCore::Timer&lt;WebCore::DocumentLoader&gt;::fired (this=0xa7c308) at ../../Source/WebCore/platform/Timer.h:133
#27 0x00007ffff373bd1f in WebCore::ThreadTimers::sharedTimerFiredInternal (this=0xb028b0) at ../../Source/WebCore/platform/ThreadTimers.cpp:132
#28 0x00007ffff373bbcd in WebCore::ThreadTimers::sharedTimerFired () at ../../Source/WebCore/platform/ThreadTimers.cpp:107
#29 0x00007ffff3bf37a3 in std::_Function_handler&lt;void (), void (*)()&gt;::_M_invoke(std::_Any_data const&amp;) (__functor=...) at /usr/include/c++/4.8/functional:2071
#30 0x00007ffff26dc5a6 in std::function&lt;void ()&gt;::operator()() const (this=0x7fffffffd4a8) at /usr/include/c++/4.8/functional:2464
#31 0x00007fffedb32896 in WTF::GMainLoopSource::voidCallback (this=0x7ffff7dd7f60 &lt;WebCore::gSharedTimer&gt;) at ../../Source/WTF/wtf/gobject/GMainLoopSource.cpp:364
#32 0x00007fffedb32ff7 in WTF::GMainLoopSource::voidSourceCallback (source=0x7ffff7dd7f60 &lt;WebCore::gSharedTimer&gt;) at ../../Source/WTF/wtf/gobject/GMainLoopSource.cpp:454
#33 0x00007fffedb31a13 in WTF::__lambda0::operator() (__closure=0x0, source=0x8add20, callback=0x7fffedb32fd4 &lt;WTF::GMainLoopSource::voidSourceCallback(WTF::GMainLoopSource*)&gt;, userData=0x7ffff7dd7f60 &lt;WebCore::gSharedTimer&gt;) at ../../Source/WTF/wtf/gobject/GMainLoopSource.cpp:247
#34 0x00007fffedb31a81 in WTF::__lambda0::_FUN (source=0x8add20, callback=0x7fffedb32fd4 &lt;WTF::GMainLoopSource::voidSourceCallback(WTF::GMainLoopSource*)&gt;, userData=0x7ffff7dd7f60 &lt;WebCore::gSharedTimer&gt;) at ../../Source/WTF/wtf/gobject/GMainLoopSource.cpp:251
#35 0x00007fffeaad1a2d in g_main_dispatch (context=0x6777f0) at gmain.c:3064
#36 g_main_context_dispatch (context=context@entry=0x6777f0) at gmain.c:3663
#37 0x00007fffeaad1d98 in g_main_context_iterate (context=0x6777f0, block=block@entry=1, dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at gmain.c:3734
#38 0x00007fffeaad205a in g_main_loop_run (loop=0xb00db0) at gmain.c:3928
#39 0x00007ffff457c386 in WTF::RunLoop::run () at ../../Source/WTF/wtf/gtk/RunLoopGtk.cpp:59
#40 0x00007ffff2ad6a46 in WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebProcessMain&gt; (argc=2, argv=0x7fffffffd8b8) at ../../Source/WebKit2/Shared/unix/ChildProcessMain.h:61
#41 0x00007ffff2ad68ab in WebKit::WebProcessMainUnix (argc=2, argv=0x7fffffffd8b8) at ../../Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:73
#42 0x0000000000400871 in main (argc=2, argv=0x7fffffffd8b8) at ../../Source/WebKit2/WebProcess/EntryPoint/unix/WebProcessMain.cpp:44</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1043665</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2014-10-22 20:19:12 -0700</bug_when>
    <thetext>Issue seems to be in Editor::respondToChangedSelection()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1217285</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2016-08-03 17:41:35 -0700</bug_when>
    <thetext>This issue no longer happens in r204037 under GuardMalloc or ASAN. If you believe there is still an issue, please reopen this bug with a revised test case.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>240268</attachid>
            <date>2014-10-22 05:30:57 -0700</date>
            <delta_ts>2014-10-22 05:30:57 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>crash.html</filename>
            <type>text/html</type>
            <size>271</size>
            <attacher name="Renata Hodovan">rhodovan.u-szeged</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzY3JpcHQ+CmZ1bmN0aW9uIHRlc3QoKSB7CiAgICBkb2N1bWVudC5l
eGVjQ29tbWFuZCgic2VsZWN0QWxsIiwgZmFsc2UsIG51bGwpOwogICAgZG9jdW1lbnQuZXhlY0Nv
bW1hbmQoInVubGluayIgICAsdHJ1ZSwgICBudWxsKTsKICAgIHdpbmRvdy5vcGVuKCJjaHJvbWUt
ZXh0ZW5zaW9uOi8vZm9vLmJhciIsIl90b3AiLCJ0b29sYmFyPTAsd2lkdGg9MTAiLGZhbHNlKTsK
fQo8L3NjcmlwdD4KPGJvZHkgb25sb2FkPSd0ZXN0KCknPgo8b2JqZWN0Pg==
</data>

          </attachment>
      

    </bug>

</bugzilla>