lichtungsgnarr / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

ArrayIndexOutOfBoundsException upon pressing Alt+tab in Linux #74

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run controlP5 in P3D mode on Linux
2. Press Alt+tab

What is the expected output? What do you see instead?
Works fine on Mac. Works in Linux in Java2D mode. In OpenGL mode only, for some 
reason when I press Alt+tab it generates a keycode which causes controlp5 to 
crash:

Exception in thread "Animation Thread" 
java.lang.ArrayIndexOutOfBoundsException: 65515
    at controlP5.ControlWindow.keyEvent(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1084)
    at processing.core.PApplet.handleMethods(PApplet.java:1279)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:2946)
    at processing.core.PApplet.dequeueEvents(PApplet.java:2466)
    at processing.core.PApplet.handleDraw(PApplet.java:2153)
    at processing.opengl.PGL$PGLListener.display(PGL.java:2472)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:548)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:533)
    at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:280)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:904)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:822)
    at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:543)
    at processing.opengl.PGL.requestDraw(PGL.java:814)
    at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1566)
    at processing.core.PApplet.run(PApplet.java:2020)
    at java.lang.Thread.run(Thread.java:662)

What version of the product are you using? On what operating system?
I'm using controlP5 2.0.4 on Redhat Linux, with Processing 2.0b7.

Please provide any additional information below.
As my current workaround, I am unregistering cp5 from key events:
cp5 = new ControlP5(this);
unregisterMethod("keyEvent", cp5);
unregisterMethod("keyEvent", cp5.getWindow());

Original issue reported on code.google.com by kroki...@gmail.com on 11 Feb 2013 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by soj...@gmail.com on 12 Feb 2013 at 9:00