Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55467 - Gaim segfaults if attempting to set an accelerator to an away message.
Summary: Gaim segfaults if attempting to set an accelerator to an away message.
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gaim Bugs Crew
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-28 13:20 UTC by Wallex
Modified: 2004-07-01 13:47 UTC (History)
1 user (show)

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


Attachments
BackTrace for the SegFault. (backtrace.txt,1.51 KB, text/plain)
2004-06-30 07:33 UTC, Wallex
Details
Backtrace after reemerging Glib (backtrace.txt,1.49 KB, text/plain)
2004-06-30 09:37 UTC, Wallex
Details
My make.conf file. (make.conf,14.34 KB, text/plain)
2004-06-30 12:16 UTC, Wallex
Details
Gaim's accelerator dump. (accels,2.92 KB, text/plain)
2004-07-01 13:16 UTC, Wallex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wallex 2004-06-28 13:20:45 UTC
If I want to set a certain accelerator combination (ctrl+z, for example) to any of my defined custom away messages it will always cause a Gaim Segmentation fault. It's odd that I haven't found this bug in bugzilla before (and it exists since I can remember in Gaim), maybe noone uses "gtk-can-change-accels = 1" anymore?

Reproducible: Always
Steps to Reproduce:
1. Open the away menu
2. Highlight desired away message
3. Press accelerator combo (example ctrl+z)

Actual Results:  
Gaim segfaults.

Expected Results:  
The new accelerator combo should be saved.. or at worst, ignored with a console
beep.

Here's the Gaim's -debug info right when segfaulting:

Gtk: file gtkaccelgroup.c: line 707 (gtk_accel_group_from_accel_closure):
assertion `closure != NULL' failed
Gaim has segfaulted and attempted to dump a core file.
This is a bug in the software and has happened through
no fault of your own.

And here's the obligatory "emerge info":
Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.4.26-g
                                                                         entoo-r3)
=================================================================
System uname: 2.4.26-gentoo-r3 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -finline-functions -finl
                                                                        
ine-limit=600 -mfpmath=387 -ffast-math -ftracer -funroll-loops -fprefetch-loop-a
                                                                         rrays
-freduce-all-givs"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
                                                                        
hare/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -finline-functions -fi
                                                                        
nline-limit=600 -mfpmath=387 -ffast-math -ftracer -funroll-loops -fprefetch-loop
                                                                         -arrays
-freduce-all-givs"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache digest sandbox userpriv"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirro
                                                                        
rs.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.du.se/pub/os/gentoo http://
                                                                        
mirror.clarkson.edu/pub/distributions/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/ge
                                                                         ntoo/"
MAKEOPTS="-j2 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage"
USE="# #Gcc #Specific #Usagi #Zsh 2.6 3dnow Claws Cups End Gentoo-Kernel Gimp Gl
                                                                         ibc I
IPv6 Mozilla Ntp Perl Related Sylpheed USE Vim X acpi acpi4linux alsa apm      
                                                                    avi because
berkdb canna cap cdr cjk crypt cscope cups dga dillo dvd encode eran           
                                                              dom fam fbcon flac
for freewnn gd gdbm gif gimpprint ginac gpm gtk gtk2 imap iml                  
                                                       ib innodb is jabber jikes
jpeg kerberos kernel libg++ libwww listing mad mbox mi                         
                                                kmod mmx moznocompose moznoirc
moznomail mpeg ncurses need objc oggvorbis opengl                              
                                            pam parse-clocks pcre pdflib perl
png ppds python quicktime readline samba scan                                  
                                       ner sdl slang spell sse ssl support svga
tags tcltk tcpd theora threads tiff tru                                        
                                 etype unicode usagi usb use vim-with-x vimdiff!
wait wmf x86 xface xml xml2 xmms                                               
                           xv zlib"
Comment 1 Don Seiler (RETIRED) gentoo-dev 2004-06-28 13:45:17 UTC
Build with USE="debug" and get a backtrace.
Comment 2 Wallex 2004-06-28 14:42:58 UTC
Hmm... I CAN'T get a backtrace... because the second it crashes, GTK had total control over my keyboard and mice input, meaning none of the keyboard strokes would work, nor the mouse buttons or movements would be of any good: I can move the mouse around, but it won't change the focus of windows, and I couldn't use my WM's key-combinations to swap workspace or the focus of the active window.. all because GTK was 'eating' the keyboard input in order to set the active accelerator. I could still swap out of X and into a console to kill Gaim, but then the backtrace would be of the kill command, not of the segfault.

Any idea of what I can do to get around this? I should start the debugger from a terminal console rather than from X to get the backtrace, but how do I instruct Gaim to do that... can it even be done?
Comment 3 Don Seiler (RETIRED) gentoo-dev 2004-06-29 07:45:08 UTC
Indulge me and cut your CFLAGS to maybe just this:

-march=athlon-xp -O3 -pipe -fomit-frame-pointer

Then rebuild gtk+ and gaim (in that order) and try again.
Comment 4 Wallex 2004-06-29 10:58:07 UTC
Since I am also part of bug 55447, I did a:

emerge -av perl gtk+ gaim

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-lang/perl-5.8.2-r1  +berkdb -doc +gdbm +threads -uclibc  0 kB 
[ebuild   R   ] x11-libs/gtk+-2.4.1  -doc +jpeg +tiff  0 kB 
[ebuild   R   ] net-im/gaim-0.79  +cjk +crypt +debug -gnutls -nas -nls +perl -silc +spell  0 kB 

Using the CGLAGS: CFLAGS="-march=athlon-xp -O3 -pipe" and the problem persisted. I tried with CFLAGS="-march=athlon-xp -pipe" as well and the problem just won't go away, so I suppose the problem does not lies in the compilation flags used. Noone else can reproduce the error? It's rare that it's just me... according to Gaim -d the problem is pretty explicit:

Gtk: file gtkaccelgroup.c: line 707 (gtk_accel_group_from_accel_closure): assertion `closure != NULL' failed
Gaim has segfaulted and attempted to dump a core file.
This is a bug in the software and has happened through
no fault of your own.

An assertion failure shouldn't happen if you ask me...
Comment 5 Wallex 2004-06-30 07:33:49 UTC
Created attachment 34487 [details]
BackTrace for the SegFault.

Finally was able to obtain a backtrace for the crash by Exporting the variable
DISPLAY=":0.0" from a console and launching gdb+gaim from there.
Notice that my wacom mouse won't work under the console, so I had to hand-copy
the bt, and I double checked it to make sure there are no errors on the copy,
but I can't swear my soul on it. ;) (altough I am pretty confident there are no
errors on the copying)
Comment 6 Don Seiler (RETIRED) gentoo-dev 2004-06-30 07:41:27 UTC
Your backtrace is 100% gtk+.  Perhaps you need to rebuild glib as well.
Comment 7 Don Seiler (RETIRED) gentoo-dev 2004-06-30 07:42:08 UTC
And by that I mean:

emerge glib gtk+ gaim
Comment 8 Wallex 2004-06-30 09:37:47 UTC
Created attachment 34496 [details]
Backtrace after reemerging Glib

Because of that other bug in which I am involved, I did a 

emerge --oneshot libperl perl glib gtk+ gaim
with the CFLAGS="-march=athlon-xp -pipe" (and USE included "debug")

The backtrace did not changed much, but I don't think it's 100% gtk+ since near
the end, the funcion g_main_context_context_dispatch () is from
libglib-2.0.so.0

Well... anything else I can do?
Comment 9 Don Seiler (RETIRED) gentoo-dev 2004-06-30 11:00:16 UTC
I'm looking at your USE line, and it looks seriously messed up.  Try using ufed to set your USE flags.  If you'd like, feel free to attach your make.conf.  I'll see if I can correct anything.  You might need to rebuild a lot deeper once things are fixed.

Between this bug and 55447, I think your system has some serious problems.
Comment 10 Wallex 2004-06-30 11:29:19 UTC
Um.. well, I don't know how "messed" up can my USE line affect my system. The problem with the USE flags is that I tried to attach comments into it because there are a few local flags for which I need the comment there or I won't remember why I set them up in the first place. The use Section on my make.conf is as follows:

USE="3dnow acpi alsa -arts avi canna cjk crypt cscope dga dvd -esd fam flac \
    fbcon freewnn gd gif ginac gtk gtk2 gpm -gnome imap imlib innodb \
    jabber -java jikes jpeg kerberos -kde libwww mbox -motif mmx mpeg \
    -nls oggvorbis -oss pam pdflib -pie -pic png -qt quicktime samba scanner \
    sdl sse ssl theora tcltk tiff truetype unicode usb wmf xface \
    -xinerama xml xml2 xmms xv zlib \
#When debugging is needed
debug \ 
#Gcc
-hardened objc \ 
#Gentoo-Kernel Usagi is IPv6 support
acpi4linux usagi \ 
#Glibc nptl wait for kernel 2.6
-nptl erandom \ 
#Perl
threads \ 
#Mozilla
moznocompose moznoirc moznomail \ 
#Sylpheed Claws
dillo \ 
# Vim -can't use minimal because I need vimdiff!
-minimal vim-with-x \ 
# Ntp
parse-clocks \ 
# Cups Related
cups -foomaticdb ppds \ 
# Gimp
gimpprint \
#Zsh
cap pcre \
"
# End USE listing

I suppose I could duplicate the comment section and place all that in a comment to get it away from the main USE flag section. Until I used emerge info I didn't know the comments were being parsed as use flags themselves O.o I really doubt I'd need to reemerge my system as I always do a "emerge -av" and I am sure the packages were compiled with the flags I want.. but I might try doing an emerge -e gaim" to make sure all the dependencies are correctly build deep down to the base C libraries (will likely do that with minimal CFLAGS as well for testing purposes)
Comment 11 Don Seiler (RETIRED) gentoo-dev 2004-06-30 11:40:33 UTC
I'm virtually certain you can't be commenting your USE flags.  Seriously, just emerge ufed and use it to set your USE flags, it has descriptions for both global and local flags.
Comment 12 Wallex 2004-06-30 11:55:49 UTC
Seriously, I hate UFED, it doesn't lets me specify a -Flag, I can only set +Flags or just "not set anything" regarding it. Nor does it has a search future when I am looking for a particular flag's description. 
I'll just stick to grep $flag /usr/portage/profiles/use* and vim-editing the make.conf file, thank you. (I just didn't know about the inability to place comments within the USE line, and I just fixed that). Well back to compiling just in case...
Comment 13 Don Seiler (RETIRED) gentoo-dev 2004-06-30 11:58:50 UTC
I'm only suggesting because at the moment your settings are completely wacko to me and those that I've spoken with in #gentoo-dev agree that you should not be having comments or anything other than actual USE flags in your USE string.
Comment 14 Don Seiler (RETIRED) gentoo-dev 2004-06-30 12:00:42 UTC
Regarding the +/- flags, ufed takes into account the USE defaults, and only sets/unsets flags relative to those.  So some flags that you enable in ufed won't be shown in /etc/make.conf if they are enabled by default.  Similar to removing flags.
Comment 15 Wallex 2004-06-30 12:15:06 UTC
Well, nowhere did I read before that you COULDN'T place comments on the USE line, and since that thing is so vast and big, I just had to place some comments where relevant (like a comment where I explain why I have -pic -pie because it breaks the Xorg server or/and the Nvidia driver). I just didn't know how emerge parses the make file, but that's all now good and in place. And yeah I'll have fun over the weekend reemerging everything just in case. I'll attach how my make.conf file looks now. (For fun I am gonna reemerge the whole system twice, first with the minimal CFLAGS -currently in make.conf- to see if that affects at all the bugs I have, and then with my default set of flags -commented in make.conf-)
Comment 16 Wallex 2004-06-30 12:16:08 UTC
Created attachment 34510 [details]
My make.conf file.
Comment 17 Don Seiler (RETIRED) gentoo-dev 2004-06-30 13:51:37 UTC
Basically just 'emerge -e gaim' to build all the possible dependencies that would be affecting things.
Comment 18 Wallex 2004-06-30 19:11:54 UTC
After an "emerge -ave gaim" which listed around 82 packages and a long fun day of compiling with my CFLAGS="-march=athlon-xp -pipe" (which means I have now an ubber unoptimized system), and restarting my system to be make SURE I was using the newly compiled libraries, I can proudly say that Gaim still crashes when setting an away accelerator on any of my user-defined away messages =D
Oh and my other bug still persists. What's next? "emerge -ave world"? Reinstalling on another partition and trying again? Blame it on the hardware? Blame it in the kernel? =D 

Heh, it's the kind of bug only I can ran across and noone else ever experiences...  maybe I should just give up on the issue. But this is a crash, and there's a backtrace, shouldn't something be done about it? (the backtrace didn't changed at all after all this compiling)

Oh.. and the final proof... the USE section of "emerge info" says:
USE="3dnow X acpi acpi4linux alsa apm avi berkdb canna cap cdr cjk cscope cups debug dga dillo dvd encode erandom fam fbcon flac freewnn gd gdbm gif gimpprint ginac gpm gtk gtk2 imap imlib innodb jabber jikes jpeg kerberos libg++ libwww mad mbox mikmod mmx moznocompose moznoirc moznomail mpeg ncurses objc oggvorbis opengl pam parse-clocks pcre pdflib perl png ppds python quicktime readline samba scanner sdl slang spell sse ssl svga tcltk tcpd theora threads tiff truetype unicode usagi usb vim-with-x wmf x86 xface xml xml2 xmms xv zlib"

So don't blame buggy USE settings ;)
Comment 19 Don Seiler (RETIRED) gentoo-dev 2004-07-01 12:08:31 UTC
I'm CCing the Gentoo Gnome team.  Gaim devs say that this is almost definitely a GTK+ bug, perhaps an X11 problem.  I'm assuming you've rebuild both gtk+ and xfree/xorg-x11.  What about your WM?
Comment 20 Wallex 2004-07-01 12:42:37 UTC
Indeed, xorg-x11 and gtk+ were rebuilt along the way with another 80 packages when doing emerge -ave gaim.

My current WM is PekWM, but this problem existed since before when I used
Fluxbox. To remove the guilt from the WM, I changed the contents of my
.xinitrc file to read:
xterm
And using this "minimal" enviroment, I ran gaim and both the bugs I was
involved in were still present.
I also used the app "switch2" to change my gtk-theme to the default to make
sure the theme was not to be blamed. .gtkrc-2.0 reads:

# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Default/gtk-2.0/gtkrc"

include "/home/wallex/.gtkrc.mine"

# -- THEME AUTO-WRITTEN DO NOT EDIT
gtk-can-change-accels = 1

I had to add the gtk-can-change-accels line, or otherwise I couldn't change
the accelerators (which is needed to reproduce the crash). And it's the first time I've heard of the file ~/.gtkrc.mine (It does not exists currently).

So... I can pretty much confirm it has nothing to do with the Windows Manager
nor the Gtk-theme in question.

I was thinking maybe it was related to my Wacom tablet, so I removed the core-pointer option from my xorg.conf (and moved the pointer using Ctrl+Shift+NumLock -> numpad), and even without a pointer, I could still make it crash, so it can't be the wacom's fault either.

Playing some more around in Gaim, I realized that the thing crashes whenever I try to set an accelerator key to any of the menu items generated by my accounts. For example, I could set F1 to set buddy pounces, to open the transfer windows, to privacy, but if for example, I tried to set it on Account Actions -> <my msn account> -> set friendly name = crash. The same applies to trying to set an accelerator to any of the away menu-items under any of the protocols (for I have AIM, MSN, Jabber and ICQ). So I am thinking the problem is definitely linked to menu entries generated dynamically by my registered accounts.

Isn't there any-more information I can snatch from gdb that could be useful?
Comment 21 Don Seiler (RETIRED) gentoo-dev 2004-07-01 13:11:28 UTC
Can you try with gtk+-2.4.3?

I've found another user who confirmed that this is indeed happening.  However he said he is now on gtk+-2.4.3 and it just beeps, not crashes.  It used to crash, he said.  Anyway he told me how to test it and I confirmed that on 2.4.3 it doesn't crash, but doesn't do anything else.
Comment 22 Wallex 2004-07-01 13:16:36 UTC
Created attachment 34605 [details]
Gaim's accelerator dump.

I don't know if this will be relevant, but I noticed that the dumped "accels"
file does not includes any of the items inside account submenus (the ones that
cause a crash when trying to define an accel for). The dump does shows the
upper level entries (like away -> My MSN account), but not the ones that go
inside. Could this somehow be related?

There are also some inconsistencies on the file, for example there's a:
"/Tools/Account Actions/Show Buddies Awaiting Authorization" entry, but that
entry should be "/Tools/Account Actions/99999999 (ICQ)/Show Buddies Awaiting
Authorization", there's a few other entries that also seem messed up when
'eating' up the account's part of the accelerator. Suspicious?

(PD: Changed the account info for privacy concerns, as the saying goes).
Comment 23 Wallex 2004-07-01 13:44:40 UTC
Alright... Gtk+ 2.4.3 fixes the issue. Looks like they knew the bug already and fixed it for that release ^^
I still have the unreferenced scalar bug, but that thing is minor and I can live with it. 
So that's the end of this bug, someone just mark it as fixed ^^
(altough it's a shame that I can't place shortcuts to set myself away...)
Comment 24 Don Seiler (RETIRED) gentoo-dev 2004-07-01 13:47:25 UTC
Good to hear.

Marking this as UPSTREAM since it was upstream before they fixed it.