-
Notifications
You must be signed in to change notification settings - Fork 347
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
Crash while disconnecting a controller #552
Comments
So far it seems a == Using 2.0.9
== Using 2.0.8
It looks like some spurious Testing with just one DS4 controller, the crash is easily reproduced - just connect it and then disconnect it while ES is running. Moreover, using a DS4, I can see the event queue is continuously spammed with SDL_JOYAXISMOTION without even touching the controller:
NOTE: It seems to only happen on Raspbian, I tested this also on Ubuntu 18.04, but could not reproduce the crash. |
So it looks like something similar got reported in https://retropie.org.uk/forum/topic/21846/. I was afraid it was a local thing, particular to my system. I did some more testing after my last update and noticed the DS4 issue was not appearing 100%, but connecting and disconnecting it would eventually make the spurious events appear. I tested also with the lastest SDL (from their Hg repo) and I don't see the problem manifesting - though this doesn't have the RP patches applied. I also found a workaround for this particular issue (the crash), by discarding any SDL_JOYAXISMOTION events (via @joolswills do you want me to submit a PR with the workaround until we sort things out ? |
issue created on sdl bug tracker : https://bugzilla.libsdl.org/show_bug.cgi?id=4640 |
@nadenislamarre Can you reproduce the problem using the SDL2 latest version (hg.libsdl.org) ? At the time I tested this, the problem seems to have been resolved sometime between the 2.0.9 release tag and current master. |
@cmitu I still have the problem with the current master, specially with a DS4 gamepad, if you disconnect it or shake it a little bit ES will crash as well with other game pads, if you connect and disconnect them. |
OK, re-tested again and the spurious events are generated also on latest SDL (with 2.0.10 close to release). I wasn't testing by removing the controller while still pressing the joysticks (i.e. joysticks released). |
I'm closing this issue - it's fixed applying the patch provided by @nadenislamarre and it's not an Emulationstation bug per-se. |
I'm experiencing a possibly related issue to the SDL update to 2.0.9, on a pretty much stock 4.4.11, Pi 3B.
If I unplug the 2nd controller while ES is running, it crashes and I get the dialog with 'ES Crashed...' https://github.com/RetroPie/RetroPie-Setup/blob/1446ce55fa269fc757a9deb649105405865513db/scriptmodules/supplementary/emulationstation.sh#L231).
I used 2 USB controllers - a regular SNES clone (the Buffalo) and a DS4. When unplugging the DS4, I got the crash dialog. I reproduced the crash again with another 2SNES-to-USB controller, by unplugging it.
It might have something to do with the fact that both controllers add multiple input devices, because it doesn't seem to crash when disconnecting the iBuffalo controller.
Here's a debug output before the crash
EDIT: seem definitely related to the controller type - if I unplug the iBuffalo, the crash doesn't occur - it's only when I unplug the DS4 or the 2SNES-to-USB adapter.EDIT 2: I downgraded to 2.0.8 and I can't reproduce the crash using the same test.
The text was updated successfully, but these errors were encountered: