JP and all, With Alex Jiang's help, I think we found the reason of this bug. If you set a breakpoint at e_timezone_entry_set_entry(), after you click the earth icon, you will find it is breaked 3 times. ( I am attaching the stack at the end of this mail). The first is caused by on_button_clicked(). The next 2 are caused by on_entry_changed() which is by gtk_entry_set_text(), one by gtk_entry_delete_text(), the other by gtk_entry_insert_text(). Since display_name is pointing to priv->zone->location, which might be changed or freed between gtk_entry_delete_text() and gtk_entry_insert_text(), so you will end up with garbage chars. So my patch can resolve this bug by g_str_dup the display_name. I attach it here for your review again. Thanks! Harry The stacks: ======================================================================== #0 e_timezone_entry_set_entry (tentry=0x847f708) at e-timezone-entry.c:274 #1 0x41767518 in on_button_clicked (widget=0x847c7c0, tentry=0x847f708) at e-timezone-entry.c:204 #2 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #3 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #4 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #5 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #6 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #7 0x40cef8ab in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x40cf089b in gtk_real_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #9 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #10 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #11 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #12 0x410fc20f in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #13 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #14 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #15 0x40cef7eb in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x40cf071b in gtk_button_button_release () from /usr/lib/libgtk-x11-2.0.so.0 #17 0x40d7ab8f in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #18 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #19 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #20 0x410fc439 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #21 0x410fb7ad in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #22 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #23 0x40e600db in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x40d7a987 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #25 0x40d79685 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #26 0x40f371e5 in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0 #27 0x4113fc35 in g_main_dispatch () from /usr/lib/libglib-2.0.so.0 #28 0x41140ca8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #29 0x41140fbd in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0 #30 0x411416bf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #31 0x4053e910 in bonobo_main () from /usr/lib/libbonobo-2.so.0 #32 0x0809ba60 in main (argc=1, argv=0xbffff794) at main.c:637 #33 0x4119f4c2 in __libc_start_main () from /lib/i686/libc.so.6 ================================================================ #0 e_timezone_entry_set_entry (tentry=0x847e420) at e-timezone-entry.c:274 #1 0x417676e0 in e_timezone_entry_set_timezone (tentry=0x847e420, zone=0x83599c8) at e-timezone-entry.c:244 #2 0x4178c540 in start_timezone_changed_cb (widget=0x847f708, data="" at event-page.c:1011 #3 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #4 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #5 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #6 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #7 0x40dbe3af in gtk_signal_emit () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x4176756c in on_entry_changed (entry=0x847f778, tentry=0x847f708) at e-timezone-entry.c:215 #9 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #10 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #11 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #12 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #13 0x410fbcc3 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #14 0x40d39add in gtk_entry_real_delete_text () from /usr/lib/libgtk-x11-2.0.so.0 #15 0x40d7ba9b in _gtk_marshal_VOID__INT_INT () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x410ea2d9 in g_type_iface_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #17 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #18 0x410fc439 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #19 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #20 0x410fbcc3 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #21 0x40d3938b in gtk_entry_delete_text () from /usr/lib/libgtk-x11-2.0.so.0 #22 0x40d35d58 in gtk_editable_delete_text () from /usr/lib/libgtk-x11-2.0.so.0 #23 0x40d3be48 in gtk_entry_set_text () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x41767844 in e_timezone_entry_set_entry (tentry=0x847f708) at e-timezone-entry.c:293 #25 0x41767518 in on_button_clicked (widget=0x847c7c0, tentry=0x847f708) at e-timezone-entry.c:204 #26 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #27 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #28 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #29 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #30 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #31 0x40cef8ab in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0 #32 0x40cf089b in gtk_real_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #33 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #34 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #35 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #36 0x410fc20f in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #37 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #38 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #39 0x40cef7eb in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #40 0x40cf071b in gtk_button_button_release () from /usr/lib/libgtk-x11-2.0.so.0 #41 0x40d7ab8f in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #42 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #43 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #44 0x410fc439 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #45 0x410fb7ad in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #46 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #47 0x40e600db in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0 #48 0x40d7a987 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #49 0x40d79685 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #50 0x40f371e5 in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0 #51 0x4113fc35 in g_main_dispatch () from /usr/lib/libglib-2.0.so.0 #52 0x41140ca8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #53 0x41140fbd in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0 #54 0x411416bf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #55 0x4053e910 in bonobo_main () from /usr/lib/libbonobo-2.so.0 #56 0x0809ba60 in main (argc=1, argv=0xbffff794) at main.c:637 #57 0x4119f4c2 in __libc_start_main () from /lib/i686/libc.so.6 ========================================================================== #0 e_timezone_entry_set_entry (tentry=0x847e420) at e-timezone-entry.c:274 #1 0x417676e0 in e_timezone_entry_set_timezone (tentry=0x847e420, zone=0x83599c8) at e-timezone-entry.c:244 #2 0x4178c540 in start_timezone_changed_cb (widget=0x847f708, data="" at event-page.c:1011 #3 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #4 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #5 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #6 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #7 0x40dbe3af in gtk_signal_emit () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x4176756c in on_entry_changed (entry=0x847f778, tentry=0x847f708) at e-timezone-entry.c:215 #9 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #10 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #11 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #12 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #13 0x410fbcc3 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #14 0x40d398d6 in gtk_entry_real_insert_text () from /usr/lib/libgtk-x11-2.0.so.0 #15 0x40d7bb72 in _gtk_marshal_VOID__STRING_INT_POINTER () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x410ea2d9 in g_type_iface_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #17 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #18 0x410fc439 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #19 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #20 0x410fbcc3 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #21 0x40d392d8 in gtk_entry_insert_text () from /usr/lib/libgtk-x11-2.0.so.0 #22 0x40d35c61 in gtk_editable_insert_text () from /usr/lib/libgtk-x11-2.0.so.0 #23 0x40d3be6e in gtk_entry_set_text () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x41767844 in e_timezone_entry_set_entry (tentry=0x847f708) at e-timezone-entry.c:293 #25 0x41767518 in on_button_clicked (widget=0x847c7c0, tentry=0x847f708) at e-timezone-entry.c:204 #26 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #27 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #28 0x410fc983 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #29 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #30 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #31 0x40cef8ab in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0 #32 0x40cf089b in gtk_real_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #33 0x410fcd77 in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #34 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #35 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #36 0x410fc20f in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #37 0x410fb9a8 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #38 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #39 0x40cef7eb in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0 #40 0x40cf071b in gtk_button_button_release () from /usr/lib/libgtk-x11-2.0.so.0 #41 0x40d7ab8f in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #42 0x410ea257 in g_type_class_meta_marshal () from /usr/lib/libgobject-2.0.so.0 #43 0x410e9ee7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #44 0x410fc439 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #45 0x410fb7ad in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #46 0x410fbbe4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #47 0x40e600db in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0 #48 0x40d7a987 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #49 0x40d79685 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #50 0x40f371e5 in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0 #51 0x4113fc35 in g_main_dispatch () from /usr/lib/libglib-2.0.so.0 #52 0x41140ca8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #53 0x41140fbd in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0 #54 0x411416bf in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #55 0x4053e910 in bonobo_main () from /usr/lib/libbonobo-2.so.0 #56 0x0809ba60 in main (argc=1, argv=0xbffff794) at main.c:637 #57 0x4119f4c2 in __libc_start_main () from /lib/i686/libc.so.6 Harry Lu wrote:
|
Index: evolution/calendar/ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v retrieving revision 1.1789 diff -u -r1.1789 ChangeLog --- evolution/calendar/ChangeLog 4 Jun 2003 15:07:13 -0000 1.1789 +++ evolution/calendar/ChangeLog 11 Jun 2003 08:47:34 -0000 @@ -1,3 +1,12 @@ +2003-06-11 Harry Lu <harry lu sun com> + + Fixes #44485 + + * gui/e-timezone-entry.c (e_timezone_entry_set_entry): pass a + new allocated string to gtk_entry_set_text instead of the one + that might come from gettext. + + 2003-06-04 Rodrigo Moya <rodrigo ximian com> * pcs/query.c (start_cached_query_cb): adapted to changes in Index: evolution/calendar/gui/e-timezone-entry.c =================================================================== RCS file: /cvs/gnome/evolution/calendar/gui/e-timezone-entry.c,v retrieving revision 1.19 diff -u -r1.19 e-timezone-entry.c --- evolution/calendar/gui/e-timezone-entry.c 22 Apr 2003 21:15:40 -0000 1.19 +++ evolution/calendar/gui/e-timezone-entry.c 11 Jun 2003 08:47:36 -0000 @@ -269,6 +269,7 @@ { ETimezoneEntryPrivate *priv; const char *display_name; + char *name_buffer; priv = tentry->priv; @@ -284,11 +285,15 @@ } else display_name = ""; - gtk_entry_set_text (GTK_ENTRY (priv->entry), display_name); + name_buffer = g_strdup (display_name); + + gtk_entry_set_text (GTK_ENTRY (priv->entry), name_buffer); if (!priv->default_zone || (priv->zone != priv->default_zone)) gtk_widget_show (priv->entry); else gtk_widget_hide (priv->entry); + + g_free (name_buffer); }