After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 173031 - Dia crashes while adding new zigzagline and dragging it
Dia crashes while adding new zigzagline and dragging it
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
CVS head
Other Linux
: Normal critical
: 0.95
Assigned To: Dia maintainers
Dia maintainers
: 300854 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-04-08 07:45 UTC by Radek Krahl
Modified: 2005-10-08 20:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixing crash when adding zigzag line and dragging cursor simultaneously (849 bytes, patch)
2005-04-10 14:53 UTC, Radek Krahl
committed Details | Review

Description Radek Krahl 2005-04-08 07:45:39 UTC
Add new zigzagline to diagram and drag it at the same time without releasing the
mouse button.

Below is a stack trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 20373)]
0x400412d1 in orthconn_update_data (orth=0x85e6eb0) at orth_conn.c:307
307       ConnectionPoint *end_cp = orth->handles[orth->numpoints-2]->connected_to;
(gdb) thread apply all bt

Thread 1 (Thread 16384 (LWP 20373))

  • #0 orthconn_update_data
    at orth_conn.c line 307
  • #1 zigzagline_move_handle
    at zigzagline.c line 312
  • #2 create_object_motion
    at create_object.c line 222
  • #3 ddisplay_canvas_events
    at disp_callbacks.c line 670
  • #4 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 gtk_widget_event_internal
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #11 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #12 gdk_event_dispatch
    from /usr/lib/libgdk-x11-2.0.so.0
  • #13 g_main_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #14 g_main_context_iterate
    from /usr/lib/libglib-2.0.so.0
  • #15 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #16 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 main
    at main.c line 45

Comment 1 Hans Breuer 2005-04-09 20:03:19 UTC
This is caused by an attempt to support auto-routing, see
http://cvs.gnome.org/viewcvs/dia/lib/orth_conn.c?r1=1.27&r2=1.28
I'll revert this change with my next commit.
Comment 2 Radek Krahl 2005-04-10 14:53:59 UTC
Created attachment 45103 [details] [review]
Patch fixing crash when adding zigzag line and dragging cursor simultaneously

Maybe it won't be neccesary ;).
Crash is caused by number of handles in orthconn being not in sync with number
of its points. It happens only when you're adding new zigzagline and changing
its start poing in the same time. When you place zigzagline and move
start/endpoint later (after releasing the mousebutton and pressing it again)
everything works ok.
I don't know if the patch is doing it in a right way, but it seems to work.
Probably it duplicates calls to adjust_handle_count_to() in some places but i
don't have enough time to check it right now. Sorry for that, my wedding
becomes closer and closer ;).
Analogical code exists in neworth_conn.c, but i haven't touch it, because i
don't know what it does ;).
Btw. number of pint in orthconn in this situation is changed in
orthconn_set_points(), called from autorute_layout_orthconn(). Maybe it's a
better place to call adjust_handle_count_to().

Ps: and sorry for my english.
Comment 3 Hans Breuer 2005-04-20 19:56:59 UTC
*** Bug 300854 has been marked as a duplicate of this bug. ***
Comment 4 Lars Clausen 2005-04-20 20:55:57 UTC
Fix works and is now applied, thank you
Comment 5 Hans Breuer 2005-10-08 20:36:10 UTC
Adjusting target to help finding 0.94 dups already fixed