JDK-8114872 : Some GIF images cannot be loaded when scaling is applied
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.1
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-02-15
  • Updated: 2015-06-17
  • Resolved: 2012-07-01
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.
JDK 7
7u6Fixed
Related Reports
Blocks :  
Relates :  
Description
Run attached code sample and follow the next instructions. That is compatibility test, that started to fail, beggining from b12.

Objectives:
This testcase aims at testing the image cursor feature. Typically, the following scenarios are covered -
getBestSize() called with 2 different sizes, one lesser than the platform size and another larger than platform size.
getMaximumColors()
Invalid main image URL and a valid placeholder image is used to see if the given hotspot values are clamped to the size of placeholder image.

User Interaction:
- Hover the mouse on each of the buttons and check if the following cursors are shown 
A bug image on button 19, 19
A giraffe image on button 299, 299
A tiger image on button 290, 290.

A bug and a tiger are not shown for some reason.
Comments
Verified by SQE with FX2.2 b16.
10-07-2012

http://jfxsrc.us.oracle.com/javafx/2.2/scrum/graphics/rt-closed/rev/de921706543f
01-07-2012

test name for Aurora matching: JavaFXCompatibilityTestSuite/graphics/api/imagecursor/ImageCursorTest5Test.java
26-04-2012

RELEASE NOTE: When scaling GIF Images, avoid scaling in the Image constructor and instead scale in the ImageView.
22-03-2012

OK / SQE
22-03-2012

OK / RM
22-03-2012

Given that we've isolated the problem to just affecting certain types of GIF images, and only when scaling, we are lowering the priority to Major. This will be addressed in 2.2 along with the other GIF image loader bugs.
20-03-2012

I verified that this is a regression from 2.0.2, introduced in 2.1.
19-03-2012

Note that if the Image is not scaled in the Image constructor, then it works fine. So this is a bug in the GIF loader in the scaling code.
16-03-2012

I can verify that the bug still exists. Running the attached test program with -Dprism.verbose=true will print out the AIOOB exception.
16-03-2012

same bug in promotion build 16
14-03-2012

Target Build: b16
28-02-2012

changeset: 15624:8b535ce4f0c1 tag: tip user: Joseph Andresen<joseph.andresen@oracle.com> date: Mon Feb 27 15:48:51 2012 -0800 summary: RT-19662 Gif Interlace fix
28-02-2012

Rising priority as this is a regression
22-02-2012

Affected tests: graphics/api/imagecursor/ImageCursorTest3Test.java graphics/api/imagecursor/ImageCursorTest5Test.java
21-02-2012

When I set -Dprism.verbose=true, I get the following output: java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.sun.javafx.iio.gif.GIFImageLoader.outputRow(GIFImageLoader.java:266) at com.sun.javafx.iio.gif.GIFImageLoader.outputPixels(GIFImageLoader.java:327) at com.sun.javafx.iio.gif.GIFImageLoader.read(GIFImageLoader.java:854) at com.sun.javafx.iio.gif.GIFImageLoader.load(GIFImageLoader.java:910) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:281) at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:266) at com.sun.javafx.tk.quantum.PrismImageLoader2.loadAll(PrismImageLoader2.java:89) at com.sun.javafx.tk.quantum.PrismImageLoader2.<init>(PrismImageLoader2.java:34) at com.sun.javafx.tk.quantum.QuantumToolkit.loadImage(QuantumToolkit.java:608) at javafx.scene.image.Image.loadImage(Image.java:883) at javafx.scene.image.Image.initialize(Image.java:681) at javafx.scene.image.Image.<init>(Image.java:557) at javafx_cursorissue.JavaFX_cursorIssue.start(JavaFX_cursorIssue.java:51) at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:315) at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:174) at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:141) 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:662) The arraycopy which fails was added to GIFImageLoader.java in rev. fe9e9ff812d6 (RT-18039: Gif Animation/Cleanup).
15-02-2012