Bug 31 - Make it safe to remove listeners from a GLDrawable while handling an event
Summary: Make it safe to remove listeners from a GLDrawable while handling an event
Status: VERIFIED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All all
: P3 normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2003-08-08 02:18 CEST by Sven Gothel
Modified: 2015-09-27 03:15 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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