Hash: SHA1

Fine, fine, I'll subscribe already. *sigh*
Moderator, please delete the similar post that has been sitting
in the approve queue for over a week.

Gimp Segfaults on Startup


After spending a whole day downloading, compiling and installing
gimp 1.2.3 and its various dependencies, I was unpleasantly
surprised to find the text "Segmentation Fault" as its only
output. I searched the gimp and gtk lists for "segmentation",
"sigsegv" and other variations, but nothing useful turned up. Let
the debugging begin.

Tried running gimp with various combinations of options, in
particular with any type of shared memory disabled. Conclusion:
the only way to avoid the SIGSEGV is to run with --no-interface.

Secondly, built and ran all examples supplied with GTK; all seem
to work fine. However, the last trace (see below) suggests that
it might be a GTK problem anyway. Since I'm really not sure, I
decided to submit my problem to the gimp list first.

I am very short on time at the moment, and can't be sure when I
will have enough time to dive into the code. I am also completely
new to the GIMP source, and with all due respect, wish to learn
as little as possible about it. Now, before I dive in, does
anyone have any hints, tips, suggestions or pointers to speed up
my quest? Could it even be that this problem is already known?

OS              : Linux 2.0.39
Distribution    : Custom/Homebrew
GTK             : gtk+-1.2.10
GCC             : 2.95.3
libc            : libc.so.5.4.38
Machine         : P166MMX w/32 MB RAM
Other info      : ask

Summary of debug attempts:

((Full session transcripts are available on request. Same goes for
my gimp and gtk build scripts.))

laptop:~$ gdb gimp
GDB is free software and you are welcome to 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.
GDB 4.14 (i486-slackware-linux), Copyright 1995 Free Software Foundation, Inc...
(no debugging symbols found)...
(gdb) run
Starting program: /usr/bin/X11/gimp

Program received signal SIGSEGV, Segmentation fault.
0x402b2f97 in non_gui_paint_core ()
(gdb) bt
#0  0x402b2f97 in non_gui_paint_core ()
#1  0x40187118 in non_gui_paint_core ()
#2  0x40176b0f in non_gui_paint_core ()
#3  0x40176bc9 in non_gui_paint_core ()
#74 0x400c997f in non_gui_paint_core ()
#75 0x400c7af7 in non_gui_paint_core ()
#76 0x400fc00d in non_gui_paint_core ()
#77 0x8164bfa in user_install_verify ()
#78 0x8163650 in user_install_verify ()
#79 0x8109364 in main ()
#80 0x8069f7e in _start ()

Hmmm... That looks suspicious. Time to build a debug version.

Multiple nightly rebuilds were necessary to get a debug-enabled
version. Had to free up extra diskspace to make it fit. GRRRR.

Second GDB session summary:

laptop:~/src/gimp-1.2.3/app/gimp-1.2$ ( export MALLOC_CHECK_=2 && gdb gimp-1.2 )
Breakpoint 2, gimp_pixmap_new (xpm_data=0x826fc80) at gimppixmap.c:108
(gdb) s
0x81db1c0       93      }
(gdb) bt
#0  0x81db1c0 in gimp_pixmap_get_type () at gimppixmap.c:93
#1  0x81db1da in gimp_pixmap_new (xpm_data=0x826fc80) at gimppixmap.c:108
#2  0x81bea97 in user_install_dialog_create (callback=0x8142138 <init>) at 
#3  0x81bde21 in user_install_verify (user_install_callback=0x8142138 <init>) at 
#4  0x8142112 in main (argc=1, argv=0xbffffd34) at main.c:399
#5  0x806a05e in _start ()
(gdb) s

Program received signal SIGABRT, Aborted.
0x40250665 in non_gui_paint_core ()
(gdb) bt
#0  0x40250665 in non_gui_paint_core ()
#1  0x402c4368 in non_gui_paint_core ()
#54 0x400c7af7 in non_gui_paint_core ()
#55 0x400fc00d in non_gui_paint_core ()
#56 0x81bf9e2 in user_install_dialog_create (callback=0x8142138 <init>) at 
#57 0x81bde21 in user_install_verify (user_install_callback=0x8142138 <init>) at 
#58 0x8142112 in main (argc=1, argv=0xbffffd34) at main.c:399
#59 0x806a05e in _start ()
#59 0x806a05e in _start ()

Still suspicious, but got the exact instruction where the error
was caught. (Not necessarily very useful.)

Note that libc's internal malloc debugger is enabled during the
above session. (As per MALLOC_CHECK_.)

Let's try a full trace. Third session summary:

(gdb) run
Starting program: /home/zovier/src/gimp-1.2.3/app/gimp-1.2

Breakpoint 1, main (argc=1, argv=0xbffffd34) at main.c:121
121       gboolean show_version = FALSE;
(gdb) while 1
122       gboolean show_help    = FALSE;
128       g_atexit (g_mem_profile);
671       gtk_widget_show (hbox);
673       title_pixmap = gimp_pixmap_new (wilber_xpm);

Breakpoint 2, gimp_pixmap_new (xpm_data=0x826fc80) at gimppixmap.c:108
108       pixmap = gtk_type_new (gimp_pixmap_get_type ());
gimp_pixmap_get_type () at gimppixmap.c:75
75        if (!pixmap_type)
77            GtkTypeInfo pixmap_info =
89            pixmap_type = gtk_type_unique (gtk_pixmap_get_type (), &pixmap_info);
92        return pixmap_type;
0x81db1c0       93      }

Program received signal SIGABRT, Aborted.
0x40250665 in non_gui_paint_core ()
Cannot find bounds of current function

Again, the malloc debugger was enabled during this session.

laptop:~$ ls -l $( ldd /usr/bin/X11/gimp | awk '{print $3}' ) | awk 'gsub("^.*/","")'
libc.so.5 -> libc.so.5.4.38*
libdl.so.1 -> libdl.so.1.8.10*
libm.so.5 -> libm.so.5.0.9*
libX11.so.6 -> libX11.so.6.1*
libXext.so.6 -> libXext.so.6.3*
libgdk-1.2.so.0 -> libgdk-1.2.so.0.9.1*
libgtk-1.2.so.0 -> libgtk-1.2.so.0.9.1*
libglib-1.2.so.0 -> libglib-1.2.so.0.0.10*
libgmodule-1.2.so.0 -> libgmodule-1.2.so.0.0.10*

End. Thanks for considering my problem.

- --
Regards,                                                        ()
=Martin=               ASCII Ribbon Campaign Against HTML Mail  /\

PGP:  D358DE6E  7373 3E15 8F24 B838 DA96  F576 B765 DDCA D358 DE6E

Subject: GIMP Segfaults on startup
X-S-Issue: [EMAIL PROTECTED] 2002/11/23 07:50:01 
Version: GnuPG v1.2.1 (GNU/Linux)

Gimp-developer mailing list

Reply via email to