piccolo2d / piccolo2d.java

Structured 2D Graphics Framework
http://piccolo2d.org
Other
51 stars 14 forks source link

Stack overflow in SwingLayoutNode.java#455 #244

Closed mro closed 9 months ago

mro commented 9 years ago

Originally reported on Google Code with ID 244

// 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
) {

Reported by guai@inbox.ru on 2012-11-23 12:12:52

mro 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?

Reported by heuermh on 2012-11-23 18:02:19