This appears to be similar to this issue.
When SDL_Quit() is called with a game controller connected, Windows.Gaming.Input.dll will throw an exception if the application is open for about thirty seconds. This started happening in my application after upgrading from 2.0.16 to 2.0.18. It still occurs in 2.0.20.
Other information:
- Windows 10.
- Visual Studio 2019.
- 64-bit application (haven't tested if it happens in 32-bit).
- Occurs in both Debug and Release mode.
- I am using a PS4 controller.
- Does not occur if there aren't any game controllers connected to the PC.
- This only happens if the application is open for about 30+ seconds.
- The exception occurs during
WIN_CoUninitialize in SDL_windows.c.
- I am closing all of the game controllers before calling
SDL_Quit().
- I am loading the game controller database from here during application startup (not sure if this is actually relevant to the issue).
- It will consistently occur every time I run the application for more than thirty seconds with a controller plugged in.
Please let me know if there is anything else I can provide.
Call stack during exception:
