vlc 4: Crash on exit inside Qt/ANGLE
Windows 10 with VLC build from master (16e91345): On closing the Qt GUI, I get a segfault inside ANGLE.
Not sure if I am looking at the right Qt source, but the crashing line (Renderer11.cpp:2140
) seems to be SafeRelease(mDevice);
. Looks like a use-after-free because the memory location has repeating 0xfeeefeee.
Backtrace:
Thread 19 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 15252.0x10f0]
0x00007ffc312e81da in SafeRelease<ID3D11Device*> (resource=@0x24cfed22ce0: 0x24cff68a858) at ../../../3rdparty/angle/src
/common/angleutils.h:93
93 ../../../3rdparty/angle/src/common/angleutils.h: No such file or directory.
(gdb) bt
#0 0x00007ffc312e81da in SafeRelease<ID3D11Device*> (resource=@0x24cfed22ce0: 0x24cff68a858)
at ../../../3rdparty/angle/src/common/angleutils.h:93
#1 rx::Renderer11::release (this=this@entry=0x24cfed201f0)
at ../../../3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp:2140
#2 0x00007ffc312f21f5 in rx::Renderer11::~Renderer11 (this=0x24cfed201f0, __in_chrg=<optimized out>)
at ../../../3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp:600
#3 0x00007ffc312f238e in rx::Renderer11::~Renderer11 (this=0x24cfed201f0, __in_chrg=<optimized out>)
at ../../../3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp:601
#4 0x00007ffc312ddc27 in SafeDelete<rx::RendererD3D> (resource=@0x24cfed4cd50: 0x24cfed201f0)
at ../../../3rdparty/angle/src/common/angleutils.h:101
#5 rx::DisplayD3D::terminate (this=0x24cfed4cd10)
at ../../../3rdparty/angle/src/libANGLE/renderer/d3d/DisplayD3D.cpp:232
#6 0x00007ffc31207a6d in egl::Display::terminate (this=this@entry=0x24cfed4ca80)
at ../../../3rdparty/angle/src/libANGLE/Display.cpp:569
#7 0x00007ffc311bfccb in egl::Terminate (dpy=0x24cfed4ca80)
at ../../../3rdparty/angle/src/libGLESv2/entry_points_egl.cpp:119
#8 0x00007ffc32027aae in QWindowsEGLStaticContext::~QWindowsEGLStaticContext (this=0x24cfed7c630,
__in_chrg=<optimized out>) at qwindowseglcontext.cpp:292
#9 0x00007ffc320a83e7 in QScopedPointerDeleter<QWindowsStaticOpenGLContext>::cleanup (pointer=<optimized out>)
at ../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52
#10 QScopedPointer<QWindowsStaticOpenGLContext, QScopedPointerDeleter<QWindowsStaticOpenGLContext> >::~QScopedPointer
(this=0x24cfed079f8, __in_chrg=<optimized out>)
at ../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
#11 QWindowsIntegrationPrivate::~QWindowsIntegrationPrivate (this=0x24cfed07970, __in_chrg=<optimized out>)
at qwindowsintegration.cpp:271
#12 0x00007ffc31da2f2c in QScopedPointerDeleter<QWindowsIntegrationPrivate>::cleanup (pointer=0x24cfed07970)
at ../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:60
#13 QScopedPointerDeleter<QWindowsIntegrationPrivate>::cleanup (pointer=0x24cfed07970)
--Type <RET> for more, q to quit, c to continue without paging--
at ../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52
#14 QScopedPointer<QWindowsIntegrationPrivate, QScopedPointerDeleter<QWindowsIntegrationPrivate> >::~QScopedPointer (
this=<optimized out>, __in_chrg=<optimized out>)
at ../../../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
#15 QWindowsIntegration::~QWindowsIntegration (this=<optimized out>, __in_chrg=<optimized out>)
at qwindowsintegration.cpp:289
#16 0x00007ffc31f7e98a in QWindowsGdiIntegration::~QWindowsGdiIntegration (this=0x24cfed07600,
__in_chrg=<optimized out>) at qwindowsgdiintegration.cpp:62
#17 QWindowsGdiIntegration::~QWindowsGdiIntegration (this=0x24cfed07600, __in_chrg=<optimized out>)
at qwindowsgdiintegration.cpp:62
#18 0x00007ffc31f253bb in QGuiApplicationPrivate::~QGuiApplicationPrivate (this=0x24cfed05760,
__in_chrg=<optimized out>) at kernel/qguiapplication.cpp:1728
#19 0x00007ffc31d2bc0e in QApplicationPrivate::~QApplicationPrivate (this=0x24cfed05760, __in_chrg=<optimized out>)
at kernel/qapplication.cpp:163
#20 0x00007ffc3244941a in QVLCApp::~QVLCApp() ()
from C:\Users\Alvin\Downloads\vlc\vlc-4.0.0-dev-win64\vlc-4.0.0-dev\plugins\gui\libqt_plugin.dll
#21 0x00007ffc30d95b38 in Thread(void*) ()
from C:\Users\Alvin\Downloads\vlc\vlc-4.0.0-dev-win64\vlc-4.0.0-dev\plugins\gui\libqt_plugin.dll
#22 0x00007ffce572f365 in vlc_atomic_notify_all ()
from C:\Users\Alvin\Downloads\vlc\vlc-4.0.0-dev-win64\vlc-4.0.0-dev\libvlccore.dll
#23 0x00007ffd2349af5a in msvcrt!_beginthreadex () from C:\WINDOWS\System32\msvcrt.dll
#24 0x00007ffd2349b02c in msvcrt!_endthreadex () from C:\WINDOWS\System32\msvcrt.dll
#25 0x00007ffd239a7034 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#26 0x00007ffd250c2651 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#27 0x0000000000000000 in ?? ()