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 145383

Summary: OutOfMemoryError: Java heap space
Product: utilities Reporter: Jiri Rechtacek <jrechtacek>
Component: SearchAssignee: Marian Petras <mpetras>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jrechtacek
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=100551
Issue Type: DEFECT Exception Reporter: 100551

Description Jiri Rechtacek 2008-08-28 07:42:52 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b91
OS: Linux, 2.6.24-21-generic, i386
User comments: 
STACKTRACE: (first 10 lines)
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 java.io.BufferedReader.readLine(BufferedReader.java:345)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:182)
        at org.netbeans.modules.search.BasicSearchCriteria.checkFileContent(BasicSearchCriteria.java:642)
        at org.netbeans.modules.search.BasicSearchCriteria.matches(BasicSearchCriteria.java:575)
        at org.netbeans.modules.search.SpecialSearchGroup.processSearchObject(SpecialSearchGroup.java:108)
        at org.netbeans.modules.search.SpecialSearchGroup.doSearch(SpecialSearchGroup.java:88)
Comment 1 Marian Petras 2008-08-28 10:19:48 UTC
From the callstack, particularly from its frame java.io.BufferedReader.readLine(BufferedReader.java:345), it is apparent
that the OutOfMemoryError occurred while searching a file with very long lines (thousands characters without CR or LF),
most probably a binary file. Because the searching routine skips files that are known to be binary files, this must have
been an unrecognised file, a large unrecognised file. Such issue was resolved recently - it is issue #129557.

*** This issue has been marked as a duplicate of 129557 ***