<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@collabora.com" title="ChangSeok Oh <changseok.oh@collabora.com>"> <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">> (In reply to <a href="show_bug.cgi?id=154444#c6">comment #6</a>)
> > (In reply to <a href="show_bug.cgi?id=154444#c5">comment #5</a>)
> > > (In reply to <a href="show_bug.cgi?id=154444#c4">comment #4</a>)
> > > > (In reply to <a href="show_bug.cgi?id=154444#c3">comment #3</a>)
> > > > > Created <span class=""><a href="attachment.cgi?id=272106&action=diff" name="attach_272106" title="Patch">attachment 272106</a> <a href="attachment.cgi?id=272106&action=edit" title="Patch">[details]</a></span>
> > > > > Patch
> > > > >
> > > > > The threaded compositor doesn't handle the case of destroying the native
> > > > > surface handle and keeps using the GL context for the destroyed native
> > > > > 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
> > > > > view is destroyed and unrealize method destroys the surface the threaded
> > > > > compositor correctly handles this case.
> > > >
> > > > Thanks for this patch! I am also working on this though, you are faster than
> > > > me. =) At glance, your apporach looks pretty different from mine. I don't
> > > > have time to look into the detail now. I believe yoon will review the patch.
> > > > ;)
> > >
> > > What approach were you following? It could be better than mine.
> >
> > My idea is to destroy only the compositing thread and recreate it without
> > touching others like glContext and CoordinatedGraphicsScene, I have a rough
> > patch doing that, but it will take some more time until being ready to
> > share. Let me share it with you when it is ready.
> > BTW, I am still seeing a crash even after applying your patch. Try to
> > repeatedly open/close the inspector repeatedly by ctrl + shift + i or
> > open/close it in a new window over again.
>
> 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&, WebCore::IntRect const&, WTF::PassRefPtr<WebCore::CoordinatedSurface>, WebCore::IntPoint const&) ()
from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
(gdb) bt
#0 0x00007ff716eba471 in WebKit::CoordinatedBackingStoreTile::setBackBuffer(WebCore::IntRect const&, WebCore::IntRect const&, WTF::PassRefPtr<WebCore::CoordinatedSurface>, WebCore::IntPoint const&) ()
from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1 0x00007ff716eba57b in WebKit::CoordinatedBackingStore::updateTile(unsigned int, WebCore::IntRect const&, WebCore::IntRect const&, WTF::PassRefPtr<WebCore::CoordinatedSurface>, WebCore::IntPoint const&) ()
from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#2 0x00007ff716ec05d4 in WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded(WebCore::TextureMapperLayer*, WebCore::CoordinatedGraphicsLayerState const&) ()
from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#3 0x00007ff716ec1b58 in WebKit::CoordinatedGraphicsScene::setLayerState(unsigned int, WebCore::CoordinatedGraphicsLayerState const&) () from /home/changseok/Projects/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#4 0x00007ff716ec2575 in WebKit::CoordinatedGraphicsScene::commitSceneState(WebCore::CoordinatedGraphicsState const&) () 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&, float, WebCore::FloatRect const&, WebCore::Color const&, bool, WebCore::FloatPoint const&, 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&)::{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@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@entry=1,
dispatch=dispatch@entry=1, self=<optimized out>)
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>