DXGI Debugging: Microsoft Put Me on a List Date: Sunday, September 21, 2025 Context: Space Station 14 ARM64 Crash with ANGLE The author was working on ARM64 builds of Space Station 14, specifically a unified launcher supporting ARM64 and x64. Although the game client ran fine in a development environment, the ARM64 build crashed on Windows ARM64 systems (both in a VM and on real hardware with Snapdragon X). --- Debugging Journey Initial Symptoms and Logs Logs were empty, cutting off just after SDL was initialized. The crash was native, requiring WinDbg for debugging. Using WinDbg Launched Space Station 14 Launcher.exe inside WinDbg. Crash occurred at USER32!GetDC due to an illegal instruction. Disassembly in GetDC appeared nonsensical, raising suspicion of undefined behavior. WinDbg couldn’t access C# stack frames properly due to mscordaccore DLL loading issues and ARM64 vs x64 confusion. Overcoming WinDbg Limitations The launcher executable is x64, but it launches a native ARM64 loader executable. Debugging the launcher confused WinDbg due to mixed architectures (ARM64 native child from x64 parent). Switching to debug the native SS14.Loader.exe directly fixed several issues with machine context and stack trace resolution. Investigating SDL Behavior The crash happens during the first window show, where SDL uses GDI (GetDC()) to clear the background. Disabling background clear via environment variable avoids initial crash but the second OS window triggers it again. Disassembly showed Microsoft’s DXGI!MyGetDC detoured USER32!GetDC. Microsoft is patching (detouring) its own functions in DXGI, which seems unusual. --- The Role of DXGI and Swap Effects What is DXGI? DXGI is a core component of DirectX 10+ managing graphics infrastructure. A "detour" is a runtime hook to modify function behavior, which Microsoft uses internally. Flip Model vs Bitblt Swapchains Bitblt: Original swapchain method, older and less efficient. Flip Model: Modern, introduced in Windows 8, more efficient, with advantages like zero-latency overlay support on compatible GPUs. Windows 11 forces flip-model swapchains for windowed games to improve performance. DXGI installs complex detours for compatibility when upgrading bitblt swapchains to flip-model. Disabling “Optimizations for windowed games” in Windows fixes the crash. Space Station 14 and ANGLE SS14 uses ANGLE (a cross-platform OpenGL-on-DirectX translation layer). ANGLE creates bitblt swapchains (SWAPEFFECT_SEQUENTIAL) not flip-model. Unable to switch to flip-model due to ANGLE limitations. Author prefers rewriting the renderer over complex workaround with ANGLE or OpenGL. --- The Final Puzzle: Executable Filename The crash only occurs when the executable is named SS14.Loader.exe. Microsoft maintains a hardcoded list of games eligible for Windows 11's Flip model optimizations. Space Station 14, unintentionally, is on this "list," triggering Windows internals to detour GetDC calls in a manner that breaks the ARM64 implementation. No ARM64 games were on that list before, so this bug went unnoticed. Author humorously notes that Microsoft "put me on a list," which caused the bug. --- Addendum: Why ANGLE and OpenGL on Windows ARM64 On Windows, OpenGL support traditionally comes from GPU vendor drivers. Snapdragon ARM64 devices use Microsoft’s OpenGL-on-D3D12 driver (part of Mesa). This driver is buggy, showing graphical artifacts in SS14. The OpenGL-on-D3D12 driver is not bundled with Qualcomm’s drivers but is separately distributed via Microsoft Store. The author has reported graphical issues and waits for fixes. Until then, SS14 ARM64 Windows support is postponed. The author may eventually rewrite the renderer to drop OpenGL/ANGLE entirely. --- Footnotes Debugging SS14.Loader.exe directly is complicated due to many