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 242897 - OutOfMemoryError: GC overhead limit exceeded
Summary: OutOfMemoryError: GC overhead limit exceeded
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
: 244811 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-14 12:19 UTC by freddiekarlbom
Modified: 2014-06-13 05:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208383


Attachments
stacktrace (2.32 KB, text/plain)
2014-03-14 12:19 UTC, freddiekarlbom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description freddiekarlbom 2014-03-14 12:19:33 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Mac OS X

User Comments:
freddiekarlbom: Was going back in git history for a file and looking at diffs between different commits to find exactly where a change was introduced. Seems like the program didn't free up the memory for previous diffs when going to a new one.




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at java.util.Arrays.copyOfRange(Arrays.java:2694)
   at java.lang.String.<init>(String.java:203)
   at java.lang.StringBuilder.toString(StringBuilder.java:405)
   at org.openide.filesystems.FileObject.getPath(FileObject.java:223)
   at org.openide.filesystems.MultiFileObject.update(MultiFileObject.java:203)
   at org.openide.filesystems.MultiFileObject.refresh(MultiFileObject.java:541)
Comment 1 freddiekarlbom 2014-03-14 12:19:35 UTC
Created attachment 146022 [details]
stacktrace
Comment 2 Jaroslav Havlin 2014-03-14 14:31:03 UTC
There is a lot of instances of class o.n.m.php.editor.lexer.PHP5ColoringLexer$LexerState in the heap dump:
1,751,951 instances, retained size 181,425,249.

Other classes with high retained size are o.n.lib.lexer.LAState$LargeState (213 MB) and o.n.lib.lexer.inc.IncTokenList (302 MB), but I guess this is related to the PHP lexer as well.

I'm not sure whether this is a NetBeans bug, maybe there's just a very big PHP project.
Please try increasing heap size, e.g. -J-Xmx2g. See http://wiki.netbeans.org/FaqSettingHeapSize.

Reassigning to php/Editor for evaluation. Thank you.
Comment 3 Petr Cyhelsky 2014-05-30 11:08:58 UTC
*** Bug 244811 has been marked as a duplicate of this bug. ***
Comment 4 Ondrej Brejla 2014-06-13 05:23:42 UTC
Please, try 8.0 I made some improvements there. It could help. Thanks.