Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21787 - Gimp 1.2.4 segfaults while opening
Summary: Gimp 1.2.4 segfaults while opening
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-27 15:48 UTC by Frantz Dhin
Modified: 2003-07-05 06:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frantz Dhin 2003-05-27 15:48:21 UTC
entropy / # gimp

LibGimp-WARNING **: script-fu: wire_read: unexpected EOF
Segmentation fault


This happens just after extension_script_fu has been loaded on the splash
screen. A palette appears in the upper left corner of the screen for a very
short second and then the app segfaults.


entropy bin # gdb gimp
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...(no debugging symbols found)...
(gdb) run
Starting program: /usr/bin/gimp
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...[New Thread 16384 (LWP 31117)]
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 31117)]
0x40186583 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) backtrace
#0  0x40186583 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
Cannot access memory at address 0x0
(gdb)


Portage 2.0.48 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.21_rc2-gss i686 Pentium III (Coppermine)
GENTOO_MIRRORS="ftp://ftp.sunet.se/pub/Linux/distributions/gentoo
ftp://sunsite.auc.dk/mirrors/gentoo http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg kde libg++ mikmod mmx mpeg
ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm
berkdb slang readline arts svga java guile X sdl gpm tcpd pam libwww ssl perl
python imlib oggvorbis gnome gtk qt motif opengl mozilla aalib acl -afs alsa
apache2 athena bonobo canna cdr cjk curl dga dnd dvb dvd directfb doc esd
ethereal fbcon firebird flash foreign-package foreign-sysvinit freetds freewnn
gd ggi gnomedb gphoto2 gps gtk2 imap innodb ipv6 jikes kerberos lcms ldap leim
-lirc lucid mbox mcal mozaccess mozcalendar mozinterfaceinfo mozp3p mozsvg
mozxmlterm mpi mule mysql nas neXt -nptl oav objc oci8 odbc pda pnp postgres
ruby samba scanner slp snmp sse tcltk tetex tiff vim-with-x wmf Xaw3d xface xml"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -Os -pipe"
CXXFLAGS="-march=pentium3 -Os -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox buildpkg ccache"
Comment 1 Frantz Dhin 2003-05-27 20:19:20 UTC
I managed to get it open now.

entropy bin # gdb gimp
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) break g_list_foreach
Breakpoint 1 at 0x806b330
(gdb) r
Starting program: /usr/bin/gimp
Breakpoint 1 at 0x40186575
[New Thread 16384 (LWP 21843)]
[Switching to Thread 16384 (LWP 21843)]

Breakpoint 1, 0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) bt
#0  0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
#1  0x08131a19 in session_restore ()
#2  0x0806d210 in gimp_init ()
#3  0x080f5b19 in init ()
#4  0x0814470b in user_install_verify ()
#5  0x080f54c7 in main ()
#6  0x403177a7 in __libc_start_main () from /lib/libc.so.6
(gdb) return 0
Make selected stack frame return now? (y or n) y
#0  0x08131a19 in session_restore ()
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.
0x08131a1c in session_restore ()
(gdb) step
Single stepping until exit from function session_restore,
which has no line number information.

Breakpoint 1, 0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.
0x08131a05 in session_restore ()
(gdb) step
Single stepping until exit from function session_restore,
which has no line number information.
0x0806d210 in gimp_init ()
(gdb) step
Single stepping until exit from function gimp_init,
which has no line number information.

Now a window entitled "The Gimp" is open with a range of icons, and a menu bar containing "File", "Xtns" and "Help". I am not usually a gimp user so I cannot say if this is 100% correct looking.
This is btw the first time I am using gdb ever so bear with my blind poking around :)
For the sake of comparison I repeated the above session without "return 0" to show that it does not work:

entropy bin # gdb gimp
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) break g_list_foreach
Breakpoint 1 at 0x806b330
(gdb) r
Starting program: /usr/bin/gimp
Breakpoint 1 at 0x40186575
[New Thread 16384 (LWP 21837)]
[Switching to Thread 16384 (LWP 21837)]

Breakpoint 1, 0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x40186583 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.

LibGimp-WARNING **: script-fu: wire_read: unexpected EOF
Cannot find user-level thread for LWP 21837: generic error
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2003-05-28 05:08:37 UTC
hmm .. can you try compiling gimp with 

FEATURES="nostrip" CFLAGS="-march=pentium3 -O1 -pipe -g" emerge gimp

and then run it through gdb again. thanks for going through all that, but it seems there's something really basic that is causing gimp to complain, like maybe missing files it can't find while in gimp_init .. (although why it segfaults and not return a sensible error message, i don't know)
Comment 3 Frantz Dhin 2003-05-28 07:31:08 UTC
entropy All # gdb gimp
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...
(gdb) break g_list_foreach
Breakpoint 1 at 0x806b1ec
(gdb) r
Starting program: /usr/bin/gimp
Breakpoint 1 at 0x40186575
[New Thread 16384 (LWP 26462)]
[Switching to Thread 16384 (LWP 26462)]

Breakpoint 1, 0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) bt
#0  0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
#1  0x0816809b in session_restore () at session.c:297
#2  0x0806ec90 in app_init () at app_procs.c:685
#3  0x0806d8cb in gimp_init (gimp_argc=0, gimp_argv=0xbffff848) at app_procs.c:143
#4  0x0811c833 in init () at main.c:445
#5  0x0817fe49 in user_install_verify (user_install_callback=0x811c817 <init>) at user_install.c:118
#6  0x0811c7fc in main (argc=1, argv=0xbffff844) at main.c:411
#7  0x403177a7 in __libc_start_main () from /lib/libc.so.6
(gdb) return 0
Make selected stack frame return now? (y or n) y
#0  session_restore () at session.c:300
300     session.c: No such file or directory.
        in session.c
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.

Breakpoint 1, 0x40186575 in g_list_foreach () from /usr/lib/libglib-1.2.so.0
(gdb) step
Single stepping until exit from function g_list_foreach,
which has no line number information.
session_reset_open_state (info=0x8215780) at session.c:330
330     in session.c
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2003-06-01 19:42:25 UTC
ok .. i remember you were on irc telling me that it was working with less optimisations? right?
Comment 5 Frantz Dhin 2003-06-01 20:14:00 UTC
Right. The -Os seems to be the culprit, but I have to say that it was not a problem in any previous version of the gimp, and possibly wont be in the future as well. If you are going to filter this flag out then perhaps add a note that it should be tried out in later versions and perhaps not filtered?
Comment 6 Bret Towe 2003-06-20 19:53:39 UTC
i just upgraded to 1.2.5 and had same problem with -Os compiling with -O3 works
as does -O1 didnt try -O2 cause it usally always works
CFLAGS="-march=athlon-xp -Os -pipe"
is what i usally run
has upstream been told of this bug or do they know of it?
upstream being gimp or gcc but i have a feeling this is prob gcc's problem

anyhow i think replace-flags is in order for the ebuilds for the time being
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2003-07-05 06:39:10 UTC
well, i've put in a replace-flags as a temporary measure.