<?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>152867</bug_id>
          
          <creation_ts>2016-01-07 16:14:22 -0800</creation_ts>
          <short_desc>Web Inspector: Error when closing page with WebInspector open</short_desc>
          <delta_ts>2016-02-06 09:35:16 -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>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=153945</see_also>
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Devin Rousso">hi</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>bburg</cc>
    
    <cc>commit-queue</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>mattbaker</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1153671</commentid>
    <comment_count>0</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2016-01-07 16:14:22 -0800</bug_when>
    <thetext>* STEPS TO REPRODUCE
1. Go to &lt;https://www.apple.com/&gt;
2. Open the inspector via context menu &quot;Inspect Element&quot;
3. Close the tab via Cmd-W

* CRASH
thread #1: tid = 0xc5ef59, 0x0000000100f7bf76 WebKit`WebKit::WebPageProxy::inspectorAttachmentView(this=0x0000000000000000) + 4 at WebPageProxyMac.mm:590, queue = &apos;com.apple.main-thread&apos;, stop reason = EXC_BAD_ACCESS (code=1, address=0x38)
    frame #0: 0x0000000100f7bf76 WebKit`WebKit::WebPageProxy::inspectorAttachmentView(this=0x0000000000000000) + 4 at WebPageProxyMac.mm:590
   587 	#if WK_API_ENABLED
   588 	NSView *WebPageProxy::inspectorAttachmentView()
   589 	{
-&gt; 590 	    return m_pageClient.inspectorAttachmentView();
   591 	}
   592 	
   593 	_WKRemoteObjectRegistry *WebPageProxy::remoteObjectRegistry()

* BACKTRACE
thread #1: tid = 0xc5ef59, 0x0000000100f7bf76 WebKit`WebKit::WebPageProxy::inspectorAttachmentView(this=0x0000000000000000) + 4 at WebPageProxyMac.mm:590, queue = &apos;com.apple.main-thread&apos;, stop reason = EXC_BAD_ACCESS (code=1, address=0x38)
  * frame #0: 0x0000000100f7bf76 WebKit`WebKit::WebPageProxy::inspectorAttachmentView(this=0x0000000000000000) + 4 at WebPageProxyMac.mm:590
    frame #1: 0x0000000100f25e70 WebKit`WebKit::WebInspectorProxy::platformDetach(this=0x00000001054a66f8) + 30 at WebInspectorProxyMac.mm:752
    frame #2: 0x0000000100f222d3 WebKit`WebKit::WebInspectorProxy::didClose(this=0x00000001054a66f8) + 109 at WebInspectorProxy.cpp:592
    frame #3: 0x0000000100f22255 WebKit`WebKit::WebInspectorProxy::invalidate(this=0x00000001054a66f8) + 139 at WebInspectorProxy.cpp:120
    frame #4: 0x0000000100f5dc3e WebKit`WebKit::WebPageProxy::resetState(this=0x00000001080a8c18, resetStateReason=PageInvalidated) + 132 at WebPageProxy.cpp:4934
    frame #5: 0x0000000100f5c77d WebKit`WebKit::WebPageProxy::close(this=0x00000001080a8c18) + 129 at WebPageProxy.cpp:822
    frame #6: 0x00007fff8e6301d5 Safari`Safari::SearchableWebContentViewController::close() + 205
    frame #7: 0x00007fff8e34c9b5 Safari`Safari::BrowserContentViewController::close() + 1129
    frame #8: 0x00007fff8e3e4ab6 Safari`-[BrowserWindowControllerMac _closeTabWithoutConfirming:allowUndo:] + 1389
    frame #9: 0x00007fff8e3e4547 Safari`-[BrowserWindowControllerMac _closeTabWithoutConfirming:] + 34
    frame #10: 0x00007fff8e3d555a Safari`-[BrowserWindowControllerMac closeTabOrWindowWithoutConfirming:] + 327
    frame #11: 0x00007fff8e3aab2a Safari`Safari::BrowserTab::closeWithoutConfirming() + 56
    frame #12: 0x00007fff8e589cf5 Safari`Safari::WK::closePage(OpaqueWKPage const*, void const*) + 39
    frame #13: 0x0000000100f7e948 WebKit`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) [inlined] void IPC::callMemberFunctionImpl&lt;WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(bool), std::__1::tuple&lt;bool&gt;, 0ul&gt;(object=0x00000001080a8c18, function=0x0000000000000000)(bool), std::__1::tuple&lt;bool&gt;&amp;&amp;, std::index_sequence&lt;0ul&gt;) + 12 at HandleMessage.h:16
    frame #14: 0x0000000100f7e93c WebKit`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) [inlined] void IPC::callMemberFunction&lt;WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(bool), std::__1::tuple&lt;bool&gt;, std::make_index_sequence&lt;1ul&gt; &gt;(function=0x0000000000000000)(bool)) at HandleMessage.h:22
    frame #15: 0x0000000100f7e93c WebKit`WebKit::WebPageProxy::didReceiveMessage(IPC::Connection&amp;, IPC::MessageDecoder&amp;) [inlined] void IPC::handleMessage&lt;Messages::WebPageProxy::ClosePage, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(bool)&gt;(function=0x0000000000000000)(bool)) + 24 at HandleMessage.h:92
    frame #16: 0x0000000100f7e924 WebKit`WebKit::WebPageProxy::didReceiveMessage(this=0x00000001080a8c18, connection=&lt;unavailable&gt;, decoder=&lt;unavailable&gt;) + 1474 at WebPageProxyMessageReceiver.cpp:232
    frame #17: 0x0000000100de94b7 WebKit`IPC::MessageReceiverMap::dispatchMessage(this=&lt;unavailable&gt;, connection=0x000000010a3522b0, decoder=0x000000010a3d4088) + 113 at MessageReceiverMap.cpp:102
    frame #18: 0x0000000100fc1686 WebKit`WebKit::WebProcessProxy::didReceiveMessage(this=0x000000010a36c5c0, connection=0x000000010a3522b0, decoder=0x000000010a3d4088) + 24 at WebProcessProxy.cpp:488
    frame #19: 0x0000000100d9e1e7 WebKit`IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::MessageDecoder, std::__1::default_delete&lt;IPC::MessageDecoder&gt; &gt;) [inlined] IPC::Connection::dispatchMessage(this=&lt;unavailable&gt;, decoder=&lt;unavailable&gt;) + 127 at Connection.cpp:891
    frame #20: 0x0000000100d9e1da WebKit`IPC::Connection::dispatchMessage(this=0x000000010a3522b0, message=unique_ptr&lt;IPC::MessageDecoder, std::__1::default_delete&lt;IPC::MessageDecoder&gt; &gt; @ 0x00007fff5fbfde80) + 114 at Connection.cpp:922
    frame #21: 0x0000000100da0b06 WebKit`IPC::Connection::dispatchOneMessage(this=0x000000010a3522b0) + 126 at Connection.cpp:953
    frame #22: 0x0000000100866b85 JavaScriptCore`WTF::RunLoop::performWork() [inlined] std::__1::function&lt;void ()&gt;::operator(this=0x000000000000000a)() const + 437 at functional:1793
    frame #23: 0x0000000100866b7b JavaScriptCore`WTF::RunLoop::performWork(this=0x000000010a3f9000) + 427 at RunLoop.cpp:104
    frame #24: 0x0000000100866f32 JavaScriptCore`WTF::RunLoop::performWork(context=&lt;unavailable&gt;) + 34 at RunLoopCF.cpp:38
    frame #25: 0x00007fff94c3f5c1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #26: 0x00007fff94c3141c CoreFoundation`__CFRunLoopDoSources0 + 556
    frame #27: 0x00007fff94c3093f CoreFoundation`__CFRunLoopRun + 927
    frame #28: 0x00007fff94c30338 CoreFoundation`CFRunLoopRunSpecific + 296
    frame #29: 0x00007fff8ada8935 HIToolbox`RunCurrentEventLoopInMode + 235
    frame #30: 0x00007fff8ada876f HIToolbox`ReceiveNextEventCommon + 432
    frame #31: 0x00007fff8ada85af HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
    frame #32: 0x00007fff9200e0ee AppKit`_DPSNextEvent + 1067
    frame #33: 0x00007fff923da943 AppKit`-[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
    frame #34: 0x00007fff8e32f37f Safari`-[BrowserApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 252
    frame #35: 0x00007fff92003fc8 AppKit`-[NSApplication run] + 682
    frame #36: 0x00007fff91f86520 AppKit`NSApplicationMain + 1176
    frame #37: 0x00007fff950ab5ad libdyld.dylib`start + 1
    frame #38: 0x00007fff950ab5ad libdyld.dylib`start + 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153672</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-01-07 16:14:41 -0800</bug_when>
    <thetext>&lt;rdar://problem/24099423&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162424</commentid>
    <comment_count>2</comment_count>
      <attachid>270751</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-02-05 10:29:27 -0800</bug_when>
    <thetext>Created attachment 270751
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162426</commentid>
    <comment_count>3</comment_count>
      <attachid>270751</attachid>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2016-02-05 10:32:49 -0800</bug_when>
    <thetext>Comment on attachment 270751
Patch

r=me but please test under debug build if possible before committing. This change may have been included in my attempted fix for https://bugs.webkit.org/show_bug.cgi?id=152080.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162457</commentid>
    <comment_count>4</comment_count>
      <attachid>270751</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-02-05 12:31:20 -0800</bug_when>
    <thetext>Comment on attachment 270751
Patch

Debug build is good. No test failures locally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162475</commentid>
    <comment_count>5</comment_count>
      <attachid>270751</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-02-05 13:19:09 -0800</bug_when>
    <thetext>Comment on attachment 270751
Patch

Clearing flags on attachment: 270751

Committed r196183: &lt;http://trac.webkit.org/changeset/196183&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1162476</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-02-05 13:19:13 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>270751</attachid>
            <date>2016-02-05 10:29:27 -0800</date>
            <delta_ts>2016-02-05 13:19:09 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-152867-20160205102903.patch</filename>
            <type>text/plain</type>
            <size>1836</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTk2MDM5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggZmYxODkwY2YyMDhiZDMx
M2NjMjgxODZmMGZhMjgxYTg3ZWMxMjdhMi4uYjE5N2M2MjU0ODJkNGVjZDQ5OGM0MTc3NzcxMTM3
MWQyOTA1YjVlZSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAt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