Bug 314451 - OOM, cant compile a project with 1500 classes
Summary: OOM, cant compile a project with 1500 classes
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows Vista
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-26 08:53 EDT by Saurabh CLA
Modified: 2010-10-05 16:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saurabh CLA 2010-05-26 08:53:13 EDT
Build Identifier: 

java.lang.OutOfMemoryError
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at org.aspectj.util.FileUtil.readAsByteArray(FileUtil.java:1175)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesFromFile(AjBuildManager.java:516)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesToDestination(AjBuildManager.java:457)
at org.aspectj.ajdt.internal.core. ... .AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: OutOfMemoryError thrown: null



Eclipse.ini file content 
========================
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms128m
-Xmx1048m

Reproducible: Always

Steps to Reproduce:
1.order a clean on the AJ project
Comment 1 Saurabh CLA 2010-05-26 08:56:32 EDT
Build id: I20090611-1540
Comment 2 Andrew Eisenberg CLA 2010-05-27 23:34:46 EDT
What version of AspectJ/AJDT are you using?
Comment 3 Saurabh CLA 2010-05-31 07:06:15 EDT
(In reply to comment #2)
> What version of AspectJ/AJDT are you using?


12:5:5 Startup information: 
   AJDT version: 2.0.2.e35x-20100105-0900 for Eclipse 3.5
   AspectJ Compiler version: 1.6.7.a
   usingVisualiser=true
   usingXref=true
   usingCUprovider=false
   ajde.version.at.previous.startup = @AJDEVERSION@
   autoOpenCrossReferenceView = false
   promptForAutoOpenCrossReference = false
   org.eclipse.ajdt.internal.ui.tracing.checked.filters = set: Compiler,Builder


===============================

java.lang.OutOfMemoryError
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at org.aspectj.util.FileUtil.readAsByteArray(FileUtil.java:1175)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesFromFile(AjBuildManager.java:529)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.copyResourcesToDestination(AjBuildManager.java:466)
at org.aspectj.ajdt.internal.core. ... .AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: OutOfMemoryError thrown: null
Comment 4 Andrew Eisenberg CLA 2010-05-31 15:13:34 EDT
There's not much for me to go on here.  Is there any way that you can attach the failing project (or if it contains confidential information, you can send it directly to me)?

It is possible that you are hitting a problem with the AspectJ compiler, but it is hard to say from what you've given me.

One thing you can try is to compile from the command line or from ant.  If the compile fails there, too, then we can be fairly certain that this is not an issue specific to AJDT.
Comment 5 Saurabh CLA 2010-06-01 06:10:49 EDT
(In reply to comment #4)
> There's not much for me to go on here.  Is there any way that you can attach
> the failing project (or if it contains confidential information, you can send
> it directly to me)?
> 
> It is possible that you are hitting a problem with the AspectJ compiler, but it
> is hard to say from what you've given me.
> 
> One thing you can try is to compile from the command line or from ant.  If the
> compile fails there, too, then we can be fairly certain that this is not an
> issue specific to AJDT.

I am really sorry at i cant attach the project it has dependency on hundreds of legency codes jars and other confidential code.

And Regarding the suggestion of using ant (we already have have ant target and they seems to work fine)

If you can let me know what are you looking for i can try to find it out for you as this problem is seriously hindering our work as the Project in eclipse is never build successfully(always fails with OOM Exception and the details has the stack trace attached earlier).
Comment 6 Andrew Eisenberg CLA 2010-06-01 17:39:54 EDT
Assigning to Andy since this is likely to be an AspectJ problem.
Comment 7 Andrew Clement CLA 2010-06-01 17:43:54 EDT
Given that it always fails copying resource files, do you have any very large resource files?

Do you have highly pervasive aspects in the project? (like a trace or error handling policy that hits 1000s of places).  Can you perhaps turn an aspect or two 'off' and see if it makes any difference?  

You could try grabbing a heap dump.  I think I know what will be in it, but perhaps it contains something unexpected that could be addressed.
Comment 8 Andrew Eisenberg CLA 2010-10-05 16:20:59 EDT
This is looking like a duplicate of Bug 323754.