GNOME Bugzilla – Bug 173031
Dia crashes while adding new zigzagline and dragging it
Last modified: 2005-10-08 20:36:10 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
+ Trace 57871
Thread 1 (Thread 16384 (LWP 20373))
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.
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.
*** Bug 300854 has been marked as a duplicate of this bug. ***
Fix works and is now applied, thank you
Adjusting target to help finding 0.94 dups already fixed