GNOME Bugzilla – Bug 136721
Crash trying to open preferences for the clock-applet
Last modified: 2004-12-22 21:47:04 UTC
Distribution: Fedora Core release 1 (Yarrow) Package: gnome-panel Severity: normal Version: GNOME2.5.91 2.5.x Gnome-Distributor: GARNOME Synopsis: Crash trying to open preferences for the clock-applet Bugzilla-Product: gnome-panel Bugzilla-Component: clock applet Bugzilla-Version: 2.5.x BugBuddy-GnomeVersion: 2.0 (2.5.91) Description: Steps to reproduce the crash: 1. Right click the clock applet. 2. Select "preferences" ------- Bug moved to this database by unknown@bugzilla.gnome.org 2004-03-10 01:35 ------- Reassigning to the default owner of the component, gnome-panel-maint@bugzilla.gnome.org.
Thanks for the bug report. Without a stack trace from the crash it's very hard to determine what caused the crash. Please see http://bugzilla.gnome.org/getting-traces.cgi for more information about getting a useful stack trace.
Sheesh, I thought bug-buddy would have grabbed the stack trace for this. I'll see if I can rustle up a stack trace some other way.
Backtrace was generated from '/mnt/work/gnome25/libexec/clock-applet' Using host libthread_db library "/lib/tls/libthread_db.so.1". [Thread debugging using libthread_db enabled] [New Thread -1207345024 (LWP 24028)] 0x00971c32 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
+ Trace 45002
Thread 1 (Thread -1207345024 (LWP 24028))
I can't test right now, but I suppose you're using a custom format for the clock, aren't you?
Just debugging this now. Seems this happens when the format key contains rubbish. Guys, could either of you let us know what the output of gconftool-2 -g /apps/panel/profiles/default/applets/$(applet-id)/prefs/format is ? Note, you'll need to find out the $applet-id for your clock applet. It'll be one of the ids on /apps/panel/profiles/default/general/applet_id_list. What will give it away is that /apps/panel/profiles/default/applets/$(applet-id)/bonobo_iid will be OAFIID:GNOME_ClockApplet
Mark: I'm just reading the code, but it seems that if the format is "custom", we select the "custom format" item in the combo box. But this item is added later. So when update_properties_for_format() is called for the first time, we have format == -1 because there's no selected item in the combo box. Again, I'm just reading the code, so I may be totally wrong :-)
Vincent: try this: #include <stdio.h> #include <assert.h> int main (int argc, char **argv) { enum { A, B } test_enum = A; int test_int = -1; test_enum = test_int; assert (test_enum < 0); return 0; } and now find the bug :-) I'll have a patch in a second, just trying to nail down exactly why this happens out of curiousity.
Here's the patch, its awaiting releas-team approval
Created attachment 25513 [details] [review] patch
Thanks dudes!
2004-03-11 Mark McLoughlin <mark@skynet.ie> * clock.c: (fill_clock_applet): don't assume enums use a signed representation. Fixes crasher bug #136721.
Wrong fix. Because it was assumed than the value in the format combo was in relation with the ClockFormat enum. So with previous patch the format was set with a -1 offset and crashing when selecting the fist option. Fix for this attached.
Created attachment 25517 [details] [review] Patch fixing the problem
Created attachment 25520 [details] [review] Updated patch setting correctly the combo
2004-03-11 Fernando Herrera <fherrera@onirica.com> * clock.c: (set_format_cb), (display_properties_dialog): Fix bug introduced by the last comit. Now valid values for ClockFormat begin from 1.
*** Bug 137741 has been marked as a duplicate of this bug. ***
*** Bug 138467 has been marked as a duplicate of this bug. ***
*** Bug 138468 has been marked as a duplicate of this bug. ***
*** Bug 138516 has been marked as a duplicate of this bug. ***
*** Bug 138522 has been marked as a duplicate of this bug. ***
*** Bug 138569 has been marked as a duplicate of this bug. ***
*** Bug 138589 has been marked as a duplicate of this bug. ***
*** Bug 138578 has been marked as a duplicate of this bug. ***
*** Bug 138581 has been marked as a duplicate of this bug. ***
*** Bug 137984 has been marked as a duplicate of this bug. ***
*** Bug 137990 has been marked as a duplicate of this bug. ***
*** Bug 138670 has been marked as a duplicate of this bug. ***
*** Bug 138708 has been marked as a duplicate of this bug. ***
*** Bug 138771 has been marked as a duplicate of this bug. ***
*** Bug 138781 has been marked as a duplicate of this bug. ***
*** Bug 138809 has been marked as a duplicate of this bug. ***
*** Bug 138822 has been marked as a duplicate of this bug. ***
*** Bug 139003 has been marked as a duplicate of this bug. ***
*** Bug 139104 has been marked as a duplicate of this bug. ***
*** Bug 139143 has been marked as a duplicate of this bug. ***
*** Bug 139148 has been marked as a duplicate of this bug. ***
*** Bug 139156 has been marked as a duplicate of this bug. ***
*** Bug 139214 has been marked as a duplicate of this bug. ***
*** Bug 139433 has been marked as a duplicate of this bug. ***
*** Bug 139510 has been marked as a duplicate of this bug. ***
*** Bug 139727 has been marked as a duplicate of this bug. ***
*** Bug 139790 has been marked as a duplicate of this bug. ***
*** Bug 139736 has been marked as a duplicate of this bug. ***
*** Bug 139775 has been marked as a duplicate of this bug. ***
*** Bug 139207 has been marked as a duplicate of this bug. ***
*** Bug 140111 has been marked as a duplicate of this bug. ***
*** Bug 140696 has been marked as a duplicate of this bug. ***
*** Bug 140732 has been marked as a duplicate of this bug. ***
*** Bug 140818 has been marked as a duplicate of this bug. ***
*** Bug 141028 has been marked as a duplicate of this bug. ***