Repository navigation
Fix the crash leaving fullscreen on Windows - #39
Merged
Merged
Conversation
…oaded Crash dumps from the TV PC show every flex.exe crash on 0.21.0 is in winit's taskbar_mark_fullscreen, reading a vtable inside explorerframe.dll after it was unloaded. winit caches the taskbar COM object from that DLL forever, so pin the DLL at startup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The crash when leaving fullscreen on the TV PC, found from its crash dumps.
All six flex.exe crashes on 0.21.0 (Oct 24–28) are the same: winit's
taskbar_mark_fullscreencalls the taskbar COM object it created the first time the window went fullscreen, and reads its vtable fromexplorerframe.dll, which by then has been unloaded (the dumps' unloaded-module list puts the bad address inside it). winit caches that object for good, so the next fullscreen change crashes.The existing workaround (keeping COM initialised on the UI thread) was running but didn't stop the DLL being unloaded. Flex now also pins
explorerframe.dllat startup (LoadLibraryW+GetModuleHandleExW(PIN)), so nothing can unload it.Tested: builds and passes clippy for
x86_64-pc-windows-gnu. Needs trying on the TV PC: toggle fullscreen a few times, especially after playing videos.Not fixed here (both outside Flex): SVP crashing in its OpenCL code as a video starts, and eframe's
make_current().unwrap()panic when the display goes away.