Hi,

This is most likely a logic/programming error.
Target A calls Target B which in turn calls Target A which again calls
Target B..
Target A -> Target B -> Target A -> Target B..........
This sets up an infinite recursion, which will result in a
StackOverFlowError..

You can increase the stack size by adding the -Xoss JVM parameter, but this
will not help.
It will only delay the StackOverFlowError till the now larger stack fills
up.

This will not happen only if there you have set some exit condition which
will not continue the recursive call
(This is what you would do when you write a recursive function in any
programming language )

HTH,
Hari

On Feb 16, 2008 11:48 AM, Z W <[EMAIL PROTECTED]> wrote:

> Hi Glenn
>
> In one of my previous post, I got jstack error when 2 targets are calling
> each other.
> I have 2 targets namely A, B.
> Target A calls target B. Inside target A has an if-then-else condition
> that
> would stop calling target B if condition is met.
> Target B calls target A every 2 seconds after performing a check.
>
> When running this, after less than a few mins, I got jstack overflow
> error.
> I'm not sure what causes the error and I thought it might be memory.
> Is there a max of "stack frames" allowed in Ant.
>
> Thanks
>

Reply via email to