Stack Overflow Error
807605Jul 28 2007 — edited Jul 29 2007I'm making a java program to run the AI for a robot. The robot has a camera on it, and i do pixel analysis to determine clusters of a certain color. So, if I want to find clusters of red pixels, I have a method which generates a boolean[][] of values where its TRUE if the pixel is close enough to the color red, and FALSE otherwise.
The problem comes in when I use a recursive method to pick out the clusters in this boolean[][]. After about depth 10000, I get a stackoverflow error.
I tried running my jar file with:
java -jar SpiderBot.jar -Xss 32m
but it still crashes at about depth 10000.
Therefore i'm probly wrong about using Xss to increase stack size. Can someone tell me the right way?
Thanks