JDK-8065627 : Animated GIFs fail to display on a HiDPI display
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2014-11-04
  • Updated: 2015-11-02
  • Resolved: 2014-12-10
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 8 JDK 9
8u40 b19Fixed 9Fixed
Description
FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
OS X 10.9.5

EXTRA RELEVANT SYSTEM CONFIGURATION :
Using Quartz Debug simulation of HiDPI display

A DESCRIPTION OF THE PROBLEM :
An animated GIF that displays and animates on a non-HiDPI displays fails to display at all on a HiDPI display.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just run the simplest possible test program.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Too see the image.
ACTUAL -
No image is seen.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
package test;

import javax.swing.*;
import java.awt.*;
import java.net.URL;

public class Main
    extends JFrame
{
    public Main()
    {
        URL u = Main.class.getResource("WhiteOnBlack.gif");
        Image im = Toolkit.getDefaultToolkit().getImage(u);
        ImageIcon ic = new ImageIcon(im);
        JLabel label = new JLabel(ic);
        add(label);
        pack();
        setVisible(true);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Main();
            }
        });
    }
}

---------- END SOURCE ----------


Comments
Alexander P, please figure out in what JDK 8 release the bug was introduced.
02-11-2015

In what release/build was the regression introduced?
30-10-2015

URL: http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/82bd125184f5 User: lana Date: 2014-12-15 22:02:42 +0000
15-12-2014

URL: http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/82bd125184f5 User: alexsch Date: 2014-12-10 13:13:56 +0000
10-12-2014

MultiResolutionToolkitImage should use the base image observer as a key for the observers cache.
09-12-2014

I tried run the following code with JDK 1.8u25 build 17 using the following animated gifs on HiDPI display: http://designbuddy.com/wp-content/uploads/2013/02/david-ope-animation.gif http://www.freeallimages.com/wp-content/uploads/2014/09/animated-gif-images-2.gif http://media.giphy.com/media/YP3BAcE3bZMMU/giphy.gif I am not able to reproduce the problem. Could you send the animated gif where the issue is reproduced?
25-11-2014

This issue need to be reproduced on Mac OS X using Quartz Debug simulation of HiDPI display. Tested this on regular display on OS X with JDK 8u20 and 8u40ea and is not reproducible. Passing this on for further evaluation.
21-11-2014