GNOME Bugzilla – Bug 360013
Mutual connection between 2 shapes freezes dia
Last modified: 2007-03-29 19:54:25 UTC
Steps to reproduce: 1. start dia on win xp sp 2 2. place 2 "perfect circles" (perfekte kreise) from "object sheet misc" (objektbogen vermischtes) on the plane 3. connect one with the other using an arc/bow (bogen) starting and ending in the middle of the both. In case dia does not freeze yet, do the other direction also, now it freezes in 5 out of 6 tries. Stack trace: Dudes, tell on http://live.gnome.org/GettingTraces where to obtain those programs!! As a web search of 10 mins did not reveal any windows ports you'll have to live without a stack trace till you tell me where to install the progs from... Other information: I know this does not happen when one of the connectors in north/south/west/east is used, but sometimes the mouse is not placed exactly on those - and a freezing dia is annoying ;-( as one looses all changed data.
This is probably related to bug #357219. Seems to be a Window-related bug. Hans has a fix for this that unfortunately breaks arc in other ways.
Created attachment 74686 [details] test program for atan2 behaviour Lars you are probably refering to bug #312641, but this is a different issue as the attached the testprogram shows. Dia relies on some infinitesimal corner case of atan2(), apparently undocumented for both implementations - the MS and the GNU one. While msc gives: atan2(1.#INF00/1.#INF00) = -1.#IND00 -1.#IND00 grd the GNU C runtime has: atan2(inf/inf) = 0.785398 45.000000 grd All this is triggered by arc_update_data() when start and end of the arc are the same and alpha = (radius - arc->curve_distance) / sqrt(lensq); with lensq=0.0 is claculated. The final unresponsiveness is caused by a (bug-)pattern you added, namely while (angle<0) angle+=360.0 which takes a *very long* time to be calculated for -inf I'm about to fix the main issue, but what do you think about removing this potential endless loops as well?
*** Bug 348242 has been marked as a duplicate of this bug. ***
*** Bug 357219 has been marked as a duplicate of this bug. ***
2006-10-14 Hans Breuer <hans@breuer.org> * objects/standard/arc.c : don't rely on the result of atan2(inf,inf), it is C-runtime dependent. Fixes infinitesimal burning of CPU cycles, bug #360013 and duplicates.
*** Bug 365067 has been marked as a duplicate of this bug. ***
*** Bug 405794 has been marked as a duplicate of this bug. ***
*** Bug 411212 has been marked as a duplicate of this bug. ***
*** Bug 343591 has been marked as a duplicate of this bug. ***
*** Bug 416141 has been marked as a duplicate of this bug. ***
*** Bug 424090 has been marked as a duplicate of this bug. ***