facebook

Memory Leak ? [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #204261 Reply

    monocongo
    Member

    Here are the details of my set up:

    OS – Windows XP Professional
    Eclipse Version: 2.1.2
    Build id: 200311030802
    Not a fresh Eclipse install
    MyEclipse Version: 2.6.200
    Build id: 200312091200-2.7-RC1
    Plugins like org.eclipse.pde.*:
    build_2.1.0
    core_2.1.2
    doc.user_2.1.0
    runtime_2.1.0
    source_2.1.2
    ui_2.1.2
    Java version 1.4.2_01
    JBoss version 3.2.3RC1

    I am having the trouble of MyEclipse using more and more memory until it finally runs out and has to be closed. I am running Ant in conjunction with XDoclet to create deployment descriptors (I’m going through a tutorial on the use of XDoclet). Each iteration of the Ant build adds about 4,000K to the Memory Usage for javaw.exe as reported by the task manager. It seems that this is somehow related to Ant/XDoclet, but I have had Eclipse and MyEclipse get very slow to respond, and even hang, several times in the past and I didn’t check then to see if the memory was an issue, so I can’t say with certainty that this apparent memory leak is anything new or specific to Ant/XDoclet.

    Perhaps I should reinstall Eclipse and then MyEclipse from scratch, in order to have a clean install ? I had Eclipse installed along with several plugins (Lomboz, JBoss IDE, CDT – none of which I was really using) before starting to use MyEclipse, so perhaps I have a hybrid of components which aren’t all working well together.

    Thanks in advance for any suggestions.

    -James

    #204267 Reply

    Riyad Kalla
    Member

    James,
    You might want to do the clean install first. I ran into a problem where I had the Eclipse profiler plugin installed, and on Linux it was causing a huge memory leak even though I wasn’t using it at all… very strange.

    #204494 Reply

    monocongo
    Member

    The clean install hasn’t done me any good, I still run out of memory fast when using XDoclet. One thing I have noticed is that the memory usage reported by the task manager will decrease after not using MyEclipse for some time. This leads me to believe that the garbage collection isn’t happening frequently enough. Perhaps there is some way to tweak this ?

    Another thing which might be an issue is that I am running XDoclet from my Ant build script. After looking in the Help system I see that the MyEclipse way of doing things is to have an xdoclet-build.xml file. The I went to the MyEclipse Help for XDoclet, and it shows that I must specify a configuration which will generate the xdoclet-build.xml for me. Unfortunately the instructions on using the built-in XDoclet support provided by MyEclipse don’t exactly match with what I see in MyEclipse on my machine. When I click on a project, then properties, I see no avalable XDoclet configurations. Also the menu is different in that instead of seeing “XDoclet Configurations” as the Xdoclet option I see “MyEclipse-XDoclet” so I am assuming that the help documentation isn’t up to date with the MyEclipse software.

    Anyway I’m confused as to how to go about using XDoclet in MyEclipse as prescribed using configurations and xdoclet-build.xml, and how to use XDoclet with an Ant build script without having MyEclipse run out of memory after a few iterations. Any suggestions will be helpful and appreciated.

    (Note to moderator — maybe this should be reposted as an XDoclet-related question ?)

    -James

    #204507 Reply

    No Operation
    Member

    My guess: Your problem is ANT based. I remember that I could only run a limited count of ANT scripts, until I had to restart Eclipse.

    I am not sure whether this is still true, goin to verify this soon.

    NOP

    #204508 Reply

    myoungstrom
    Member

    I had the exact same problem. I found this ignored xdoclet bug:

    http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-419

    I never found a solution however I found a workaround by using Eclipse 3.0 telling it to run ANT in a seperate JRE. Never had a problem since however I’ve never been able to go back to 2.1.2 either.

    Mike

    #204511 Reply

    No Operation
    Member

    The link leeds to
    [link]http://issues.apache.org/bugzilla/show_bug.cgi?id=17216[/link]

    So you might need a newer ANT version:

    I replaced the ant.jar with a newer version (1.6.1).
    You will also need the ant-launcher.jar copied to the plugin dir (eclipse/plugins/org.apache.ant_1.5.3), and need to add it to the ANT class path (Window->Preferences->ANT->Runtime)

    ANT still works here, but it is a hack… so only try it if you know what you are doing!

    NOP

    #204531 Reply

    monocongo
    Member

    I have copied the 1.6.1 Ant JAR as well as the launcher JAR to the eclipse/plugins/org.apache.ant_1.5.3 diretory. I added the launcher JAR to the classpath for Ant in the Preferences. One last bit of confusion though — in the Ant Preferences Runtime settings I now have four JARs listed:

    C:/eclipse/plugins/org.apache.ant_1.5.3/ant.jar
    C:/eclipse/plugins/org.apache.ant_1.5.3/optional.jar
    C:/j2sdk1.4.2_01/lib/tools.jar
    C:/eclipse/plugins/org.apache.ant_1.5.3/ant-launcher.jar

    I’m not sure how this works — should I have the launcher first, or should it perhaps be the only JAR listed ? Also there is an option to set the ANT_HOME — what if I just set this to my Ant 1.6.1 lib directory, would this override the Runtime Classpath, and allow MyEclipse to find the correct, updated versions of Ant ?

    Thanks again for the hand holding…

    -James

    #204534 Reply

    monocongo
    Member

    I have just tested with the new Ant 1.6.1 JAR in place, with the launcher JAR first in the order of JARs for the Ant Runtime settings. MyEclipse is still eating loads of memory at each Ant iteration, according to the Task Manager information for javaw.exe.

    I am compiling, running XDoclet, running JavaDoc, and building a WAR in the Ant build script.

    -James

    #204678 Reply

    monocongo
    Member

    Can anyone confirm whether or not this is a bug specific to MyEclipse (i.e. will I have the same trouble with vanilla Eclipse) ? Also is this bug purely Ant-related, or specific to Ant only in conjunction with XDoclet ?

    Thanks in advance for any feedback.

    -James

    #204679 Reply

    Riyad Kalla
    Member
    #204683 Reply

    myoungstrom
    Member

    I can confirm that it is not a MyEclipse issue.

    Mike

    #204705 Reply

    Scott Anderson
    Participant

    I believe Riyad and trust Mike’s analysis so I’m closing this thread and pointing the finger of blame at Ant. 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Memory Leak ? [Closed]

You must be logged in to post in the forum log in