Package: inkscape Version: 0.43-5 Severity: grave Justification: renders package unusable
Steps to reproduce (/tmp/home used to make sure nothing in $HOME can affect this): 1) mkdir /tmp/home 2) cp ~/.Xauthority /tmp/home 3) HOME=/tmp/home strace -o inkscape.strace -f -s4096 inkscape Expected results: 3) inkscape should start and show a window. Actual results: 3) Inkscape prints the following error message and neither exits nor opens a window. Entity: line 3: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0x90 0xE7 0x65 0x08 <id>org.inkscape.input.gdkpixbuf.ion>. ^ Entity: line 8: parser error : PCDATA invalid Char value 8 <filetypetooltip>t</filetypetooltip> ^ More info: 1) inkscape.strace ends with the following lines: 28233 write(2, "Entity: line 3: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "Input is not proper UTF-8, indicate encoding !\nBytes: 0x90 0xE7 0x65 0x08\n", 74) = 74 28233 write(2, "<id>org.inkscape.input.gdkpixbuf.\220\347e\10</id>\n", 43) = 43 28233 write(2, " ^\n", 35) = 35 28233 write(2, "Entity: line 3: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "PCDATA invalid Char value 8\n", 28) = 28 28233 write(2, "<id>org.inkscape.input.gdkpixbuf.\220\347e\10</id>\n", 43) = 43 28233 write(2, " ^\n", 38) = 38 28233 write(2, "Entity: line 5: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "PCDATA invalid Char value 8\n", 28) = 28 28233 write(2, "<extension>.\220\347e\10</extension>\n", 29) = 29 28233 write(2, " ^\n", 17) = 17 28233 write(2, "Entity: line 6: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "PCDATA invalid Char value 8\n", 28) = 28 28233 write(2, "<mimetype>\260\347e\10</mimetype>\n", 26) = 26 28233 write(2, " ^\n", 15) = 15 28233 write(2, "Entity: line 7: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "PCDATA invalid Char value 8\n", 28) = 28 28233 write(2, "<filetypename>gif (*.\220\347e\10)</filetypename>\n", 42) = 42 28233 write(2, " ^\n", 26) = 26 28233 write(2, "Entity: line 8: ", 16) = 16 28233 write(2, "parser ", 7) = 7 28233 write(2, "error : ", 8) = 8 28233 write(2, "PCDATA invalid Char value 8\n", 28) = 28 28233 write(2, "<filetypetooltip>\230te\10</filetypetooltip>\n", 40) = 40 28233 write(2, " ^\n", 22) = 22 28233 --- SIGINT (Interrupt) @ 0 (0) --- 28233 +++ killed by SIGINT +++ 2) The erroneous XML fragment is probably generated in ../src/extension/internal/gdkpixbuf-input.cpp line 134 gchar *xmlString = g_strdup_printf( "<inkscape-extension>\n" "<name>%s GDK pixbuf Input</name>\n" "<id>org.inkscape.input.gdkpixbuf.%s</id>\n" "<input>\n" "<extension>.%s</extension>\n" "<mimetype>%s</mimetype>\n" "<filetypename>%s (*.%s)</filetypename>\n" "<filetypetooltip>%s</filetypetooltip>\n" "</input>\n" "</inkscape-extension>", name, extensions[i], extensions[i], mimetypes[j], name, extensions[i], description ); where apparently extensions[i] = "\220\347e\10" mimetypes[j] = "\260\347e\10" name = "gif" description = "\230te\10" 3) I copied the function in gdkpixbuf-input.cpp to a standalone program (attached as gdkpixbuf-input.cpp) but does not seem to reproduce the problem: $ g++ -o gdkpixbuf-input gdkpixbuf-input.cpp `pkg-config gdk-2.0 --cflags --libs` $ ./gdkpixbuf-input | grep gif <name>gif GDK pixbuf Input</name> <id>org.inkscape.input.gdkpixbuf.gif</id> <extension>.gif</extension> <mimetype>image/gif</mimetype> <filetypename>gif (*.gif)</filetypename> 4) I built inkscape with debugging symbols using $ time DEB_BUILD_OPTIONS="nostrip debug noopt" fakeroot apt-get --build source inkscape $ sudo dpkg -i inkscape*.deb and now inkscape fails differently! $ HOME=/tmp/home inkscape inkscape: gconv_dl.c:166: do_release_shlib: Assertion `obj->counter > 0' failed. Emergency save activated! ** (process:22423): ERROR (recursed) **: file inkscape.cpp: line 781 (Inkscape::XML::Node* inkscape_get_repr(Inkscape::Application*, const gchar*)): assertion failed: (!(strcmp (repr->name(), "inkscape"))) aborting... Aborted (core dumped) 5) GDB suggests that the problematic code in gdkpixbuf-input.cpp is never reached with the debugging build: $ HOME=/tmp/home gdb inkscape GNU gdb 6.4-debian Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) b gdkpixbuf-input.cpp:134 Breakpoint 1 at 0x85a23ab: file extension/internal/gdkpixbuf-input.cpp, line 134. (gdb) r Starting program: /usr/bin/inkscape [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 22434)] inkscape: gconv_dl.c:166: do_release_shlib: Assertion `obj->counter > 0' failed. Program received signal SIGABRT, Aborted. [Switching to Thread 16384 (LWP 22434)] 0x4107d701 in kill () from /lib/libc.so.6 (gdb) bt #0 0x4107d701 in kill () from /lib/libc.so.6 #1 0x40ece030 in pthread_kill () from /lib/libpthread.so.0 #2 0x40ece3fb in raise () from /lib/libpthread.so.0 #3 0x4107d474 in raise () from /lib/libc.so.6 #4 0x4107e9e8 in abort () from /lib/libc.so.6 #5 0x41076495 in __assert_fail () from /lib/libc.so.6 #6 0x41072cc0 in __gconv_get_cache () from /lib/libc.so.6 #7 0x41164860 in in6addr_any () from /lib/libc.so.6 #8 0x41164855 in in6addr_any () from /lib/libc.so.6 #9 0x000000a6 in ~ElementNode (this=0x8868f90) at gc-core.h:161 #10 0x41112981 in tdelete () from /lib/libc.so.6 #11 0x41072cf0 in __gconv_get_cache () from /lib/libc.so.6 #12 0x08868f90 in ?? () #13 0x41072c10 in __gconv_get_cache () from /lib/libc.so.6 #14 0x41171ff4 in ?? () from /lib/libc.so.6 #15 0xbfffe7e4 in ?? () #16 0x4106aae5 in __gconv_get_alias_db () from /lib/libc.so.6 #17 0x41171ff4 in ?? () from /lib/libc.so.6 #18 0x41171ff4 in ?? () from /lib/libc.so.6 #19 0x08824ebc in ?? () #20 0xbfffe804 in ?? () #21 0x4106b798 in __gconv_get_alias_db () from /lib/libc.so.6 #22 0x4117586c in _dl_open_hook () from /lib/libc.so.6 #23 0x00000002 in ?? () #24 0x41171ff4 in ?? () from /lib/libc.so.6 #25 0x08866f94 in ?? () #26 0x088b0f20 in ?? () #27 0xbfffe82c in ?? () #28 0x4106a9af in iconv_close () from /lib/libc.so.6 Previous frame inner to this frame (corrupt stack?) (gdb) b inkscape.cpp:781 Breakpoint 2 at 0x823fce1: file inkscape.cpp, line 781. (gdb) condition 2 (repr->name()[0] != 'i') (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/bin/inkscape [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 22600)] Breakpoint 2, inkscape_get_repr (inkscape=0x87fb860, key=0x86f7dfe "extensions") at inkscape.cpp:781 781 g_assert (!(strcmp (repr->name(), "inkscape"))); (gdb) call repr->name() $1 = (const gchar *) 0x88906b0 " \006\211\b" (gdb) print inkscape->preferences->root()->name() $6 = (const gchar *) 0x88906b0 " \006\211\b" -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.4.29sauna Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1) Versions of packages inkscape depends on: ii libatk1.0-0 1.11.4-2 The ATK accessibility toolkit ii libbonobo2-0 2.14.0-1 Bonobo CORBA interfaces library ii libc6 2.3.6-11 GNU C Library: Shared libraries ii libcairo2 1.0.4-2 The Cairo 2D vector graphics libra ii libfontconfig1 2.3.2-5.1 generic font configuration library ii libfreetype6 2.2.1-2 FreeType 2 font engine, shared lib ii libgc1c2 1:6.7-1 conservative garbage collector for ii libgcc1 1:4.1.0-4 GCC support library ii libgconf2-4 2.14.0-1 GNOME configuration database syste ii libglib2.0-0 2.10.3-1 The GLib library of C routines ii libglibmm-2.4-1c2a 2.8.2-2.1 C++ wrapper for the GLib toolkit ( ii libgnomevfs2-0 2.14.1-2 GNOME virtual file-system (runtime ii libgtk2.0-0 2.8.17-2 The GTK+ graphical user interface ii libgtkmm-2.4-1c2a 1:2.6.5-1+b1 C++ wrappers for GTK+ 2.4 (shared ii liborbit2 1:2.14.0-1 libraries for ORBit2 - a CORBA ORB ii libpango1.0-0 1.12.1-3 Layout and rendering of internatio ii libperl5.8 5.8.8-4 Shared Perl library ii libpng12-0 1.2.8rel-5.1 PNG library - runtime ii libpopt0 1.7-5 lib for parsing cmdline parameters ii libsigc++-2.0-0c2a 2.0.16-3 type-safe Signal Framework for C++ ii libstdc++6 4.1.0-4 The GNU Standard C++ Library v3 ii libx11-6 2:1.0.0-6 X11 client-side library ii libxcursor1 1.1.5.2-5 X cursor management library ii libxext6 1:1.0.0-4 X11 miscellaneous extension librar ii libxfixes3 1:3.0.1.2-4 X11 miscellaneous 'fixes' extensio ii libxft2 2.1.8.2-8 FreeType-based font drawing librar ii libxi6 1:1.0.0-5 X11 Input extension library ii libxinerama1 1:1.0.1-4 X11 Xinerama extension library ii libxml2 2.6.24.dfsg-1 GNOME XML library ii libxrandr2 2:1.1.0.2-4 X11 RandR extension library ii libxrender1 1:0.9.0.2-4 X Rendering Extension client libra ii libxslt1.1 1.1.16-2 XSLT processing library - runtime ii zlib1g 1:1.2.3-11 compression library - runtime Versions of packages inkscape recommends: pn dia | dia-gnome <none> (no description available) ii imagemagick 7:6.2.4.5-0.8 Image manipulation programs pn libwmf-bin <none> (no description available) pn perlmagick <none> (no description available) pn pstoedit <none> (no description available) pn sketch <none> (no description available) -- no debconf information
// g++ -o gdkpixbuf-input gdkpixbuf-input.cpp `pkg-config gdk-2.0 --cflags --libs` #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <string.h> #include <gdk-pixbuf/gdk-pixbuf.h> int main(int argc, char **argv) { GSList * formatlist, * formatlisthead; /* \todo I'm not sure if I need to free this list */ for (formatlist = formatlisthead = gdk_pixbuf_get_formats (); formatlist != NULL; formatlist = g_slist_next(formatlist)) { GdkPixbufFormat *pixformat = (GdkPixbufFormat *)formatlist->data; gchar *name = gdk_pixbuf_format_get_name(pixformat); gchar *description = gdk_pixbuf_format_get_description(pixformat); gchar **extensions = gdk_pixbuf_format_get_extensions(pixformat); gchar **mimetypes = gdk_pixbuf_format_get_mime_types(pixformat); for (int i = 0; extensions[i] != NULL; i++) { for (int j = 0; mimetypes[j] != NULL; j++) { printf( "<inkscape-extension>\n" "<name>%s GDK pixbuf Input</name>\n" "<id>org.inkscape.input.gdkpixbuf.%s</id>\n" "<input>\n" "<extension>.%s</extension>\n" "<mimetype>%s</mimetype>\n" "<filetypename>%s (*.%s)</filetypename>\n" "<filetypetooltip>%s</filetypetooltip>\n" "</input>\n" "</inkscape-extension>", name, extensions[i], extensions[i], mimetypes[j], name, extensions[i], description ); }} g_free(name); g_free(description); g_strfreev(mimetypes); g_strfreev(extensions); } g_slist_free (formatlisthead); return 0; }