Package: gpiv
Version: 0.5.2-3
Severity: important
Tags: patch

*** Please type your report below this line ***

When opening a png image (generated in my case by gpiv_combing from gpiv_tools, 
but bug probably generic), gpiv aborts with the following error message:

GdkPixbuf-CRITICAL **: gdk_pixbuf_get_rowstride:
  assertion `GDK_IS_PIXBUF (pixbuf)' failed
 
GLib-ERROR **: /build/buildd-glib2.0_2.20.0-2-i386-rcJiVy/glib2.0-2.20.0/glib/g$
  failed to allocate 4294967040 bytes
aborting...

Program received signal SIGABRT, Aborted.

Running gdb reveals that the failing malloc call in display_image.c:84
(or display_image.c:122) uses the return value from the failed
preceding gdk_pixbuf_get_rowstride() call. This call is made on a
GdkPixbuf object px which has ref-count zero at that time, i.e. has been 
freed...

Suggested patch: delay the gdk_pixbuf_unref (px) call
(display_image.c:73) until px is no longer needed. The following diff -u
can be used for this:
 
$> diff -u gpiv-0.6.0*/src/display_image.c
--- gpiv-0.6.0.orig/src/display_image.c 2007-12-14 12:54:24.000000000 +0100
+++ gpiv-0.6.0/src/display_image.c      2009-04-07 20:02:26.000000000 +0200
@@ -73,8 +73,6 @@         
                          disp->img->image->header->ncolumns,
                          disp->img->image->header->nrows);
 
-    gdk_pixbuf_unref (px);
-
 #ifdef DEBUG
     g_message("create_img:: rowstride = %d, rgb_img_width = %d",
               gdk_pixbuf_get_rowstride(px),
@@ -164,6 +162,8 @@
         disp->img->gci_img2 = disp->img->gci_img1;
     }

+    gdk_pixbuf_unref (px);
+
 /*     g_message(":: freeing rgbbuf_img1/2"); */
 /*     g_free(disp->img->rgbbuf_img1); */
 /*     disp->img->rgbbuf_img1 = NULL; */

nb: I have no experience in GTK prgramming, possibly this bug requires more
code overhaul than just this patch ?


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gpiv depends on:
ii  libart-2.0-2           2.3.20-2          Library of functions for 2D graphi
ii  libatk1.0-0            1.24.0-2          The ATK accessibility toolkit
ii  libbonobo2-0           2.24.1-1          Bonobo CORBA interfaces library
ii  libbonoboui2-0         2.24.1-1          The Bonobo UI library
ii  libc6                  2.9-6             GNU C Library: Shared libraries
ii  libcairo2              1.8.6-2+b1        The Cairo 2D vector graphics libra
ii  libfftw3-3             3.1.2-3.1         library for computing Fast Fourier
ii  libgconf2-4            2.24.0-7          GNOME configuration database syste
ii  libglib2.0-0           2.20.0-2          The GLib library of C routines
ii  libgnome2-0            2.24.1-2          The GNOME 2 library - runtime file
ii  libglib2.0-0           2.20.0-2          The GLib library of C routines
ii  libgnome2-0            2.24.1-2          The GNOME 2 library - runtime file
ii  libgnomecanvas2-0      2.20.1.1-1        A powerful object-oriented display
ii  libgnomeprint2.2-0     2.18.6-1          The GNOME 2.2 print architecture -
ii  libgnomeprintui2.2-0   2.18.4-1          GNOME 2.2 print architecture User
ii  libgnomeui-0           2.24.1-1          The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0         1:2.24.0-3        GNOME Virtual File System (runtime
ii  libgpiv3               0.6.1-1           library for Particle Image Velocim
ii  libgsl0ldbl            1.12+dfsg-1       GNU Scientific Library (GSL) -- li
ii  libgtk2.0-0            2.14.7-5          The GTK+ graphical user interface
ii  libice6                2:1.0.5-1         X11 Inter-Client Exchange library
ii  liborbit2              1:2.14.17-0.1     libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0          1.24.0-2          Layout and rendering of internatio
ii  libpopt0               1.14-4            lib for parsing cmdline parameters
ii  libsm6                 2:1.1.0-2         X11 Session Management library
ii  libxml2                2.7.3.dfsg-1      GNOME XML library
ii  zlib1g                 1:1.2.3.3.dfsg-13 compression library - runtime

gpiv recommends no packages.

gpiv suggests no packages.

-- no debconf information

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger01



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to