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

Unplugging gamepad crashes the game #1198

Closed
naezith opened this issue Mar 4, 2017 · 7 comments
Closed

Unplugging gamepad crashes the game #1198

naezith opened this issue Mar 4, 2017 · 7 comments

Comments

@naezith
Copy link

naezith commented Mar 4, 2017

I have two gamepad issues for months and finally wanted to create an issue about it.

I play my game with gamepad, then I unplug it, wait around 10 seconds and then I press a key on keyboard. Game crashes and debugger is pointing processEvents function inside the pollEvent->popEvent.

Here is what debugger shows at the crash moment:
https://puu.sh/utH6e/c8b0561b5e.png

Edit: Lag is fixed by the last joystick update. I also don't get the crash anymore but one player still gets the crash.


SFML 2.4.2
gcc (x86_64-posix-seh-rev1, Built by MinGW-W64 project) 6.3.0

@MarioLiebisch
Copy link
Member

It's caused by (or in combination with) the Steam Overlay. You always have to check the top of your call stack first:
image

This might be hard to track down (and doesn't necessarily have to happen due to something SFML does).

As for lag/freezing, this might be related to #1179 and might be fixed with #1195, but it could be something different.

@naezith
Copy link
Author

naezith commented Mar 4, 2017

It should not be about Steam because I started using Steamworks API this month, I had these issues for a long time.

@MarioLiebisch
Copy link
Member

Then try getting a stack trace without Steam showing up in the middle. Maybe it's related but has a different origin. Any chance you're polling events outside the main thread or anything similar?

@naezith
Copy link
Author

naezith commented Mar 4, 2017

I will try to take the Steam out from there. Event polling runs on the main thread.

@naezith
Copy link
Author

naezith commented Mar 4, 2017

Updated SFML, joystick update fixed it.

@naezith naezith closed this as completed Mar 4, 2017
@eXpl0it3r eXpl0it3r self-assigned this Mar 4, 2017
@eXpl0it3r eXpl0it3r added this to the 2.5 milestone Mar 4, 2017
@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.5.0 Mar 14, 2017
@eXpl0it3r eXpl0it3r moved this from Discussion to Merged in SFML 2.5.0 Mar 14, 2017
@naezith
Copy link
Author

naezith commented Jul 14, 2017

A player reported today that it still crashes on unplug.

Also I found this on internet if it helps:
https://twitter.com/hartlabs/status/631934662378590210

@naezith naezith reopened this Jul 14, 2017
@naezith naezith changed the title Gamepad: Lag on plug & Crash on unplug Unplugging gamepad crashes the game Jul 14, 2017
@eXpl0it3r
Copy link
Member

This must be a different issue then, so please open another issue. The one originally reported here has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.5.0
  
Merged / Superseded
Development

No branches or pull requests

3 participants