ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hariharasudhan R" <har...@gmail.com>
Subject Re: How to increase memory used by JVM in Ant
Date Sat, 16 Feb 2008 14:37:51 GMT
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 <mpc8250@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message