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

joy2key: protect against IndexError and KeyError exceptions #2651

Merged
merged 1 commit into from Mar 14, 2019

Conversation

Projects
None yet
2 participants
@psyke83
Copy link
Member

psyke83 commented Mar 13, 2019

Various IndexError or KeyError exception could occur if 'a', 'b', 'x' or 'y'
mappings were not available due to arrays accessing unexpected elements.

@psyke83 psyke83 force-pushed the psyke83:joy2key_indexerror branch from c7aa461 to 10218f9 Mar 13, 2019

@psyke83

This comment has been minimized.

Copy link
Member Author

psyke83 commented Mar 13, 2019

Waiting for feedback from: https://retropie.org.uk/forum/topic/21616/error-after-updating-retropie-setup-to-4-4-9-a161774a/14

The easiest way to reproduce these exceptions is either to remove all controller mappings, or comment the 'a' 'b' 'x' 'y' entries.

@psyke83 psyke83 force-pushed the psyke83:joy2key_indexerror branch 2 times, most recently from 185def2 to ab1a648 Mar 13, 2019

@psyke83 psyke83 changed the title WIP: joy2key: protect against IndexError and KeyError exceptions joy2key: protect against IndexError and KeyError exceptions Mar 13, 2019

joy2key: protect against IndexError and KeyError exceptions
Various IndexError or KeyError exception could occur if 'a', 'b', 'x' or 'y'
mappings were not available due to arrays accessing unexpected elements.

@psyke83 psyke83 force-pushed the psyke83:joy2key_indexerror branch from ab1a648 to 0311a95 Mar 13, 2019

@psyke83 psyke83 merged commit 5d5014a into RetroPie:master Mar 14, 2019

@psyke83

This comment has been minimized.

Copy link
Member Author

psyke83 commented Mar 14, 2019

This fixes the fatal errors that were causing the script to actually break, but not the bad file descriptor non-fatal warning. I'll address the latter in another patch, after I manage to reproduce it on one of my systems... and if anyone can point out how to reliably reproduce this warning, it'd help me a lot. Thanks.

@psyke83 psyke83 deleted the psyke83:joy2key_indexerror branch Mar 14, 2019

@joolswills

This comment has been minimized.

Copy link
Member

joolswills commented Mar 14, 2019

Thanks for debugging this.

@joolswills

This comment has been minimized.

Copy link
Member

joolswills commented Mar 14, 2019

I will test latest code and debug if I see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.