<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ThreadedCompositor] Opening the inspector in a window causes a crash."
   href="https://bugs.webkit.org/show_bug.cgi?id=154444">bug 154444</a>
              from <span class="vcard"><a class="email" href="mailto:changseok.oh&#64;collabora.com" title="ChangSeok Oh &lt;changseok.oh&#64;collabora.com&gt;"> <span class="fn">ChangSeok Oh</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154444#c8">comment #8</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=154444#c6">comment #6</a>)
&gt; &gt; (In reply to <a href="show_bug.cgi?id=154444#c5">comment #5</a>)
&gt; &gt; &gt; (In reply to <a href="show_bug.cgi?id=154444#c4">comment #4</a>)
&gt; &gt; &gt; &gt; (In reply to <a href="show_bug.cgi?id=154444#c3">comment #3</a>)
&gt; &gt; &gt; &gt; &gt; Created <span class=""><a href="attachment.cgi?id=272106&amp;action=diff" name="attach_272106" title="Patch">attachment 272106</a> <a href="attachment.cgi?id=272106&amp;action=edit" title="Patch">[details]</a></span>
&gt; &gt; &gt; &gt; &gt; Patch
&gt; &gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; The threaded compositor doesn't handle the case of destroying the native
&gt; &gt; &gt; &gt; &gt; surface handle and keeps using the GL context for the destroyed native
&gt; &gt; &gt; &gt; &gt; surface. I think this patch also fixes <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK][Threaded Compositor] X errors when closing the browser"
   href="show_bug.cgi?id=154071">bug #154071</a>, since now when the web
&gt; &gt; &gt; &gt; &gt; view is destroyed and unrealize method destroys the surface the threaded
&gt; &gt; &gt; &gt; &gt; compositor correctly handles this case.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Thanks for this patch! I am also working on this though, you are faster than
&gt; &gt; &gt; &gt; me. =) At glance, your apporach looks pretty different from mine. I don't
&gt; &gt; &gt; &gt; have time to look into the detail now. I believe yoon will review the patch.
&gt; &gt; &gt; &gt; ;)
&gt; &gt; &gt; 
&gt; &gt; &gt; What approach were you following? It could be better than mine.
&gt; &gt; 
&gt; &gt; My idea is to destroy only the compositing thread and recreate it without
&gt; &gt; touching others like glContext and CoordinatedGraphicsScene, I have a rough
&gt; &gt; patch doing that, but it will take some more time until being ready to
&gt; &gt; share. Let me share it with you when it is ready.
&gt; &gt; BTW, I am still seeing a crash even after applying your patch. Try to
&gt; &gt; repeatedly open/close the inspector repeatedly by ctrl + shift + i or
&gt; &gt; open/close it in a new window over again.
&gt; 
&gt; I'm unable to make it crash with my patch applied.</span >

Hrm. I am not sure that the crash is related with your change, but it surely happens. I don't know the condition yet, but fortunately I got a backtrace.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ff6b968b700 (LWP 28787)]
0x00007ff716eba471 in WebKit::CoordinatedBackingStoreTile::setBackBuffer(WebCore::IntRect const&amp;, WebCore::IntRect const&amp;, WTF::PassRefPtr&lt;WebCore::CoordinatedSurface&gt;, WebCore::IntPoint const&amp;) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
(gdb) bt
#0  0x00007ff716eba471 in WebKit::CoordinatedBackingStoreTile::setBackBuffer(WebCore::IntRect const&amp;, WebCore::IntRect const&amp;, WTF::PassRefPtr&lt;WebCore::CoordinatedSurface&gt;, WebCore::IntPoint const&amp;) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1  0x00007ff716eba57b in WebKit::CoordinatedBackingStore::updateTile(unsigned int, WebCore::IntRect const&amp;, WebCore::IntRect const&amp;, WTF::PassRefPtr&lt;WebCore::CoordinatedSurface&gt;, WebCore::IntPoint const&amp;) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2  0x00007ff716ec05d4 in WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded(WebCore::TextureMapperLayer*, WebCore::CoordinatedGraphicsLayerState const&amp;) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3  0x00007ff716ec1b58 in WebKit::CoordinatedGraphicsScene::setLayerState(unsigned int, WebCore::CoordinatedGraphicsLayerState const&amp;) () from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4  0x00007ff716ec2575 in WebKit::CoordinatedGraphicsScene::commitSceneState(WebCore::CoordinatedGraphicsState const&amp;) () from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#5  0x00007ff716ebe241 in WebKit::CoordinatedGraphicsScene::syncRemoteContent() ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#6  0x00007ff716ebe710 in WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext(WebCore::TransformationMatrix const&amp;, float, WebCore::FloatRect const&amp;, WebCore::Color const&amp;, bool, WebCore::FloatPoint const&amp;, unsigned int) () from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#7  0x00007ff716ec56c3 in WebKit::ThreadedCompositor::renderLayerTree() ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#8  0x00007ff716ec8f12 in WebKit::CompositingRunLoop::updateTimerFired() ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#9  0x00007ff7155776fa in WTF::RunLoop::TimerBase::TimerBase(WTF::RunLoop&amp;)::{lambda(void*)#1}::_FUN(void*) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#10 0x00007ff71086481a in g_main_dispatch (context=0x7ff6a8000900)
    at /home/changseok/Projects/WebKit/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3122
#11 g_main_context_dispatch (context=context&#64;entry=0x7ff6a8000900)
    at /home/changseok/Projects/WebKit/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3737
#12 0x00007ff710864b98 in g_main_context_iterate (context=0x7ff6a8000900, block=block&#64;entry=1, 
    dispatch=dispatch&#64;entry=1, self=&lt;optimized out&gt;)
    at /home/changseok/Projects/WebKit/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:3808
#13 0x00007ff710864eb2 in g_main_loop_run (loop=0x7ff6a8001240)
    at /home/changseok/Projects/WebKit/WebKitBuild/DependenciesGTK/Source/glib-2.44.1/glib/gmain.c:4002
#14 0x00007ff715577aa0 in WTF::RunLoop::run() ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#15 0x00007ff716ec5ea8 in WebKit::ThreadedCompositor::runCompositingThread() ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#16 0x00007ff715549395 in WTF::threadEntryPoint(void*) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#17 0x00007ff71557573a in WTF::wtfThreadEntryPoint(void*) ()
   from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
#18 0x00007ff71414d60a in start_thread () from /lib64/libpthread.so.0
#19 0x00007ff70bea6a4d in clone () from /lib64/libc.so.6</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>