Bug 64002 - [performance] Eclipse crashes when formatting code
Summary: [performance] Eclipse crashes when formatting code
Status: RESOLVED DUPLICATE of bug 62662
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: Other Linux
: P3 major (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Christof Marti CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-05-25 17:43 EDT by Rick Gaudette CLA
Modified: 2004-06-10 19:12 EDT (History)
1 user (show)

See Also:


Attachments
M9 Format crash log file (33.09 KB, text/plain)
2004-05-25 17:56 EDT, Rick Gaudette CLA
no flags Details
One of the files that causes the formatter to crash (170.50 KB, text/plain)
2004-06-01 16:21 EDT, Rick Gaudette CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Gaudette CLA 2004-05-25 17:43:52 EDT
Just upgraded to M9, when I attempt to Source/Format any java source file 
Eclipse goes off into oblivion for a while (a minute or two).  Then two 
dialogs are popped up, "A internal error occured...." and "An out of memory 
erro has occured..." 
 
Stdout/stderr return the following: 
java.lang.OutOfMemoryError 
Unhandled event loop exception 
Reason: 
java.lang.OutOfMemoryError 
Unhandled event loop exception 
Reason: 
java.lang.OutOfMemoryError 
 
I have saved the .log file if you want it.
Comment 1 Dirk Baeumer CLA 2004-05-25 17:49:20 EDT
Can you please attach the log and the file that causes the OutOfMemory error. 

Do you pass any special VM args or are you running with an out of the box heap 
size. Which VM are you using ?
Comment 2 Rick Gaudette CLA 2004-05-25 17:56:35 EDT
Created attachment 11103 [details]
M9 Format crash log file

No VM args at all.
Sun 1.4.2_04

Also, I switched back to M8 and attempted formatting a Java source file. It
worked the first time but used the Default profile which was not my previous
setting.  I swtiched it to my previous profile, attempted to format the same
file and it crashed with an out of memory error.  This profile worked fine
before I attempted to run M9.

I asked this question with a previously submitted bug, is there any way to get
back to the M2 formatter?
Comment 3 Dirk Baeumer CLA 2004-05-26 03:00:37 EDT
Unfortunatelly, the log doesn't contain any further information about the OME.

Two things:

- you can increase the heap size of the VM to fix this (e.g. pass 
  -vmargs -Xms30M -Xmx200M to the eclipse exe)

- is it possible to attach the file that cases the OEM so that we can 
  reproduce it.

Regarding your question: no you can't switch back to the M2 formatter. 
Lowering severity since work around exists.
Comment 4 Rick Gaudette CLA 2004-06-01 16:19:28 EDT
Tried the larger heap size. It also failed in the same manner.
Comment 5 Rick Gaudette CLA 2004-06-01 16:21:33 EDT
Created attachment 11424 [details]
One of the files that causes the formatter to crash
Comment 6 Dirk Baeumer CLA 2004-06-03 10:55:31 EDT
The file can be formatted without problems when the file isn't opened in the 
editor (for example but it into a project with an additional dummy file and 
format the whole project).
Comment 7 Dirk Baeumer CLA 2004-06-03 11:37:28 EDT
The memory consumption is caused by the editor's updating infrastructure. 

Christof, as dicussed with you the formatting bug.
Comment 8 Christof Marti CLA 2004-06-09 11:00:34 EDT
Rick, do you have QuickDiff enabled and does the OOME still occur if you disable it?
Comment 9 Christof Marti CLA 2004-06-09 19:16:29 EDT
Optimizations avoiding a lot of objects being allocated and released shortly
afterwards in scenarios like this go into I200406101200.
Comment 10 Christof Marti CLA 2004-06-10 19:12:32 EDT
No fix is available for RC2. Marking as duplicate, please reopen if disabling
QuickDiff does not fix this for you.


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