Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364880 - OutOfMemoryError during "Scanning for Tasks"
Summary: OutOfMemoryError during "Scanning for Tasks"
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.sse (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords: performance, plan
Depends on:
Blocks:
 
Reported: 2011-11-26 02:38 EST by luc peuvrier CLA
Modified: 2013-12-20 16:48 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description luc peuvrier CLA 2011-11-26 02:38:13 EST
Build Identifier: Build id: 20110916-0149

!ENTRY org.eclipse.core.jobs 4 2 2011-11-26 08:36:02.437
!MESSAGE An internal error occurred during: "Scanning for Tasks".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2882)
	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:515)
	at java.lang.StringBuffer.append(StringBuffer.java:306)
	at org.eclipse.wst.sse.core.internal.tasks.StructuredFileTaskScanner.setDocumentContent(StructuredFileTaskScanner.java:276)
	at org.eclipse.wst.sse.core.internal.tasks.StructuredFileTaskScanner.findTasks(StructuredFileTaskScanner.java:185)
	at org.eclipse.wst.sse.core.internal.tasks.StructuredFileTaskScanner.scan(StructuredFileTaskScanner.java:257)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.scanFile(WorkspaceTaskScanner.java:417)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.internalScan(WorkspaceTaskScanner.java:215)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.internalScan(WorkspaceTaskScanner.java:210)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.internalScan(WorkspaceTaskScanner.java:210)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.internalScan(WorkspaceTaskScanner.java:210)
	at org.eclipse.wst.sse.core.internal.tasks.WorkspaceTaskScanner.scan(WorkspaceTaskScanner.java:337)
	at org.eclipse.wst.sse.core.internal.tasks.TaskScanningJob.run(TaskScanningJob.java:187)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Sometimes
Comment 1 Nitin Dahyabhai CLA 2011-11-28 09:30:54 EST
Do you have any excessively large XML, HTML, JSP, CSS, or DTD files in your workspace?  The failure point shown occurs just trying to read the file contents into a standard Document implementation, which either means a very, very large file, or something else used up most of your heap memory and we just happened to be the one that pushed it over.  How much heap space was allocated?
Comment 2 luc peuvrier CLA 2011-11-28 14:05:09 EST
(In reply to comment #1)
> Do you have any excessively large XML, HTML, JSP, CSS, or DTD files in your
> workspace?  The failure point shown occurs just trying to read the file
> contents into a standard Document implementation, which either means a very,
> very large file, or something else used up most of your heap memory and we just
> happened to be the one that pushed it over.  How much heap space was allocated?

Ho yes, I have two file of 4G5 on a folder !
eclipse setting in eclipse.ini: -Xms200m -Xmx1024m
Comment 3 Nitin Dahyabhai CLA 2013-12-07 22:36:13 EST
Fixed.  XML and HTML files are now scanned using a variant of our low-level tokenizer. Memory usage will be more in line with the lengths of the comments in the files rather than the total file sizes.
Comment 4 Nitin Dahyabhai CLA 2013-12-20 16:48:56 EST
Tested with a 1.8GB file containing 52 tasks, total memory never exceeded 100MB. We're capped at reporting in the first 2^31 bytes, though, since markers can't store Long numbers.