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 238953 - OutOfMemoryError: Replacing text in large file
Summary: OutOfMemoryError: Replacing text in large file
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
: 242330 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-29 07:38 UTC by deff
Modified: 2014-07-14 14:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205662


Attachments
stacktrace (1.44 KB, text/plain)
2013-11-29 07:38 UTC, deff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description deff 2013-11-29 07:38:48 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: OpenJDK 64-Bit Server VM, 23.7-b01, OpenJDK Runtime Environment, 1.7.0_25-b30
OS: Linux

User Comments:
deff: Just sending to you




Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2367)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
   at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:535)
   at java.lang.StringBuilder.append(StringBuilder.java:204)
   at org.netbeans.modules.search.MatchingObject.text(MatchingObject.java:586)
Comment 1 deff 2013-11-29 07:38:49 UTC
Created attachment 142706 [details]
stacktrace
Comment 2 Jaroslav Havlin 2013-11-29 08:17:08 UTC
Replacing in a very big file.
Increasing heap size (-Xmx6g java parameter) could help.

Replacing of single-line patterns may be performed line-by-line, so tho whole file doesn't need to be loaded into memory. Further evaluation needed.
Comment 3 Jaroslav Havlin 2014-02-27 07:52:08 UTC
*** Bug 242330 has been marked as a duplicate of this bug. ***