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 360013 - Mutual connection between 2 shapes freezes dia
Mutual connection between 2 shapes freezes dia
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: win32
0.95.1
Other All
: Normal critical
: 0.96
Assigned To: Steffen Macke
Dia maintainers
: 343591 348242 357219 365067 405794 411212 416141 424090 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-05 21:08 UTC by Georg
Modified: 2007-03-29 19:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test program for atan2 behaviour (1.26 KB, text/plain)
2006-10-14 15:49 UTC, Hans Breuer
Details

Description Georg 2006-10-05 21:08:18 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.
Comment 1 Lars Clausen 2006-10-08 10:00:31 UTC
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.
Comment 2 Hans Breuer 2006-10-14 15:49:13 UTC
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?
Comment 3 Hans Breuer 2006-10-14 16:11:41 UTC
*** Bug 348242 has been marked as a duplicate of this bug. ***
Comment 4 Hans Breuer 2006-10-14 16:12:35 UTC
*** Bug 357219 has been marked as a duplicate of this bug. ***
Comment 5 Hans Breuer 2006-10-14 16:17:22 UTC
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.

Comment 6 Hans Breuer 2006-10-25 20:20:44 UTC
*** Bug 365067 has been marked as a duplicate of this bug. ***
Comment 7 Hans Breuer 2007-02-08 20:29:41 UTC
*** Bug 405794 has been marked as a duplicate of this bug. ***
Comment 8 Hans Breuer 2007-02-24 09:10:17 UTC
*** Bug 411212 has been marked as a duplicate of this bug. ***
Comment 9 Hans Breuer 2007-03-06 22:16:57 UTC
*** Bug 343591 has been marked as a duplicate of this bug. ***
Comment 10 Hans Breuer 2007-03-09 21:39:51 UTC
*** Bug 416141 has been marked as a duplicate of this bug. ***
Comment 11 Hans Breuer 2007-03-29 19:54:25 UTC
*** Bug 424090 has been marked as a duplicate of this bug. ***