JDK-4892259 : GIF ImageReader does not call passComplete in IIOReadUpdateListener
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.imageio
  • Affected Version: 1.4.0,5.0,6,6u38,7,7u10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux_sun
  • CPU: generic,x86
  • Submitted: 2003-07-17
  • Updated: 2013-05-27
  • Resolved: 2013-05-17
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
8 b91Fixed
Related Reports
Duplicate :  
Description
GIF ImageReader calls IIOReadUpdateListener.passStarted() when reading a GIF image but does not call any passComplete. All other ImageReaders are consistent in calling a passComplete() when they call a passStarted() for a particular pass. It would be nice if GIF ImageReader also does the same thing in order to avoid the inconsistency.

This is reproducible right from JDK1.4+ on Solaris as well as Win32 platforms.
I have attached a sample code in which a GIF ImageReader reads an animated gif from a file. Execute the sample code. You would see a set of passStarted() calls but passComplete() would never be called during the read process.
CR 5096514 was closed as duplicate for this CR.
tested jdk 7 b59.

failed tests with crash:
TEST Testcase ReadListenerCrashTest 11/45 146/271 FAIL
TEST Testcase WriteListenerCrashTest 12/45 147/271 FAIL

Results:
/net/vice.russia.sun.com/export/home0/results/1.7.0_fcs/b59/2d/winxppro-i586/1.7.0_fcs_b59_winxppro-i586_01

crash logs attached.

Comments
Proposed fix is to not call passStarted for non-interlaced images
21-11-2012

EVALUATION The priority of this bug was raised up to P3 because it was recognized as a duplicate of 5096514, which reports a crash. However, the crash reported in CR 5096514 is caused by invocation of dispose() method in a listener handler. Hence, this problem is a duplicate of CR 4874501 (VM crashes when writer.dispose() is called within imageProgress() method), but not of this one. So I am downgrade priority of this CR down to P4.
15-12-2010

EVALUATION Looking at the GIFImageReader code I could see passCompleted getting called at one case in outputPixels method. This happens before the next interlacing pass takes place. But there are a few other cases in read(...) method where I believe we need to call it explicitly just before the read call returns. In such a case the call would be made just before processImageComplete is called.
25-07-2007