Skip to content

Fix the crash leaving fullscreen on Windows - #39

Merged
catchouli merged 1 commit into
mainfrom
fullscreen-crash
Oct 29, 2026
Merged

catchouli merged 1 commit into
mainfrom
fullscreen-crash

Conversation

@catchouli

Copy link
Copy Markdown
Owner

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_fullscreen calls the taskbar COM object it created the first time the window went fullscreen, and reads its vtable from explorerframe.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.dll at 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.

…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.
@catchouli
catchouli merged commit 90739f5 into main Oct 29, 2026
3 checks passed
@catchouli
catchouli deleted the fullscreen-crash branch October 29, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant