Problem executing program against pixbuf 2.2.4 library



Hello,

I have been developing a C program that uses the gdk pixbuf scaling
routines and the gdk-pixbuf xlib library for rendering.

My program compiles and runs successfully with gdk-pixbuf v0.17.0, using
gdk-pixbuf-config to provide the compiler arguments.

But with pixbuf 2.2.4, although my program compiles fine (using
pkg-config gdk-pixbuf-xlib-2.0 to provide the compiler arguments), when I
run my program the library throws some errors and segfaults.

I've traced the errors to where my program calls the gdk_pixbuf_new()
function, which is the first gdk function my program calls after calling
gdk_pixbuf_xlib_init().

Do you know why this should be?

Here's the output of 'make' using pixbuf 0.17.0:

gcc -O2 -fno-strength-reduce    -I../include -I. -I/usr/include
-I/usr/X11R6/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE
-DFUNCPROTO=15 -DNARROWPROTO   -DMITSHM  -I/usr/include/gdk-pixbuf-1.0
-I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
-I/usr/X11R6/include   -c -o prog.o prog.c

gcc -o prog -O2 -fno-strength-reduce -L/usr/X11R6/lib prog.o
-lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11 -lz -ljpeg    -L/usr/lib
-lgdk_pixbuf -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule
-lglib -ldl -lXi -lXext -lX11 -lm -lgdk_pixbuf_xlib

Here's the output of 'make' using pixbuf 2.2.4:

gcc -O2 -fno-strength-reduce    -I../include -I. -I/usr/include
-I/usr/X11R6/include   -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L
-D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE
-DFUNCPROTO=15 -DNARROWPROTO   -DMITSHM  -I/usr/include/gtk-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -c -o prog.o prog.c

gcc -o prog -O2 -fno-strength-reduce -L/usr/X11R6/lib prog.o
 -lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11 -lz -ljpeg    -Wl,--export-dynamic
-lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

And here's the output of running 'prog' compiled using pixbuf 2.2.4:

$ ./prog

About to call gdk_pixbuf_new

(process:24925): GLib-GObject-CRITICAL **: gtype.c:1871: initialization
assertion failed, use g_type_init() prior to this function

(process:24925): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault

Best regards,

Struan Bartlett.





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