GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Stack overflow in SwingLayoutNode.java#455 #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
// important to check that the bounds have really changed, or we'll
// cause StackOverflowException
if (x != getX() || y != getY() || w != getWidth() || h != getHeight()) {
...

This check is not enough. In my case getHeight() returns 0 while h == 1 and it 
loops execution.

Kinda fixed for myself like that:

if (x != getX() || y != getY() || w != getWidth() || Math.abs(h - getHeight()) 
> 1 ) {

Original issue reported on code.google.com by g...@inbox.ru on 23 Nov 2012 at 12:12

GoogleCodeExporter commented 9 years ago
Thank you for submitting this issue.  I assume this is with svn trunk/version 
2.0-SNAPSHOT?

Also, might you be able to provide more information on your case, how would 
getHeight() and h get out of sync?

Original comment by heue...@gmail.com on 23 Nov 2012 at 6:02