Bug 27854 - ClassCastException triggered by Frame.setIconImage()
Summary: ClassCastException triggered by Frame.setIconImage()
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: 0.92
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-01 07:35 UTC by Norman Hendrich
Modified: 2006-06-01 13:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
sample icon image used for the testcase (1.42 KB, image/gif)
2006-06-01 07:36 UTC, Norman Hendrich
Details
testcase to trigger the bug. (414 bytes, text/plain)
2006-06-01 07:37 UTC, Norman Hendrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Norman Hendrich 2006-06-01 07:35:25 UTC
A call to Frame.setIconImage() seems to (asynchronously) trigger a ClassCastException in java.awt.Buffers.getData. I tried some printf-debugging
and the method tries to handle a gnu.java.awt.peer.gtk.CairoSurface:

Unknown data buffer: gnu.java.awt.peer.gtk.CairoSurface@40d2e768 class gnu.java.awt.peer.gtk.CairoSurface
java.lang.ClassCastException: Unknown data buffer type
   at gnu.java.awt.Buffers.getData(Buffers.java:212)
   at java.awt.image.SinglePixelPackedSampleModel.getDataElements(SinglePixelPackedSampleModel.java:170)
   at java.awt.image.Raster.getDataElements(Raster.java:405)
   at java.awt.image.BufferedImage.getRGB(BufferedImage.java:426)
   at java.awt.image.BufferedImage$1.startProduction(BufferedImage.java:475)
   at gnu.java.awt.peer.gtk.GtkImage.<init>(GtkImage.java:186)
   at gnu.java.awt.peer.gtk.GtkFramePeer.setIconImage(GtkFramePeer.java:181)
   at gnu.java.awt.peer.gtk.GtkFramePeer.create(GtkFramePeer.java:169)
   at gnu.java.awt.peer.gtk.GtkComponentPeer.<init>(GtkComponentPeer.java:128)
   at gnu.java.awt.peer.gtk.GtkContainerPeer.<init>(GtkContainerPeer.java:58)
   at gnu.java.awt.peer.gtk.GtkWindowPeer.<init>(GtkWindowPeer.java:144)
   at gnu.java.awt.peer.gtk.GtkFramePeer.<init>(GtkFramePeer.java:154)
   at gnu.java.awt.peer.gtk.GtkToolkit.createFrame(GtkToolkit.java:416)
   at java.awt.Frame.addNotify(Frame.java:436)
   at java.awt.Window.pack(Window.java:305)
   at PRabc.main(PRabc.java:35)

Testcase attached. 

Best, Norman
Comment 1 Norman Hendrich 2006-06-01 07:36:19 UTC
Created attachment 11564 [details]
sample icon image used for the testcase
Comment 2 Norman Hendrich 2006-06-01 07:37:18 UTC
Created attachment 11565 [details]
testcase to trigger the bug.
Comment 3 Sven de Marothy 2006-06-01 13:59:18 UTC
Fixed.