Bug 19839

Summary: Repaint-loop due to createImage() and non-null ImageObserver
Product: classpath Reporter: Norman Hendrich <hendrich>
Component: awtAssignee: Thomas Fitzsimmons <fitzsim>
Status: RESOLVED FIXED    
Severity: normal CC: bug-classpath, fitzsim, gcc-bugs, java-prs
Priority: P2    
Version: unspecified   
Target Milestone: 0.18   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-05-14 21:07:37
Attachments: Demonstrates the repaint loop

Description Norman Hendrich 2005-02-09 09:20:46 UTC
Calling Graphics.drawImage( image, x, y, observer ) results in an endless
repaint loop when observer is non null and the image was retrieved via
Component.createImage(width,height).
Note: this does not happen for Image's created via Toolkit.getImage()...

Testcase follows
Comment 1 Norman Hendrich 2005-02-09 09:24:45 UTC
Created attachment 8149 [details]
Demonstrates the repaint loop
Comment 2 Norman Hendrich 2005-02-09 09:27:17 UTC
Changing the call to drawImage( image, x, y, null ) makes the program work.
However, an Image create by createImage(width,height) should be completely
initialized at once: there is no image data to read asynchronously...
Comment 3 Andrew Pinski 2005-02-12 22:31:45 UTC
Confirmed.
Comment 4 Thomas Fitzsimmons 2005-08-21 05:38:53 UTC
This prints:

Got the image: gnu.java.awt.peer.gtk.GtkImage@ef01d050
paint 1
1 repaints, probably ok.

Fixed by Sven's image work.  Closing.