This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178583 - [68cat] OutOfMemoryError: Java heap space
Summary: [68cat] OutOfMemoryError: Java heap space
Status: RESOLVED DUPLICATE of bug 183289
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Victor Vasilyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 05:13 UTC by Peter Nabbefeld
Modified: 2010-03-31 14:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 163245


Attachments
stacktrace (1.26 KB, text/plain)
2009-12-14 05:13 UTC, Peter Nabbefeld
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Nabbefeld 2009-12-14 05:13:52 UTC
Build: NetBeans IDE Dev (Build 200912130200)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments:
epdv: Searching for 00000 in files. Quickly takes about 250MB heap space (from about 140MB jumps to about 390MB), then constantly rising.

GUEST: Performing a quite simple file search in a folder in my project-tree



Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOfRange(Arrays.java:3209)
   at java.lang.String.<init>(String.java:216)
   at java.lang.StringBuilder.toString(StringBuilder.java:430)
   at org.netbeans.modules.search.BufferedCharSequence.nextLineText(BufferedCharSequence.java:396)
   at org.netbeans.modules.search.BufferedCharSequence.getLineText(BufferedCharSequence.java:409)
   at org.netbeans.modules.search.BasicSearchCriteria$FindState.getLineText(BasicSearchCriteria.java:936)
Comment 1 Peter Nabbefeld 2009-12-14 05:13:55 UTC
Created attachment 92518 [details]
stacktrace
Comment 2 Victor Vasilyev 2010-03-28 15:26:59 UTC
Additional investigation is required.
We need have sample project(s) that gives big memory consuming during search in project(s). The best case if it will provoke the OutOfMemoryError. 

Probably, additionally to existing limitations (a files number and a found occurrences number),  we need establish a limit based on a size of used memory to stop the search process before the error will occur.
Comment 3 Peter Nabbefeld 2010-03-29 11:38:27 UTC
While it happened too much time ago to tell You now, what caused the bug, AFAIR there were many files involved in the search. I'd guess, every file looked at has been opened, and a FileObject has been created - which was probably never removed from memory. Just a guess. Maybe it has been fixed in the meantime.
Comment 4 Victor Vasilyev 2010-03-31 14:53:17 UTC

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