I'm getting a crash on exit when egl is being terminated. atidxx32.dll!5aa314c8() [Frames below may be incorrect and/or missing, no symbols loaded for atidxx32.dll] atiuxpag.dll!73fb29f7() d3d11.dll!5814e03c() d3d11.dll!5814b4dd() d3d11.dll!5814d979() d3d11.dll!5814bb03() d3d11.dll!5816cbe8() d3d11.dll!5816c59d() d3d11.dll!5816cb06() d3d11.dll!5816c8c0() d3d11.dll!5816c75e() d3d11.dll!58149241() > libGLESv2.dll!rx::SwapChain11::release() Line 57 + 0xd bytes C++ libGLESv2.dll!rx::SwapChain11::`scalar deleting destructor'() + 0x11 bytes C++ libEGL.dll!egl::Surface::`scalar deleting destructor'() + 0x1e bytes C++ libEGL.dll!egl::Display::terminate() Line 125 + 0x15 bytes C++ libEGL.dll!eglTerminate(void * dpy) Line 157 C++ WebKit.dll!WebCore::PlatformDisplayWin::`scalar deleting destructor'() + 0x1a bytes C++ WebKit.dll!`WebCore::PlatformDisplay::sharedDisplay'::`2'::`dynamic atexit destructor for 'display''() + 0x10 bytes C++ WebKit.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 416 C WebKit.dll!__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 522 + 0xc bytes C WebKit.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 472 + 0xe bytes C ntdll.dll!77668d44()
Created attachment 254631 [details] Patch
Comment on attachment 254631 [details] Patch I don't think this is correct, I didn't use NeverDestroyed on purpose, since both X11 and wayland display implementation have cleanup in their destructors. I think the point here is why it crashes on windows when terminating EGL, and if it's a windows specific bug, I would add an ifdef to the destructor for windows platform to avoid the EGL termination
Created attachment 254637 [details] Patch
(In reply to comment #2) > Comment on attachment 254631 [details] > Patch > > I don't think this is correct, I didn't use NeverDestroyed on purpose, since > both X11 and wayland display implementation have cleanup in their > destructors. I think the point here is why it crashes on windows when > terminating EGL, and if it's a windows specific bug, I would add an ifdef to > the destructor for windows platform to avoid the EGL termination Thanks for reviewing :) Updated patch.
Comment on attachment 254637 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254637&action=review Ok, I think it would be interesting to know why it crashes, though, you might be hiding an actual bug rather than fixing it. > Source/WebCore/platform/graphics/PlatformDisplay.cpp:112 > +#if USE(EGL) && !PLATFORM(WIN) // WinCairo crashes when terminating EGL on exit I would move the comment to the previous line, finishing with a period, and adding a link to this bug. And if this is not supposed to crash on termination, it should be a FIXME comment to make it clear this is a workaround, not the proper fix.
I believe it crashes because libEGL.dll is unloaded before eglTerminate is called.
Created attachment 254644 [details] Patch
Committed r185411: <http://trac.webkit.org/changeset/185411>
Could this be bug #157973?