Red Hat Bugzilla – Bug 120116
Rhythmbox crashes on startup itself after upgrading from RedHat 9 to Fedora Core 2 test 2
Last modified: 2007-11-30 17:10:39 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Description of problem:
I've upgraded my desktop recently using the redhat up2date tool. So
the results may be different in a clean install of FC2t2. I'm raising
this bug in case others have faced a similar problem (appears to be
the case). I could not find this bug already in bugzilla, so pardon me
just in case this is a duplicate.
After I installed rhythmbox from RPM available on the fedora us
mirror, on startup the following trace was shown.
(rhythmbox:27557): Rhythmbox-CRITICAL **:
/apps/rhythmbox/state/play_order gconf key not found!
(rhythmbox:27557): Rhythmbox-WARNING **: Unknown value "" in GConf key
"/apps/rhythmbox/state/play_order". Using linear play order.
On gdb, the backtrace shown was:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 27564)]
0x00c8a468 in strcmp () from /lib/i686/libc.so.6
#0 0x00c8a468 in strcmp () from /lib/i686/libc.so.6
#1 0x080669be in rb_shell_player_get_playback_state ()
#2 0x0806b89f in rb_statusbar_sync_state ()
#3 0x00d6fdf1 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#4 0x0806a978 in rb_statusbar_get_type ()
#5 0x00d6f40e in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#6 0x00d6fac0 in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#7 0x00d6f0d6 in g_object_new () from /usr/lib/libgobject-2.0.so.0
#8 0x0806b7a9 in rb_statusbar_new ()
#9 0x08061daf in rb_shell_construct ()
#10 0x0805f171 in main ()
#11 0x00aba1f3 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#12 0x00ab6e4a in g_main_depth () from /usr/lib/libglib-2.0.so.0
#13 0x00ab7f28 in g_main_context_dispatch () from
#14 0x00ab8260 in g_main_context_dispatch () from
#15 0x00ab88a3 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#16 0x0080c0a8 in bonobo_main () from /usr/lib/libbonobo-2.so.0
#17 0x0805efd8 in main ()
#18 0x00c39322 in __libc_start_main () from /lib/i686/libc.so.6
Adding a specific key ('play_order') from the configuration editor
solved the problem. But probably, we want to fix this since things
don't work 'out-of-the-box'.
URL for details on the workaround that I applied (look towards the end
of the mail):
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. just start rhythmbox after an upgrade to fedora core2 test2
Actual Results: segmentation fault is seen on startup and rhythmbox
does not come up.
Expected Results: rythmbox gui should have been shown and normal
startup should have happened.
(have attached the gdb trace with the description)
Which RPM? Can you give me the exact URL?
rpm was: rhythmbox-0.7.2-1
This is one of the mirrors picked up by up2date on its own. I noticed
that the fedora site:
has a different (older) version of rhythmbox today. Dunno if it was
rolled back or that's the version its supposed to be....
I can't reproduce this. I purged all my GConf configuration related
to Rhythmbox, reinstalled the rhythmbox-0.5.4 rpm with --nodeps,
gconftool-2 -g /apps/rhythmbox/state/play_order
"No value set for `/apps/rhythmbox/state/play_order'"
Then I installed rhythmbox-0.7.2-1.i386.rpm, launched Rhythmbox, and
it worked fine.
I suspect something else other than Rhythmbox went wrong on your
system. If you can come up with a verifiable way to reproduce this
problem, please feel free to reopen this bug.
Took a look at the code using the sources released with gnome 2.6
From the gdb backtrace that I've sent across earlier in this report
and with reference to the file: rhythmbox-0.7.2/shell/rb-shell-player.c
On line: 964, we invoke eel_gconf_get_string() which may be returning
NULL.... only in case there is something wrong with the gconf settings
or so. I noticed this function returns an empty string most usually if
the key is not found, but sometimes in error scenarios it _may_ return
NULL. Hence we may add a guard against that possibility as is done on
line 1003 of that same file (rb-shell-player.c). This should fix the
issue as the backtrace suggests it is a NPR.
You may please take it as an enhancement to the existing code.... I'm
still not able to figure out exactly what is wrong with my Gconf2/eel2
installation. In case I can do that, I'll give further steps to
reproduce it at your end. Meanwhile you can change the code for this
defensive check.... please revert if this is okay.
PS: My Gconf2 version is: GConf2-2.6.0-3 and eel version is:
eel2-2.6.0-1. Anything wrong with these?
Created attachment 99227 [details]
suggested fix for null-pointer-read
The suggested fix is enclosed within the comments:
/* ---- Siddharth: Change for seg-fault fix begins ---- */ and
/* ---- Siddharth: Change for seg-fault fix ends ---- */
It's true that eel_gconf_get_string can return NULL in some error
conditions, and we should probably handle it. Still though, the fact
that it is returning NULL means your system is messed up somehow
elsewhere. It shold never return NULL in any kind of normal conditions.
I will apply a change similar to your suggested fix. By the way, you
should investigate the "diff" program :)