Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stack Overflow Error

807605Jul 28 2007 — edited Jul 29 2007
I'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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2007
Added on Jul 28 2007
6 comments
477 views