| Re: [aspectj-users]java.lang.StackOverflowError atorg.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292) |
| Santiago Aguiar <santi@xxxxxxxxxxxxxx>
Sent by: aspectj-users-bounces@xxxxxxxxxxx 30/03/2007 15:31
|
|
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Santiago Aguiar
Sent: Thursday, March 29, 2007 12:33 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users]java.lang.StackOverflowError atorg.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
Hi Ron!
Thanks a lot for the reply!
The strack trace is of 1024 function calls... it seems a bit too deep for
me (I didn't paste the full stack trace in the email).
I tried your suggestion and it didn't work. However it made me thing and
I added -Xms128m -Xmx256m (since I'm passing those parameters when running
in a lab where I don't get the error) and it solved the problem.....
I don't exactly see why having less available memory would result in a
StackOverflow instead of an OutOfMemory error.....
Ron Bodkin wrote:
Hi Santiago,
You might try running your test with a larger stack size, since this doesn’t
look like an infinite loop. Try adding a VM argument –Xss2048k to your
junit runner to do this. This value is four times the default, so you probably
can run with less, but doing this should test whether this fixes the problem
(as I suspect it will). Java programs with deep stacks sometimes need a
larger value here. And running from Eclipse has different stack depths,
so the discrepancy isn’t too surprising.
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx]
On Behalf Of Santiago Aguiar
Sent: Thursday, March 29, 2007 8:39 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] java.lang.StackOverflowError atorg.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
Hi,
I'm using AspectJ 1.5.3 using LTW and writing *most* of my aspects code
style. I get the following stack trace when running a test case from ant:
[junit] java.lang.StackOverflowError
[junit] at java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:269)
[junit] at java.util.WeakHashMap.getTable(WeakHashMap.java:297)
[junit] at java.util.WeakHashMap.get(WeakHashMap.java:341)
[junit] at org.aspectj.weaver.World$TypeMap.get(World.java:967)
[junit] at org.aspectj.weaver.World.resolve(World.java:250)
[junit] at org.aspectj.weaver.World.resolve(World.java:191)
[junit] at org.aspectj.weaver.UnresolvedType.resolve(UnresolvedType.java:662)
[junit] at org.aspectj.weaver.ReferenceType.getRawType(ReferenceType.java:550)
[junit] at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
[junit] at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:276)
[junit] at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
.....
Strangely, I don't get the error if running my test cases from inside Eclipse.
If I'm not wrong, eclipse uses it's own compiler while when running from
ant I'm compiling with Sun's compiler (1.5.0_09).
I don't really know what else to do... I suspect the issue is while handling
generics, but not much else. I'm willing to provide any additional information
to help me diagnose the problem.
I'm attaching the generated ajcore files.
thanks a lot,
saludos
--
santiago aguiar
netlabs
Palmar 2548
Montevideo, Uruguay
Tel. +(598 2) 707 7687
Fax. +(598 2) 709 4866
http://www.netlabs.com.uy
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
Attachment:
santi.vcf
Description: Binary data