Bug 19839 - Repaint-loop due to createImage() and non-null ImageObserver
Summary: Repaint-loop due to createImage() and non-null ImageObserver
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: 0.18
Assignee: Thomas Fitzsimmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-09 09:20 UTC by Norman Hendrich
Modified: 2005-10-16 01:47 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-05-14 21:07:37


Attachments
Demonstrates the repaint loop (923 bytes, text/plain)
2005-02-09 09:24 UTC, Norman Hendrich
Details

Note You need to log in before you can comment on or make changes to this bug.
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.