Hi Petr,

Have you verified that if someone draws an animated GIF and then later returns false from the observer that the associated ImageLoader thread goes away? I think the dispose() method had a side effect of allowing the thread to go away and if you don't call it then the ImageLoader threads that serve the displayers of an animated GIF may run forever once triggered...

                        ...jim

On 12/18/13 6:01 AM, Petr Pchelko wrote:
Hello, AWT and 2D teams.

Please review the fix for the issue:
https://bugs.openjdk.java.net/browse/JDK-8029250
It also resolves the issue:
https://bugs.openjdk.java.net/browse/JDK-6740321
The fix is available at:
http://cr.openjdk.java.net/~pchelko/9/8029250/webrev/

The problem:
In AWT we use a MediaTracker to wait for the tray icon loading. However, if the 
TrayIcon is an animated gif the following happen:
The MediaTracker installs an ImageObserver to an image and starts loading. 
After the first frame is loaded (and it's really all we need)
the media tracker correctly exits and removes it's ImageObserver. And as it's 
the only observer the checkConsumption is called in an
ImageRepresentation. As the availinfo is just FRAMEBITS the successfully loaded 
frame was immediately disposed and AWT failed
to draw a tray icon.

With best regards. Petr.

Reply via email to