Community
Participate
Working Groups
I don't know what is the underlying source of this problem, but I have found that sometimes (maybe 10% of the time), when I run ant builds using the same VM inside Eclipse, the iajc task (only) will spin busy, consuming 100% of CPU and not stopping. I don't have good tools for figuring this out (although it's painful enough that I'm tempted to write a little thread control plugin for Eclipse that would let me kill or lower the priority of a thread, and take a thread dump too). Any ideas on what's going on here or how to fix it. The bug is not repeatable: the same build in the same workspace will work several times, hang, then on restart it works...
Not sure if you are running out of memory. Also, in the past Ant jar-related tasks would not release jars after opening them, so if you're running under 1.4 Ant builds in sequence in same VM, then they wouldn't complete (But I thought the error would be that a jar file could not be openned the second time, sometimes appearing as a type not found.) One option is to build AjcTask with advice dumping method-call signatures, so you'd have a log when it happened where it was happening. If in a call to ajc, then advise ajc. Since it's intermittant, it would mean running with these built versions for a while, and obviously it could slow things up. For efficiency, you could just have a rotating memory log of about .5MB, purged when some file shows up or some key is pressed. I realize you might not have time to build and run this way, but I'm not sure how else to diagnose.
No response to my comment, so perhaps it works with proper configuration. I suspect that things are hanging when both Ant and Eclipse are contending to open or write the same files. stalebug
It hasn't been happening recently, so hopefully it is fixed. There wasn't a configuration error (nothing has changed). I will reopen this if it shows up again.