Community
Participate
Working Groups
Build Identifier: Version: 3.7.2 Build id: M20120208-0800 When rows==1, and cols==1, and numChildren==1 the following snippet of calculateNumberOfRowsAndCols_square results in an infinite loop. while (rows * cols > numChildren) { if (cols > 1) cols--; if (rows * cols > numChildren) if (rows > 1) rows--; } Reproducible: Didn't try Steps to Reproduce: 1. It occurred upon launching eclipse when it opened a view containing a zest graph from the previous session. It appears the graph had no content. (zero nodes or connections.)
Plugin version: 2.0.0.201206082202
Thanks Armond. Unfortunately, this issue is hard to reproduce. The code you pointed at should not produce an infinite loop with your preconditions (rows == 1, cols == 1, numChildren == 1), since the condition of the loop is never true (rows * cols > numChildren). I also tried to reproduce the problem from the rest of your description here: http://git.eclipse.org/c/gef/org.eclipse.zest.git/commit/?id=bf45e8fe50e620c4f3