gdk_pixbuf_save crash saving JPEG when linking against gtkmozembed libraries



Hi all,

I'm developing an application that embeds gecko, but crash on the function
gtk_save_pixbuf. Only crash when linking with the gecko libraries and when
saving JPEG. PNG's works. I have isolated the problem. This is the code:

sample.c:

   #include <gtk/gtk.h>
   int main(int argc, char *argv[])
   {
       gtk_init(0, NULL);
       gdk_init(&argc, &argv);

       GError **error = NULL;
       GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("/tmp/input.png",
error);
       gdk_pixbuf_save(pixbuf, "/tmp/output.jpg", "jpeg", error, NULL);

       return 0;
   }

Makefile

   INC=`pkg-config gtk+-2.0 --cflags`
   #LIB=`pkg-config gtk+-2.0 --libs`
<-- works!!
   LIB=`pkg-config gtk+-2.0 xulrunner-gtkmozembed --libs`   <-- crash
   all:
           gcc -g -Wall example.c $(INC) $(LIB) -o sample

When linking without xulrunner-gtkmozembed works fine, but linking both,
crash.
The program exists with code=1 without any core dumped. I have been
debugging
the internals, an I know exactly the point where the crash occours, but I
don't know
why.

Any Idea about the problem? Anybody see something wrong on the code?
Thanks a lot!!!!!!!

PD: excuse my english :)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]