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.
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)
Created attachment 92518 [details] stacktrace
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.
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.
*** This bug has been marked as a duplicate of bug 183289 ***