phase1geo / Minder

Mind-mapping application for Elementary OS
GNU General Public License v3.0
977 stars 70 forks source link

Crash when deleting nodes #592

Closed prokoudine closed 5 months ago

prokoudine commented 5 months ago
  1. Select multiple child nodes with the Shift key
  2. Press Del key
  3. BOOM
Thread 1 "com.github.phas" received signal SIGSEGV, Segmentation fault.
0x000055555562e86b in layout_real_handle_update_by_insert (self=0x5555574d89c0 [LayoutHorizontal], parent=0x5555571c7800 [Node], 
    child=0x55555773e710 [Node], pos=0) at ../src/Layout.vala:425
425       var sb = bbox( parent.children().index( pos - 1 ), child.side, "insert a" );
(gdb) bt 
#0  0x000055555562e86b in layout_real_handle_update_by_insert
    (self=0x5555574d89c0 [LayoutHorizontal], parent=0x5555571c7800 [Node], child=0x55555773e710 [Node], pos=0) at ../src/Layout.vala:425
#1  0x000055555562eed0 in layout_handle_update_by_insert
    (self=0x5555574d89c0 [LayoutHorizontal], parent=0x5555571c7800 [Node], child=0x55555773e710 [Node], pos=0) at ../src/Layout.vala:384
#2  0x0000555555664605 in node_real_attach_common (self=0x55555773e710 [Node], index=0, theme=0x0) at ../src/Node.vala:2163
#3  0x00005555556647e4 in node_attach_common (self=0x55555773e710 [Node], index=0, theme=0x0) at ../src/Node.vala:2146
#4  0x0000555555663fe6 in node_real_attach (self=0x55555773e710 [Node], parent=0x5555571c7800 [Node], index=0, theme=0x0, set_side=1)
    at ../src/Node.vala:2136
#5  0x000055555566406f in node_attach (self=0x55555773e710 [Node], parent=0x5555571c7800 [Node], index=0, theme=0x0, set_side=1)
    at ../src/Node.vala:2117
#6  0x0000555555663648 in node_real_delete_only (self=0x55555760a8b0 [Node]) at ../src/Node.vala:2088
#7  0x00005555556636ca in node_delete_only (self=0x55555760a8b0 [Node]) at ../src/Node.vala:2067
#8  0x00005555555cc4c5 in draw_area_delete_nodes (self=0x5555574d8830 [DrawArea]) at ../src/DrawArea.vala:3402
#9  0x00005555555cd087 in draw_area_handle_delete (self=0x5555574d8830 [DrawArea]) at ../src/DrawArea.vala:3480
#10 0x00005555555dc722 in draw_area_on_keypress (self=0x5555574d8830 [DrawArea], e=0x555557191390) at ../src/DrawArea.vala:4888
#11 0x00005555555ac48d in _draw_area_on_keypress_gtk_widget_key_press_event
    (_sender=0x5555574d8830 [DrawArea], event=0x555557191390, self=0x5555574d8830)
    at /home/alex/soft/desktop/minder/minder-i18n/build/DrawArea.c:4302
#12 0x00007ffff729ce9c in _gtk_marshal_BOOLEAN__BOXED
    (closure=0x5555575aabb0, return_value=0x7fffffffd4f0, param_values=0x7fffffffd580, marshal_data=<optimized out>, invocation_hint=<optimized out>, n_param_values=<optimized out>) at gtk/gtkmarshalers.c:84
#13 0x00007ffff7f42130 in g_closure_invoke
    (closure=0x5555575aabb0, return_value=0x7fffffffd4f0, n_param_values=2, param_values=0x7fffffffd580, invocation_hint=0x7fffffffd4d0)
    at ../../../gobject/gclosure.c:832
#14 0x00007ffff7f6f4ac in signal_emit_unlocked_R.isra.0
    (node=node@entry=0x7fffffffd670, detail=detail@entry=0, instance=instance@entry=0x5555574d8830, emission_return=emission_return@entry=0x7fffffffd6f0, instance_and_params=instance_and_params@entry=0x7fffffffd580) at ../../../gobject/gsignal.c:3980
#15 0x00007ffff7f60312 in signal_emit_valist_unlocked
    (instance=instance@entry=0x5555574d8830, signal_id=signal_id@entry=91, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffd7d0)
    at ../../../gobject/gsignal.c:3625
#16 0x00007ffff7f60bd6 in g_signal_emit_valist (instance=0x5555574d8830, signal_id=91, detail=0, var_args=var_args@entry=0x7fffffffd7d0)
    at ../../../gobject/gsignal.c:3355
--Type <RET> for more, q to quit, c to continue without paging--c
#17 0x00007ffff7f60c93 in g_signal_emit (instance=instance@entry=0x5555574d8830, signal_id=<optimized out>, detail=detail@entry=0)
    at ../../../gobject/gsignal.c:3675
#18 0x00007ffff754f154 in gtk_widget_event_internal.part.0.lto_priv.0 (widget=0x5555574d8830 [DrawArea], event=0x555557191390)
    at ../../../gtk/gtkwidget.c:7812
#19 0x00007ffff756343b in gtk_window_propagate_key_event
    (window=window@entry=0x555555a56ef0 [MainWindow], event=event@entry=0x555557191390) at ../../../gtk/gtkwindow.c:8408
#20 0x00007ffff756660b in gtk_window_key_press_event (widget=0x555555a56ef0 [MainWindow], event=0x555557191390)
    at ../../../gtk/gtkwindow.c:8441
Python Exception <class 'gdb.error'>: value has been optimized out
phase1geo commented 5 months ago

I'm not able to replicate this problem with 1.16.0. Would it be possible to have you add a quick video or animated GIF to this issue?

prokoudine commented 5 months ago

It happened maybe 5-6 times on a specific document and now I can't replicate this either. Well, that's one elusive bug and no mistake.

phase1geo commented 5 months ago

Well, you did provide a stack trace of the problem, so I'll try to reverse engineer to attempt to figure out what caused the problem from that. I'll keep you posted.

phase1geo commented 5 months ago

Okay, I believe that I have both replicated the original issue. I have a fixed committed to the master branch.

prokoudine commented 5 months ago

Okay, I believe that I have both replicated the original issue. I have a fixed committed to the master branch.

You are my hero :) Will test all the fixes in the morning.