RetroPie / EmulationStation

A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.
Other
863 stars 344 forks source link

Fixes ES crash after boot on stale SDL joy add/remove events. #809

Closed Gemba closed 2 years ago

Gemba commented 2 years ago

This happens whenever a joystick is remved during ES splashscreen. Putting the PR here after initial discussion in forum:

https://retropie.org.uk/forum/topic/33014/failed-assertion-on-connected-joysticks-terminates-emulationstation-on-specific-conditions

pjft commented 2 years ago

@cmitu any comments here, as you were involved in this?

Also, any consideration given to removing the assert clauses and using plain LOG?

Thank you for looking into this.

cmitu commented 2 years ago

Looks good, thanks @Gemba for tracking this down and fixing it.

We can leave the assert for the time being - crashing with the joystick related message makes it quick to detect miss-behaving controllers. If we were to replace it, IMHO I think we should pop-up a message to inform the user about it, otherwise they'd need to open the log to figure it out or to provide the error messages. We may revisit this in another update.

pjft commented 2 years ago

Thanks for sending this over!