From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7 Description of problem: I noticed that createImage doesn't create a BufferedImage so I modified my code to create a BufferedImage instead of using createImage. Unfortunately this causes an exception when calling getGraphics. I've included a simple example of the problem. Version-Release number of selected component (if applicable): libgcj-4.0.2-8.fc4 How reproducible: Always Steps to Reproduce: 1. Compile this program with gcj -C import java.awt.image.BufferedImage; import java.awt.*; class TestMe { public static void main(String [] args) { BufferedImage imgMonster = new BufferedImage(20, 20, BufferedImage.TYPE_INT_ARGB); Graphics gImg = imgMonster.getGraphics(); gImg.setColor(Color.white); gImg.fillRect(0, 0, 20, 20); gImg.dispose(); } } 2. Run it 'gij TestMe' Actual Results: Exception in thread "main" java.lang.UnsatisfiedLinkError: initState at gnu.java.awt.peer.gtk.GdkGraphics2D.initState(int[], int, int) (/usr/lib/lib-gnu-java-awt-peer-gtk.so.6.0.0) at gnu.java.awt.peer.gtk.GdkGraphics2D.GdkGraphics2D(java.awt.image.BufferedImage) (/usr/lib/lib-gnu-java-awt-peer-gtk.so.6.0.0) at gnu.java.awt.peer.gtk.GdkGraphicsEnvironment.createGraphics(java.awt.image.BufferedImage) (/usr/lib/lib-gnu-java-awt-peer-gtk.so.6.0.0) at java.awt.image.BufferedImage.createGraphics() (/usr/lib/libgcj.so.6.0.0) at java.awt.image.BufferedImage.getGraphics() (/usr/lib/libgcj.so.6.0.0) at TestMe.main(java.lang.String[]) (Unknown Source) at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Expected Results: Nothing. It should run without error. Additional info:
Graphics2D requires the Cairo backend which we didn't enable for FC4 because Cairo was missing. I'll look into enabling it for FC5.
I couldn't enable this in time for FC5 final. I'll try to do a merge of the updated GUI packages from GNU Classpath to libgcj, for a future FC5 gcc update.
Fixed in Rawhide by libgcj backport.