From dc6a0bf8e93e17842fbdc52f55dbb2d683b39d9c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 31 Aug 2019 21:09:03 -0700 Subject: [PATCH] obs-browser: Fix browser panel crash Before, we were calling DestroyWindow on the browser panel HWND from the CEF UI thread, which meant that the main program thread had to process window messages in order for that message to successfully through as DestroyWindow blocks on the WM_DESTROY/WM_NCDESTROY window messages. Unfortunately, this also had the side-effect of processing all queued Qt events, which, when called in the destructor of a window like this, can result in undefined behavior; specifically crashes, which were occurring due to this. Especially when browser panels were in docks and docked to the main window. So, instead of calling DestroyWindow in another thread and then processing events in the main thread, call DestroyWindow directly in the main thread to get WM_DESTROY/WM_NCDESTROY and only those processed on the spot. This appears to fix the crashes due to the undefined behavior when closing browser panels. --- plugins/obs-browser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/obs-browser b/plugins/obs-browser index 21b2ce1c2..17706ea76 160000 --- a/plugins/obs-browser +++ b/plugins/obs-browser @@ -1 +1 @@ -Subproject commit 21b2ce1c26a816edb80330ea6a9973032c8d71d8 +Subproject commit 17706ea76cea57fc8a351fe05f67bbdf1b1e3e71