Your message dated Fri, 23 Jan 2009 17:38:51 +0100
with message-id <1232728731.8632.53.ca...@tomoyo>
and subject line Re: Bug#508375: the statement "gdk-pixbuf library does not 
need to be initialized" is wrong
has caused the Debian Bug report #508375,
regarding the statement "gdk-pixbuf library does not need to be initialized" is 
wrong
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
508375: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508375
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libgtk2.0-dev
Version: 2.12.11-4

The page <URL: file:///usr/share/gtk-doc/html/gdk-pixbuf/apas02.html
 >, or, alternatively, <URL:
http://library.gnome.org/devel/gdk-pixbuf/2.12/apas02.html > contains
the statement: "The gdk-pixbuf library does not need to be
initialized".  This is false, as the following trivial program shows:

/* --- cut after --- */
#include <stdio.h>
#include <stdlib.h>

#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

/* Compile with
gcc -o stupid stupid.c -O6 -Wall -std=c99 -Wextra `pkg-config --cflags --libs 
gdk-pixbuf-2.0`
 */

#define WIDTH 320
#define HEIGHT 240
#define ROWSTRIDEPX (WIDTH)
#define ROWSTRIDE (ROWSTRIDEPX*3)

unsigned char image[HEIGHT][ROWSTRIDEPX][3];

GdkPixbuf *img;

int
main (void)
{
  img = gdk_pixbuf_new_from_data ((const guchar *)image,
                                  GDK_COLORSPACE_RGB, FALSE, 8,
                                  WIDTH, HEIGHT, ROWSTRIDE,
                                  NULL, NULL);
  exit (EXIT_SUCCESS);
}
/* --- cut before --- */

This program causes a segmentation fault after the following
errors/warnings:

(process:9342): GLib-GObject-CRITICAL **: 
/build/buildd/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion 
failed, use IA__g_type_init() prior to this function

(process:9342): GLib-CRITICAL **: g_once_init_leave: assertion 
`initialization_value != 0' failed

(process:9342): GLib-GObject-CRITICAL **: g_object_new: assertion 
`G_TYPE_IS_OBJECT (object_type)' failed
zsh: segmentation fault  ./stupid

This segfault goes away when gdk_init() or gtk_init() is used, so it
seems to be an initialization problem: either the doc is wrong, in
which case it should be corrected to explain how and when the library
should be initialized, or it's a gdk-pixbuf bug.

I would prefer this to be counted as a bug against gdk-pixbuf, because
there ought to be a way to manipulate in-core pixbufs (to save image
files to disk) without linking in gdk or gtk.

-- 
     David A. Madore
    ([email protected],
     http://www.madore.org/~david/ )



--- End Message ---
--- Begin Message ---
Le mercredi 10 décembre 2008 à 17:01 +0100, David Madore a écrit :
> the statement: "The gdk-pixbuf library does not need to be
> initialized".  This is false, as the following trivial program shows:

> (process:9342): GLib-GObject-CRITICAL **: 
> /build/buildd/glib2.0-2.16.6/gobject/gtype.c:2248: initialization assertion 
> failed, use IA__g_type_init() prior to this function

Actually this is true, the thing that needs to be initialized here is
GObject. This is done with a call to g_type_init(); before doing
anything else.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


--- End Message ---

Reply via email to