Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.15 Exception Thrown in Windows.Gaming.Input.dll on SDL_Quit() running from VS2019 #4488

Closed
AntTheAlchemist opened this issue Jul 5, 2021 · 5 comments
Assignees
Milestone

Comments

@AntTheAlchemist
Copy link
Contributor

AntTheAlchemist commented Jul 5, 2021

Here are the exact conditions to trigger this exception:

  1. SDL version 2.0.15 (I'm using 32-bit, same probably happens in 64).
  2. Have at least 1 non-360 game controller plugged in before running.
  3. Run from Visual Studio 2019. It happens in both release and debug mode.
  4. SDL_INIT_GAMECONTROLLER with a window and very basic event loop.
  5. Quit application after waiting about 30 seconds.
  6. Run in Windows 10.

That's it. You don't need to actually open any controllers. It doesn't happen with a 360 controller. It doesn't trigger if you quit the application before about 30 seconds.

The exact message I get is:

Exception thrown at 0x532FFE27 (Windows.Gaming.Input.dll) in test.exe: 0xC0000005: Access violation reading location 0x60051B98.

I'm unable to debug this dll because there are no symbols, but when looking at the disassembly I see a symbol called "GameController::~GameController". Guessing this is Windows internal code relating to joystick destruction? Hope this makes sense to someone?

@slouken slouken self-assigned this Jul 23, 2021
@slouken slouken added this to the 2.0.16 milestone Jul 23, 2021
@slouken
Copy link
Collaborator

slouken commented Jul 28, 2021

I was able to reproduce this a few months ago, but I'm not able to anymore. Are you still able to reproduce this?

@slouken slouken added waiting Waiting on user response and removed waiting Waiting on user response labels Jul 28, 2021
@slouken
Copy link
Collaborator

slouken commented Jul 29, 2021

I'm still able to reproduce this with a Nintendo Switch Pro controller connected.

@slouken
Copy link
Collaborator

slouken commented Jul 29, 2021

... and now I can't reproduce it anymore

@AntTheAlchemist
Copy link
Contributor Author

It's still there and it's 100% consistent to reproduce; not random. It only happens on my non-360 controllers and only after about 25 seconds. My non-360 controllers are all cheap Chinese generic ones, some mapped, some not.

Shall I test on the latest source? I'll need to download and build the DLL manually (it's the only way my dumb brain knows how to do it, lol)

@slouken
Copy link
Collaborator

slouken commented Jul 29, 2021

Ah, having it running for 25 seconds was key. I'm able to reproduce it that way too, thanks!

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

No branches or pull requests

2 participants