Bug 31

Summary: Make it safe to remove listeners from a GLDrawable while handling an event
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
Workaround: ---

Description Sven Gothel 2010-03-24 07:45:45 CET


---- Reported by pepijnve 2003-08-08 02:18:34 ----

Currently the listeners are held in an ArrayList which is iterated over when an
event is fired. If you have two registered listeners, and in the handling of the
event in listener one you perform 'glDrawable.removeGLEventListener(this)', the
second listener will not receive the event.
There is a nice solution to this problem in the java.awt.AWTEventMulticaster
class. It would be nice if jogl used a similar approach.



---- Additional Comments From kbr 2004-04-08 12:05:03 ----

Fixed by cloning the listeners list in the GLDrawableHelper upon add/remove.




--- Bug imported by sgothel@jausoft.com 2010-03-24 07:45 EDT  ---

This bug was previously known as _bug_ 31 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=31