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

ArrayIndexOutOfBoundsException #113

Closed
mad-s opened this issue Aug 5, 2015 · 2 comments
Closed

ArrayIndexOutOfBoundsException #113

mad-s opened this issue Aug 5, 2015 · 2 comments
Labels

Comments

@mad-s
Copy link
Contributor

mad-s commented Aug 5, 2015

** Uncaught Exception! ** java.lang.ArrayIndexOutOfBoundsException: 10 at org.newdawn.slick.Input.poll(Input.java:1239) at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:680) at itdelatrisu.opsu.Container.gameLoop(Container.java:95) at itdelatrisu.opsu.Container.start(Container.java:69) at itdelatrisu.opsu.Opsu.main(Opsu.java:173)

Version: 0.9.0
OS: Arch Linux (Kernel 4.1.2)
JRE: OpenJDK Runtime Environment (build 1.8.0_51-b16)

Issue when pressing a button with index>=10. Can probably be fixed by increasing the size of the boolean array org.newdawn.slick.Input.mousePressed or by discarding any mouse input with button index>=10.

@itdelatrisu
Copy link
Owner

I'm not sure what the best approach would be. What button did you press? If we increase the array size, do you have any ideas about a reasonable size? I also wonder what the best way to handle abnormal mouse buttons would be, since just pretending they didn't happen also seems kind of wrong...

@itdelatrisu itdelatrisu added the bug label Aug 5, 2015
@mad-s
Copy link
Contributor Author

mad-s commented Aug 8, 2015

I think discarding the mouse buttons seems to be the best idea, since buttons with high indices are not likely to be used playing opsu! due to their inconvenient position. Practically all players will use L/R mouse buttons or keyboard input. I temporarily fixed the issue on my system by disabling the buttons completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants