gtk_entry_set_text() bug - appends, not overrides



Hi,

just found a strange bug in gtk_entry_set_text() which makes it
append stuff instead of overriding.

Look at this backtrace:

===
#0  gtk_entry_set_text (entry=0x83d6f00, text=0x83de080 "ftp://localhost/pub/martin/screenshots/";) at gtkentry.c:2309
#1  0x40323444 in gtk_combo_update_entry (list=0x83d7aa8, combo=0x83d6e80) at gtkcombo.c:465
#2  0x403d7d36 in gtk_marshal_VOID__VOID (closure=0x83d80a0, return_value=0x0, n_param_values=1, param_values=0xbfffc83c, 
    invocation_hint=0xbfffc778, marshal_data=0x0) at gtkmarshal.c:2076
#3  0x4065e5a7 in g_closure_invoke (closure=0x83d80a0, return_value=0x0, n_param_values=1, param_values=0xbfffc83c, 
    invocation_hint=0xbfffc778) at gclosure.c:419
#4  0x4066baaf in signal_emit_R (node=0x81ec660, detail=0, instance=0x83d7aa8, return_value=0x0, 
    instance_and_params=0xbfffc83c) at gsignal.c:1542
#5  0x4066b443 in g_signal_emitv (instance_and_params=0xbfffc83c, signal_id=154, detail=0, return_value=0x0)
    at gsignal.c:1407
#6  0x403d8715 in gtk_signal_emitv (object=0x83d7aa8, signal_id=154, args=0xbfffca7c) at gtksignal.c:335
#7  0x403d8e0f in gtk_signal_emit (object=0x83d7aa8, signal_id=154) at gtksignal.c:429
#8  0x403841d6 in gtk_list_signal_item_select (list_item=0x83de028, list=0x83d7aa8) at gtklist.c:2654
#9  0x403d7d36 in gtk_marshal_VOID__VOID (closure=0x83de600, return_value=0x0, n_param_values=1, param_values=0xbfffcd4c, 
    invocation_hint=0xbfffcc88, marshal_data=0x0) at gtkmarshal.c:2076
#10 0x4065e5a7 in g_closure_invoke (closure=0x83de600, return_value=0x0, n_param_values=1, param_values=0xbfffcd4c, 
    invocation_hint=0xbfffcc88) at gclosure.c:419
#11 0x4066baaf in signal_emit_R (node=0x809f908, detail=0, instance=0x83de028, return_value=0x0, 
    instance_and_params=0xbfffcd4c) at gsignal.c:1542
#12 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffcd4c, signal_id=82, detail=0, return_value=0x0)
    at gsignal.c:1407
#13 0x403d8715 in gtk_signal_emitv (object=0x83de028, signal_id=82, args=0xbfffcf8c) at gtksignal.c:335
#14 0x403d8e0f in gtk_signal_emit (object=0x83de028, signal_id=82) at gtksignal.c:429
#15 0x40372e4a in gtk_item_select (item=0x83de028) at gtkitem.c:132
#16 0x4038536f in gtk_list_item_select (list_item=0x83de028) at gtklistitem.c:339
#17 0x403816f9 in gtk_real_list_select_child (list=0x83d7aa8, child=0x83de028) at gtklist.c:1991
#18 0x403d5acb in gtk_marshal_VOID__POINTER (closure=0x810b848, return_value=0x0, n_param_values=2, 
    param_values=0xbfffd30c, invocation_hint=0xbfffd248, marshal_data=0x40381550) at gtkmarshal.c:809
#19 0x4065e89e in g_type_class_meta_marshal (closure=0x810b848, return_value=0x0, n_param_values=2, 
    param_values=0xbfffd30c, invocation_hint=0xbfffd248, marshal_data=0x174) at gclosure.c:496
#20 0x4065e5a7 in g_closure_invoke (closure=0x810b848, return_value=0x0, n_param_values=2, param_values=0xbfffd30c, 
    invocation_hint=0xbfffd248) at gclosure.c:419
#21 0x4066b7dc in signal_emit_R (node=0x810b8a0, detail=0, instance=0x83d7aa8, return_value=0x0, 
    instance_and_params=0xbfffd30c) at gsignal.c:1483
#22 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffd30c, signal_id=155, detail=0, return_value=0x0)
    at gsignal.c:1407
#23 0x403d8715 in gtk_signal_emitv (object=0x83d7aa8, signal_id=155, args=0xbfffd54c) at gtksignal.c:335
#24 0x403d8e0f in gtk_signal_emit (object=0x83d7aa8, signal_id=155) at gtksignal.c:429
#25 0x4037fe0a in gtk_list_select_child (list=0x83d7aa8, child=0x83de028) at gtklist.c:1530
#26 0x40323589 in gtk_combo_update_list (entry=0x83d6f00, combo=0x83d6e80) at gtkcombo.c:484
#27 0x403d7d36 in gtk_marshal_VOID__VOID (closure=0x83d7110, return_value=0x0, n_param_values=1, param_values=0xbfffd84c, 
    invocation_hint=0xbfffd788, marshal_data=0x0) at gtkmarshal.c:2076
#28 0x4065e5a7 in g_closure_invoke (closure=0x83d7110, return_value=0x0, n_param_values=1, param_values=0xbfffd84c, 
    invocation_hint=0xbfffd788) at gclosure.c:419
#29 0x4066baaf in signal_emit_R (node=0x8101da8, detail=0, instance=0x83d6f00, return_value=0x0, 
    instance_and_params=0xbfffd84c) at gsignal.c:1542
#30 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffd84c, signal_id=141, detail=0, return_value=0x0)
    at gsignal.c:1407
#31 0x403d8715 in gtk_signal_emitv (object=0x83d6f00, signal_id=141, args=0xbfffda8c) at gtksignal.c:335
#32 0x403d8e0f in gtk_signal_emit (object=0x83d6f00, signal_id=141) at gtksignal.c:429
#33 0x40349892 in gtk_entry_delete_text (editable=0x83d6f00, start_pos=0, end_pos=39) at gtkentry.c:1144
#34 0x40346681 in gtk_editable_delete_text (editable=0x83d6f00, start_pos=0, end_pos=-1) at gtkeditable.c:74
#35 0x4034c6f4 in gtk_entry_set_text (entry=0x83d6f00, text=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/")
    at gtkentry.c:2315
#36 0x4009495f in set_entry_text_handler (selector=0x82ef6d0, 
    text=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/") at gnome-entry.c:334
#37 0x403d5acb in gtk_marshal_VOID__POINTER (closure=0x80a7ce8, return_value=0x0, n_param_values=2, 
    param_values=0xbfffde3c, invocation_hint=0xbfffdd78, marshal_data=0x40094820) at gtkmarshal.c:809
#38 0x4065e89e in g_type_class_meta_marshal (closure=0x80a7ce8, return_value=0x0, n_param_values=2, 
    param_values=0xbfffde3c, invocation_hint=0xbfffdd78, marshal_data=0x198) at gclosure.c:496
#39 0x4065e5a7 in g_closure_invoke (closure=0x80a7ce8, return_value=0x0, n_param_values=2, param_values=0xbfffde3c, 
    invocation_hint=0xbfffdd78) at gclosure.c:419
#40 0x4066bcac in signal_emit_R (node=0x80a7d40, detail=0, instance=0x82ef6d0, return_value=0x0, 
    instance_and_params=0xbfffde3c) at gsignal.c:1590
#41 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffde3c, signal_id=107, detail=0, return_value=0x0)
    at gsignal.c:1407
#42 0x403d8715 in gtk_signal_emitv (object=0x82ef6d0, signal_id=107, args=0xbfffe07c) at gtksignal.c:335
#43 0x403d8e0f in gtk_signal_emit (object=0x82ef6d0, signal_id=107) at gtksignal.c:429
#44 0x40098d94 in gnome_selector_set_entry_text (selector=0x82ef6d0, 
    text=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/") at gnome-selector.c:1234
#45 0x40096895 in set_filename_handler (selector=0x82ef6d0, 
    filename=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/") at gnome-selector.c:563
#46 0x403d4119 in gtk_marshal_BOOLEAN__POINTER (closure=0x80a2180, return_value=0xbfffe3a8, n_param_values=2, 
    param_values=0xbfffe3cc, invocation_hint=0xbfffe308, marshal_data=0x4009676c) at gtkmarshal.c:34
#47 0x4065e89e in g_type_class_meta_marshal (closure=0x80a2180, return_value=0xbfffe3a8, n_param_values=2, 
    param_values=0xbfffe3cc, invocation_hint=0xbfffe308, marshal_data=0x190) at gclosure.c:496
#48 0x4065e5a7 in g_closure_invoke (closure=0x80a2180, return_value=0xbfffe3a8, n_param_values=2, param_values=0xbfffe3cc, 
    invocation_hint=0xbfffe308) at gclosure.c:419
#49 0x4066bcac in signal_emit_R (node=0x80a21d8, detail=0, instance=0x82ef6d0, return_value=0xbfffe3a8, 
    instance_and_params=0xbfffe3cc) at gsignal.c:1590
#50 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffe3cc, signal_id=97, detail=0, return_value=0xbfffe3a8)
    at gsignal.c:1407
#51 0x403d8715 in gtk_signal_emitv (object=0x82ef6d0, signal_id=97, args=0xbfffe60c) at gtksignal.c:335
#52 0x403d8e0f in gtk_signal_emit (object=0x82ef6d0, signal_id=97) at gtksignal.c:429
#53 0x4009870f in gnome_selector_set_filename (selector=0x82ef6d0, 
    filename=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/") at gnome-selector.c:1096
#54 0x4009e7cd in browse_dialog_ok (widget=0x82ff0b8, data=0x82ef6d0) at gnome-file-selector.c:610
#55 0x403d7d36 in gtk_marshal_VOID__VOID (closure=0x83d6e60, return_value=0x0, n_param_values=1, param_values=0xbfffe90c, 
    invocation_hint=0xbfffe848, marshal_data=0x0) at gtkmarshal.c:2076
#56 0x4065e5a7 in g_closure_invoke (closure=0x83d6e60, return_value=0x0, n_param_values=1, param_values=0xbfffe90c, 
    invocation_hint=0xbfffe848) at gclosure.c:419
#57 0x4066baaf in signal_emit_R (node=0x80a89b0, detail=0, instance=0x82ff0b8, return_value=0x0, 
    instance_and_params=0xbfffe90c) at gsignal.c:1542
#58 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffe90c, signal_id=116, detail=0, return_value=0x0)
    at gsignal.c:1407
#59 0x403d8715 in gtk_signal_emitv (object=0x82ff0b8, signal_id=116, args=0xbfffeb4c) at gtksignal.c:335
#60 0x403d8e0f in gtk_signal_emit (object=0x82ff0b8, signal_id=116) at gtksignal.c:429
#61 0x402f29f0 in gtk_button_clicked (button=0x82ff0b8) at gtkbutton.c:426
#62 0x402f4c1f in gtk_real_button_released (button=0x82ff0b8) at gtkbutton.c:913
#63 0x403d7d36 in gtk_marshal_VOID__VOID (closure=0x80e8c98, return_value=0x0, n_param_values=1, param_values=0xbfffee9c, 
    invocation_hint=0xbfffedd8, marshal_data=0x402f4b1c) at gtkmarshal.c:2076
#64 0x4065e89e in g_type_class_meta_marshal (closure=0x80e8c98, return_value=0x0, n_param_values=1, 
    param_values=0xbfffee9c, invocation_hint=0xbfffedd8, marshal_data=0x174) at gclosure.c:496
#65 0x4065e5a7 in g_closure_invoke (closure=0x80e8c98, return_value=0x0, n_param_values=1, param_values=0xbfffee9c, 
    invocation_hint=0xbfffedd8) at gclosure.c:419
#66 0x4066b7dc in signal_emit_R (node=0x80e8ce8, detail=0, instance=0x82ff0b8, return_value=0x0, 
    instance_and_params=0xbfffee9c) at gsignal.c:1483
#67 0x4066b443 in g_signal_emitv (instance_and_params=0xbfffee9c, signal_id=115, detail=0, return_value=0x0)
    at gsignal.c:1407
#68 0x403d8715 in gtk_signal_emitv (object=0x82ff0b8, signal_id=115, args=0xbffff0dc) at gtksignal.c:335
#69 0x403d8e0f in gtk_signal_emit (object=0x82ff0b8, signal_id=115) at gtksignal.c:429
#70 0x402f2900 in gtk_button_released (button=0x82ff0b8) at gtkbutton.c:417
#71 0x402f4158 in gtk_button_button_release (widget=0x82ff0b8, event=0x83ee518) at gtkbutton.c:773
#72 0x403d4119 in gtk_marshal_BOOLEAN__POINTER (closure=0x808bb78, return_value=0xbffff408, n_param_values=2, 
    param_values=0xbffff42c, invocation_hint=0xbffff368, marshal_data=0x402f3fec) at gtkmarshal.c:34
#73 0x4065e89e in g_type_class_meta_marshal (closure=0x808bb78, return_value=0xbffff408, n_param_values=2, 
    param_values=0xbffff42c, invocation_hint=0xbffff368, marshal_data=0xa0) at gclosure.c:496
#74 0x4065e5a7 in g_closure_invoke (closure=0x808bb78, return_value=0xbffff408, n_param_values=2, param_values=0xbffff42c, 
    invocation_hint=0xbffff368) at gclosure.c:419
#75 0x4066bcac in signal_emit_R (node=0x808bbd8, detail=0, instance=0x82ff0b8, return_value=0xbffff408, 
    instance_and_params=0xbffff42c) at gsignal.c:1590
#76 0x4066b443 in g_signal_emitv (instance_and_params=0xbffff42c, signal_id=30, detail=0, return_value=0xbffff408)
    at gsignal.c:1407
#77 0x403d8715 in gtk_signal_emitv (object=0x82ff0b8, signal_id=30, args=0xbffff66c) at gtksignal.c:335
#78 0x403d8e0f in gtk_signal_emit (object=0x82ff0b8, signal_id=30) at gtksignal.c:429
#79 0x4046e509 in gtk_widget_event (widget=0x82ff0b8, event=0x83ee518) at gtkwidget.c:2532
#80 0x4038ae46 in gtk_propagate_event (widget=0x82ff0b8, event=0x83ee518) at gtkmain.c:1413
#81 0x40389b50 in gtk_main_do_event (event=0x83ee518) at gtkmain.c:854
#82 0x40502a10 in gdk_event_dispatch (source_data=0x0, current_time=0xbffff8a0, user_data=0x0) at gdkevents-x11.c:1368
#83 0x4020cd24 in g_main_dispatch (dispatch_time=0xbffff8a0) at gmain.c:677
#84 0x4020d563 in g_main_iterate (block=1, dispatch=1) at gmain.c:898
#85 0x4020d75c in g_main_run (loop=0x83eccd0) at gmain.c:956
#86 0x403892bc in gtk_main () at gtkmain.c:586
#87 0x8049687 in main (argc=1, argv=0xbffff9d4) at selector_demo.c:245
===

In frame #35, I'm calling gtk_entry_set_text() from my application:

---
#35 0x4034c6f4 in gtk_entry_set_text (entry=0x83d6f00, text=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/")
    at gtkentry.c:2315
#36 0x4009495f in set_entry_text_handler (selector=0x82ef6d0, 
    text=0x404c74c0 "/gnome/head/cvs/gnome-libs/libgnomeui/pixmaps/") at gnome-entry.c:334
---

In frame #33, it successfully deleted all the text in the entry and then
emits the CHANGED signal on the editable:

--- 
#32 0x403d8e0f in gtk_signal_emit (object=0x83d6f00, signal_id=141) at gtksignal.c:429
#33 0x40349892 in gtk_entry_delete_text (editable=0x83d6f00, start_pos=0, end_pos=39) at gtkentry.c:1144
---

So far so good. Walking through all the signal emission stuff, we end up
in gtk_combo_update_list() in frame #26:

---
#26 0x40323589 in gtk_combo_update_list (entry=0x83d6f00, combo=0x83d6e80) at gtkcombo.c:484
---

Finally, some signal emissions later, we're in gtk_combo_update_entry() in
frame #1 which happily calls gtk_entry_set_text() to set back the text which
we just deleted in frame #35:

---
#0  gtk_entry_set_text (entry=0x83d6f00, text=0x83de080 "ftp://localhost/pub/martin/screenshots/";) at gtkentry.c:2309
#1  0x40323444 in gtk_combo_update_entry (list=0x83d7aa8, combo=0x83d6e80) at gtkcombo.c:465
---

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]