Re: [PATCH] Don't setup clipboard handling twice for the same widget



On Wed, 2005-06-01 at 19:56 +0200, Christian Neumair wrote:
> Renaming a file while another rename is in progress causes breakage due
> to twice setting up the same editing widget. The attached patch prevents
> Nautilus from setting up clipboard handling for the same editing widget
> twice.
> We silently assume that the widget always stays in the same window. The
> UI manager is not changed on reparenting.

Is this a fix for this crash i just got:

#0  0x0025f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x004c631b in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#2  0xb7d9488a in libgnomeui_segv_handle (signum=11) at gnome-ui-init.c:741
#3  <signal handler called>
#4  IA__gtk_ui_manager_remove_action_group (self=0xb790f1e4, action_group=0x0)
    at gtkuimanager.c:667
#5  0xb7f5463e in merge_out_clipboard_menu_items (widget_as_object=0x8a05ff4, 
    target_data=0x8a862c0) at nautilus-clipboard.c:257
#6  0xb7f54819 in focus_changed_callback (widget=0x8a05ff4, event=0x830d1dc, 
    callback_data=0x8a862c0) at nautilus-clipboard.c:290
#7  0xb7abd275 in _gtk_marshal_BOOLEAN__BOXED (closure=0x8a86310, 
    return_value=0xbfffdec0, n_param_values=2, param_values=0xbfffe000, 
    invocation_hint=0xbfffdee8, marshal_data=0x0) at gtkmarshalers.c:83
#8  0xb7688d39 in IA__g_closure_invoke (closure=0x8a86310, 
    return_value=0xbfffdec0, n_param_values=2, param_values=0xbfffe000, 
    invocation_hint=0xbfffdee8) at gclosure.c:437
#9  0xb769b942 in signal_emit_unlocked_R (node=0x8257568, detail=0, 
    instance=0x8a05ff4, emission_return=0xbfffdf90, 
    instance_and_params=0xbfffe000) at gsignal.c:2485
#10 0xb769c605 in IA__g_signal_emit_valist (instance=0x8a05ff4, signal_id=0, 
    detail=0, var_args=0xbfffe190 "¨áÿ¿0Æ%\b¸áÿ¿=À¸· \\¨\bô_ \b")
    at gsignal.c:2254
#11 0xb769cb14 in IA__g_signal_emit (instance=0x8a05ff4, signal_id=98, 
    detail=0) at gsignal.c:2288
#12 0xb7b8c106 in gtk_widget_event_internal (widget=0x8a05ff4, 
    event=0x830d1dc) at gtkwidget.c:3631
#13 0xb7b99600 in do_focus_change (widget=0x8a05ff4, in=0) at gtkwindow.c:4541
#14 0xb7b99975 in gtk_window_real_set_focus (window=0x8a0dcf0, 
    focus=0x8a1fd98) at gtkwindow.c:4727
#15 0xb769d80d in IA__g_cclosure_marshal_VOID__OBJECT (closure=0x82621a8, 
    return_value=0x0, n_param_values=2, param_values=0xbfffe4c0, 
    invocation_hint=0xbfffe3a8, marshal_data=0xb7b997e0) at gmarshal.c:636
#16 0xb7688f9d in g_type_class_meta_marshal (closure=0x82621a8, 
    return_value=0x0, n_param_values=2, param_values=0xbfffe4c0, 
    invocation_hint=0xbfffe3a8, marshal_data=0x826df70) at gclosure.c:514
#17 0xb7688d39 in IA__g_closure_invoke (closure=0x82621a8, return_value=0x0, 
    n_param_values=2, param_values=0xbfffe4c0, invocation_hint=0xbfffe3a8)
    at gclosure.c:437
#18 0xb769b4b2 in signal_emit_unlocked_R (node=0x82621f0, detail=0, 
    instance=0x8a0dcf0, emission_return=0x0, instance_and_params=0xbfffe4c0)
    at gsignal.c:2523
#19 0xb769c8c8 in IA__g_signal_emit_valist (instance=0x8a0dcf0, signal_id=1, 
    detail=0, var_args=0xbfffe650 "\005") at gsignal.c:2244
#20 0xb769cb14 in IA__g_signal_emit (instance=0x8a0dcf0, signal_id=132, 
    detail=0) at gsignal.c:2288
#21 0xb7b95b9f in _gtk_window_internal_set_focus (window=0x8a0dcf0, 
    focus=0x8a1fd98) at gtkwindow.c:1220
#22 0xb7b8ccb7 in gtk_widget_real_grab_focus (focus_widget=0x8a1fd98)
    at gtkwidget.c:4006
#23 0xb769cecf in IA__g_cclosure_marshal_VOID__VOID (closure=0x82561e0, 
    return_value=0x0, n_param_values=1, param_values=0x826df70, 
    invocation_hint=0xbfffe838, marshal_data=0xb7b8cbec) at gmarshal.c:77
#24 0xb7688f9d in g_type_class_meta_marshal (closure=0x82561e0, 
    return_value=0x0, n_param_values=1, param_values=0xbfffe950, 
    invocation_hint=0xbfffe838, marshal_data=0x826df70) at gclosure.c:514
#25 0xb7688d39 in IA__g_closure_invoke (closure=0x82561e0, return_value=0x0, 
    n_param_values=1, param_values=0xbfffe950, invocation_hint=0xbfffe838)
    at gclosure.c:437
#26 0xb769b4b2 in signal_emit_unlocked_R (node=0x8256218, detail=0, 
    instance=0x8a1fd98, emission_return=0x0, instance_and_params=0xbfffe950)
    at gsignal.c:2523
#27 0xb769c8c8 in IA__g_signal_emit_valist (instance=0x8a1fd98, signal_id=1, 
    detail=0, 
    var_args=0xbfffeadc "e¢¸·¼Ïû·\230ý¡\b\030ëÿ¿\004\034ø·\230ý¡\b\001")
    at gsignal.c:2244
#28 0xb769cb14 in IA__g_signal_emit (instance=0x8a1fd98, signal_id=81, 
    detail=0) at gsignal.c:2288
#29 0xb7b8a2ea in IA__gtk_widget_grab_focus (widget=0x8a1fd98)
    at gtkwidget.c:3925
#30 0xb7f81c04 in end_renaming_mode (container=0x8a1fd98, commit=1)
    at nautilus-icon-container.c:6267
#31 0xb7f86663 in key_press_event (widget=0x8a1fd98, event=0x830d190)
    at nautilus-icon-container.c:3801
#32 0xb7abd275 in _gtk_marshal_BOOLEAN__BOXED (closure=0x8256b08, 
    return_value=0xbfffecf0, n_param_values=2, param_values=0xbfffee30, 
    invocation_hint=0xbfffed18, marshal_data=0xb7f865cc) at gtkmarshalers.c:83
#33 0xb7688f9d in g_type_class_meta_marshal (closure=0x8256b08, 
    return_value=0xbfffecf0, n_param_values=2, param_values=0xbfffee30, 
    invocation_hint=0xbfffed18, marshal_data=0x826df70) at gclosure.c:514
#34 0xb7688d39 in IA__g_closure_invoke (closure=0x8256b08, 
    return_value=0xbfffecf0, n_param_values=2, param_values=0xbfffee30, 
    invocation_hint=0xbfffed18) at gclosure.c:437
#35 0xb769b4b2 in signal_emit_unlocked_R (node=0x8256b58, detail=0, 
    instance=0x8a1fd98, emission_return=0xbfffedc0, 
    instance_and_params=0xbfffee30) at gsignal.c:2523
#36 0xb769c605 in IA__g_signal_emit_valist (instance=0x8a1fd98, signal_id=0, 
    detail=0, var_args=0xbfffefc0 "Øïÿ¿0Æ%\bèïÿ¿=À¸·\230ý¡\b\230ý¡\b")
    at gsignal.c:2254
#37 0xb769cb14 in IA__g_signal_emit (instance=0x8a1fd98, signal_id=92, 
    detail=0) at gsignal.c:2288
#38 0xb7b8c106 in gtk_widget_event_internal (widget=0x8a1fd98, 
    event=0x830d190) at gtkwidget.c:3631
#39 0xb7b994c4 in IA__gtk_window_propagate_key_event (window=0x8a0dcf0, 
    event=0x830d190) at gtkwindow.c:4429
#40 0xb7b9d702 in gtk_window_key_press_event (widget=0x8a0dcf0, 
    event=0x830d190) at gtkwindow.c:4459
#41 0xb7abd275 in _gtk_marshal_BOOLEAN__BOXED (closure=0x8256b08, 
    return_value=0xbffff1c0, n_param_values=2, param_values=0xbffff300, 
    invocation_hint=0xbffff1e8, marshal_data=0xb7b9d6c4) at gtkmarshalers.c:83
#42 0xb7688f9d in g_type_class_meta_marshal (closure=0x8256b08, 
    return_value=0xbffff1c0, n_param_values=2, param_values=0xbffff300, 
    invocation_hint=0xbffff1e8, marshal_data=0x826df70) at gclosure.c:514
#43 0xb7688d39 in IA__g_closure_invoke (closure=0x8256b08, 
    return_value=0xbffff1c0, n_param_values=2, param_values=0xbffff300, 
    invocation_hint=0xbffff1e8) at gclosure.c:437
#44 0xb769b4b2 in signal_emit_unlocked_R (node=0x8256b58, detail=0, 
    instance=0x8a0dcf0, emission_return=0xbffff290, 
    instance_and_params=0xbffff300) at gsignal.c:2523
#45 0xb769c605 in IA__g_signal_emit_valist (instance=0x8a0dcf0, signal_id=0, 
    detail=0, var_args=0xbffff490 "¨ôÿ¿0Æ%\b¸ôÿ¿=À¸·\005") at gsignal.c:2254
#46 0xb769cb14 in IA__g_signal_emit (instance=0x8a0dcf0, signal_id=92, 
    detail=0) at gsignal.c:2288
#47 0xb7b8c106 in gtk_widget_event_internal (widget=0x8a0dcf0, 
    event=0x830d190) at gtkwidget.c:3631
#48 0xb7abbc2b in IA__gtk_propagate_event (widget=0x8a0dcf0, event=0x830d190)
    at gtkmain.c:2119
#49 0xb7abbde8 in IA__gtk_main_do_event (event=0x830d190) at gtkmain.c:1383
#50 0xb798846a in gdk_event_dispatch (source=0x826df70, callback=0, 
    user_data=0x0) at gdkevents-x11.c:2220
#51 0xb7620d5d in IA__g_main_context_dispatch (context=0x80f9178)
    at gmain.c:1947
#52 0xb7622609 in g_main_context_iterate (context=0x80f9178, block=1, 
    dispatch=1, self=0x80d1638) at gmain.c:2578
#53 0xb7622860 in IA__g_main_loop_run (loop=0x8253c18) at gmain.c:2782
#54 0xb7abb2cb in IA__gtk_main () at gtkmain.c:963
#55 0x08076303 in main (argc=5, argv=0xbffff974) at nautilus-main.c:434

The patch looks pretty good. What if shares_selection_changes has
different from the first call though?

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a fast talking misogynist stage actor looking for a cure to the poison 
coursing through his veins. She's an enchanted belly-dancing socialite from 
aristocratic European stock. They fight crime! 




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