**Problem:**

On pressing the Copy button we keep waiting in AWT-EventQueue thread in 
reconstruct() function as we detect that we have missing information for the 
animated image since we are copying single frame at a time.
Due to this infinite wait the application freezes.

**Proposed Fix:**

There are conditions in the reconstruct() function that avoid entering the 
wait() code if we have some error reading the image , etc. So, I added the 
condition to avoid entering the wait() code if we are copying single frame at a 
time. This sounded logical to me since if we have incomplete information(single 
frame) about the animated image we shouldn’t keep waiting, as it leads to 
infinite wait. 
After this change I see the GIF image being correctly copied and animated.


**Testing:**

Added a test for this (bug6176679.java) and tested locally on my Windows 
machine and on mach5.

-------------

Commit messages:
 - fix executable permission of bug6176679.java
 - fix executable permission of cupanim.gif
 - fix for 6176679

Changes: https://git.openjdk.org/jdk/pull/13414/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13414&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-6176679
  Stats: 185 lines in 3 files changed: 184 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13414.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13414/head:pull/13414

PR: https://git.openjdk.org/jdk/pull/13414

Reply via email to