Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 72022

Summary: [ErrorHandling] catch and rethrow OutOfMemoryError with additional info for usability
Product: [Eclipse Project] Platform Reporter: Ralf Hauser <hauser>
Component: UIAssignee: Szymon Brandys <Szymon.Brandys>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ralf Hauser CLA 2004-08-16 10:53:54 EDT
when running a class with a large input file out of eclipse with the "Debug" or
"Run" feature, I just get 

<<java.lang.OutOfMemoryError
Exception in thread "main" >>

It would be great if there was more background information in this case, e.g.
- url pointing to instructions how to increase Xmx parameter
- current value of Xmx parameter
- hints how large to set Xmx with eclipse (how much extra RAM is needed by eclipse)


build 200406251208, see also Bug 64605

P.S.: Astonishingly, this happens even if I set -vmargs -Xmx768m in my eclipse
startup script on my PC. At the same time, when we run the same class out of
tomcat under linux,
<<export JAVA_OPTS="-Xmx512m"
export CATALINA_OPTS="-Xms256m -Xmx512m">> is sufficient and the error doesn't
occur.
Comment 1 Michael Van Meekeren CLA 2004-08-31 09:21:31 EDT
Is there another bug here as well?  What does this clas do and what is taking so
much memory?  Are you doing standard file I/O or parsing XML or other?  Opening
an editor maybe? Please provide more detail.
Comment 2 Ralf Hauser CLA 2004-08-31 10:32:35 EDT
I don't think this particularly relevant to here, but what we are doing is to 
parse a large mime mail (8 MB - base64encoded even 13M) with 
            org.bouncycastle.mail.smime.SMIMESigned s = new SMIMESigned(mimeMsg);
            // extract the content
            MimeMultipart mmp = new MimeMultipart();
            mmp.addBodyPart(s.getContent());
            ...
I am happy to have you try this on our server at https://www.privasphere.com .
Just create a large mail and digitally sign it - will not fail on our server,
when doing the same in my junit in eclipse, the reported problem occurs.
Comment 3 Ralf Hauser CLA 2004-09-07 01:34:56 EDT
as per Bug 73346, it would also be great to draw the user's attention to the
fact that besides giving memory to eclipse at startup, there is also the
possibility to specify an -Xmx for each of the "Run"s stored in those
"configurations"
Comment 4 Szymon Brandys CLA 2007-06-22 16:08:20 EDT

*** This bug has been marked as a duplicate of bug 33972 ***