ßI am also currently struggling with an exception of this type. The JOGL User's Guide indicates that it has to do the with multi-threaded environment of Java interacting with the C-origins of OpenGL:
(the User's Guide is available at
https://jogl.dev.java.net/nonav/source/browse/*checkout*/jogl/doc/userguide/index.html?rev=HEAD&content-type=text/html). Here's a relevant quote:
"Both of these models (repaint-on-demand and repaint continually) still require the user to think about which thread keyboard and mouse events are coming in on, and which thread is performing the OpenGL rendering. OpenGL rendering may not occur directly inside the mouse or keyboard handlers, because the OpenGL context for the drawable is not current at this point (hence the warning about storing a GL object in a field, where it can be fetched and accidentally used by another thread). However, a mouse or keyboard listener may invoke GLDrawable.display().
"It is generally recommended that applications perform as little work as possible inside their mouse and keyboard handlers to keep the GUI responsive. However, since OpenGL commands can not be run from directly within the mouse or keyboard event listener, the best practice is to store off state when the listener is entered and retrieve this state during the next call to GLEventListener.display()."
So, the problem referred to in this thread might be avoided by following the advice given here. That is, store off state in the keyboard and mouse listeners, but don't do anything that will directly cause display of a GLDrawable on the event-handling thread.
Unfortunately, there are still situations where it is hard to avoid having display called from the wrong thread (for example, an IDE that instantiates instances of Java objects: when that Java object contains a GLDrawable, the wrong thread may inadvertantly be called to display it -- at least that what seems to be causing the exceptions I'm encountering).
Hope this helps.
Thanks to whoever wrote the User's Guide. And, if you're reading this, what about updating it with any new and useful developments in the themes it deals with?