Infinite recursion problem with Force based layout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Infinite recursion problem with Force based layout

Natalia Tymchuk
Hello.
I played with Force based layout and noticed that in some cases you can get infinite recursion.

If you call method #withAll:origin:corner:
from RTQuarTree class with parameters
origin =  (3.258667150078313e13@5.406136133593736e12)
corner = (3.258667150079787e13@5.40613613360932e12)

you would get
dx := corner x - origin x = 14.7421875
dy := corner y - origin y = 15.583984375

So, in this case you will execute the case
dy > dx ifTrue: [ ^ self withAll: aNodeCollection origin: origin corner: (origin x + dy) @ corner y ]
and you will get infinite recursion, because always dy will be =15.583984375 and dx = 15.58203125.

Best regards,
Natalia


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Infinite recursion problem with Force based layout

abergel
Hi Natalia,

Thanks for reporting this issue. Do you have an idea how to prevent this infinite recursion?

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On May 31, 2015, at 7:40 AM, Natalia Tymchuk <[hidden email]> wrote:

Hello.
I played with Force based layout and noticed that in some cases you can get infinite recursion.

If you call method #withAll:origin:corner:
from RTQuarTree class with parameters
origin =  (3.258667150078313e13@5.406136133593736e12)
corner = (3.258667150079787e13@5.40613613360932e12)

you would get
dx := corner x - origin x = 14.7421875
dy := corner y - origin y = 15.583984375

So, in this case you will execute the case
dy > dx ifTrue: [ ^ self withAll: aNodeCollection origin: origin corner: (origin x + dy) @ corner y ]
and you will get infinite recursion, because always dy will be =15.583984375 and dx = 15.58203125.

Best regards,
Natalia


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev