
controlp5 - issue #74
ArrayIndexOutOfBoundsException upon pressing Alt+tab in Linux
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());
Comment #1
Posted on Feb 12, 2013 by Happy Rhino(No comment was entered for this change.)
Status: Accepted
Labels:
Type-Defect
Priority-Medium