StackOverflowError is thrown from NBodyForce in init()
Status: Beta
Brought to you by:
jheer
During NBodyForce initialization, NBodyForce.init(ForceSimulator fsim), a StackOverflowError is thrown.
It is thrown from the recursion of the insert and insert(...) and insertHelper(...) methods.
It is caught, but doesn't not enable a "human-usable" loading of the map. It just takes too long (about 20 minutes).
A workaround:
define a theMaxRecursionDepth (as defined in the attached NDobyForce.java file) and use it to block the depth of the recursion.
Otherwise the recursion is blocked by the depth of the run-time stack.