[OpenJDK 2D-Dev] [9] RFR JDK-4924727 : reader.abort() method does not work when called inside imageStarted for PNG

Phil Race philip.race at oracle.com
Wed Aug 17 20:11:59 UTC 2016


I think we can
- get all plugins,and for each
- write a file in that format
- read it back and apply the test

It is also worth verifying that the writer abort checks are in sync with 
the reader aborts,
ie happen at such equivalent points as might exist.

-phil.

On 08/15/2016 11:30 AM, Sergey Bylokhov wrote:
> Is it possible to unify the test for all our plugins? I assume they 
> should work in the same way. I am not sure but probably the image can 
> be generated at runtime?
>
> On 11.08.16 21:59, Jayathirth D V wrote:
>> Hi,
>>
>>
>>
>> Please review the following fix in JDK9 at your convenience:
>>
>>
>>
>> Bug : https://bugs.openjdk.java.net/browse/JDK-4924727
>>
>>
>>
>> Webrev : http://cr.openjdk.java.net/~jdv/4924727/webrev.00/
>>
>>
>>
>> Issue : When we issue ImageReader.abort() in
>> IIOReadProgressListener.imageStarted(), reading is not aborted and it is
>> continued.
>>
>>
>>
>> Root cause : After IIOReadProgressListener.imageStarted() call in
>> PNGImageReader.java when we enter decodeImage() we call
>> clearAbortRequest() which will clear the abort request from
>> IIOReadProgressListener.imageStarted().
>>
>>
>>
>> Solution : clearAbortRequest() documentation mentions that it should be
>> called before reading of image starts, so it should be called before
>> IIOReadProgressListener.imageStarted()(In PNGImageReader.java it is
>> processImageStarted(0) in readImage()). So moved clearAbortRequest()
>> call from decodeImage() to readImage(). Also we should call
>> abortRequested() in PNGImageReader.java at places mapping to
>> IIOReadProgressListener and not randomly at end of functions or at
>> places related to IIOReadUpdateListener, updated the code for the same.
>>
>>
>>
>>
>>
>> Observation not related to this issue : We don’t have call similar to
>> IIOReadProgressListener.readAborted() in IIOReadUpdateListener, but user
>> can call ImageReader.abort() from IIOReadUpdateListener methods. Is
>> there a need to add similar method in IIOReadUpdateListener? Any inputs
>> on this also would be helpful.
>>
>>
>>
>> Thanks,
>>
>> Jay
>>
>
>




More information about the 2d-dev mailing list