[Webkit-unassigned] [Bug 161605] [GTK] Crash of WebProcess on the last WebView disconnect
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 6 13:56:33 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=161605
--- Comment #5 from Michael Catanzaro <mcatanzaro at igalia.com> ---
OK, so... there are a couple different ways to fix this, but fundamentally the problem is the GLContext class hands off ownership of new GLContexts to callers in its create functions, returning std::unique_ptrs. Then it goes behind the callers' backs and deletes them all in an exit handler if they haven't already been deleted. That fails here, as PlatformDisplay also gets deleted in an exit handler, which runs after GLContext's exit handler, causing the same GLContext to be deleted twice.
There are many ways to fix this... remove the GLContext exit handler (seems like the correct solution, but it carries a warning of possibly crashing the X server when using nvidia proprietary driver? do we care?), leak the PlatformDisplay's GLContext by calling release() on the unique_ptr and rely on the GLContext exit handler to free it, create a throwaway GLContext the first time PlatformDisplay::initializeEGLDisplay is called to ensure the GLContext exit handler gets registered first (and therefore executed last at exit time)... let's see if Carlos Garcia has an opinion on what's best.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160906/7b1cd69a/attachment.html>
More information about the webkit-unassigned
mailing list