JDK-8117434 : Animated monkey gif has rendering artifacts and throws exceptions
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-11-17
  • Updated: 2015-06-17
  • Resolved: 2012-02-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
fx2.1Fixed
Related Reports
Relates :  
Description
When I render the attached gif file as an Image in an ImageView in JavaFX, I get rendering artifacts of a changing static field of white lines in the animated gif (see attached monkeyrenderingartifacts.png for an example).

Additionally, when mousing over the gif, I get exceptions generated by the picking mechanism as below:

java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkIndex(Buffer.java:532)
	at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:139)
	at com.sun.javafx.tk.quantum.QuantumToolkit.imageContains(QuantumToolkit.java:990)
	at javafx.scene.image.ImageView.impl_computeContains(ImageView.java:728)
	at javafx.scene.Node.contains(Node.java:3087)
	at javafx.scene.Node.impl_pickNodeLocal(Node.java:3650)
	at javafx.scene.Node.impl_pickNode(Node.java:3638)
	at javafx.scene.Parent.impl_pickNodeLocal(Parent.java:619)
	at javafx.scene.Node.impl_pickNode(Node.java:3638)
	at javafx.scene.Scene$MouseHandler.pickNode(Scene.java:2845)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:2708)
	at javafx.scene.Scene$MouseHandler.process(Scene.java:2597)
	at javafx.scene.Scene$MouseHandler.access$1300(Scene.java:2570)
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1252)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1857)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:203)
	at com.sun.glass.ui.View.handleMouseEvent(View.java:282)
	at com.sun.glass.ui.View.notifyMouse(View.java:542)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
	at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
	at java.lang.Thread.run(Thread.java:722)


Sample code:

import javafx.application.Application;
import javafx.scene.*;
import javafx.scene.image.*;
import javafx.stage.Stage;

public class AnimatedGifTest extends Application {
  public static void main(String[] args) throws Exception { launch(args); }
  public void start(Stage stage) throws Exception {
    stage.setScene(new Scene(new Group(new ImageView(new Image("http://www.addemoticons.com/emoticon/monkey/AddEmoticons12633.gif")))));
    stage.show();
  }
}
Comments
This is a problem in the GIF decoder. It is returning with bad frames with incorrect scanlines, and the picking uses the scanline to return an index, thus making it wrong.
06-01-2012