Re: [Java-gnome-developer] Cairo - embedding images in pdfs
Brought to you by:
afcowie
From: William T. <wil...@gm...> - 2010-02-09 10:38:47
|
On 9 February 2010 05:01, Andrew Cowie <an...@op...> wrote: > On Sat, 2010-02-06 at 10:52 +0000, William Temperley wrote: > >> I've posted the VM crash dump here: >> http://pastebin.com/m7587cc22 > > The relevant part is: > > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) > C [libpixbufloader-gif.so+0x1b76] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j org.gnome.gdk.GdkPixbuf.gdk_pixbuf_new_from_file(Ljava/lang/String;)J+0 > j org.gnome.gdk.GdkPixbuf.createPixbufFromFile(Ljava/lang/String;)J+21 > j org.gnome.gdk.Pixbuf.checkPixbufFromFile(Ljava/lang/String;)J+44 > j org.gnome.gdk.Pixbuf.<init>(Ljava/lang/String;)V+2 > j uk.ac.ox.map.carto.canvas.CairoTest.main([Ljava/lang/String;)V+69 > v ~StubRoutines::call_stub > > which is nothing unusual at all. > > >> I'm on a fairly standard Ubuntu Karmic AMD64 install - using Java-gnome-4.0.14. > > Sure, that's fine. > > (java-gnome from the PPA, I assume?) > No - built from source. >> It just crashed when creating a pixbuf from a file. I was just doing a >> very simple trial of a few features: > > >> public class CairoTest { >> public static void main(String[] args) throws IOException { > > You didn't call Gtk.init() first. That's obligatory. > http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/Gtk.html#init(java.lang.String[]) > > Annoyingly, not having done so should have resulted in an Exception > being thrown when you tried to use anything else in java-gnome. > > We used to have some great code that would check you'd initialized > properly. Apparently we messed that up when we changed the > initialization last cycle to deal with the GLib g_set_prgname() bug. > http://article.gmane.org/gmane.comp.gnome.bindings.java.devel/1425 > refers. Not sure why we aren't getting an Exception anymore. Someone > will need to fix that. > > Anyway, call Gtk.init() and you're on your way. > > AfC > Sydney > Thanks Andrew. Glad it's a simple fix - apologies for the noise. Will |