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 235483 - OutOfMemoryError: GC overhead limit exceeded
Summary: OutOfMemoryError: GC overhead limit exceeded
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2013-09-04 08:25 UTC by 3rik
Modified: 2017-09-12 04:35 UTC (History)
12 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 203556


Attachments
stacktrace (367 bytes, text/plain)
2013-09-04 08:25 UTC, 3rik
Details
stacktrace (356 bytes, text/plain)
2013-10-31 23:13 UTC, Exceptions Reporter
Details
stacktrace (367 bytes, text/plain)
2015-07-04 03:40 UTC, jyeary
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 3rik 2013-09-04 08:25:53 UTC
This issue was reported manually by thurka.
It already has 1 duplicates 


Build: NetBeans IDE 7.4 Beta (Build 201307092200)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_17-b02
OS: Windows 7

User Comments:
3rik: Tried to overwrite a large HTML file with lots of internal CSS and JavaScript with another large one.




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at sun.management.ThreadImpl.dumpThreads0(ThreadImpl.java:0)
   at sun.management.ThreadImpl.dumpAllThreads(ThreadImpl.java:446)
   at org.netbeans.modules.sampler.Sampler$1.run(Sampler.java:191)
   at java.util.TimerThread.mainLoop(TimerThread.java:555)
   at java.util.TimerThread.run(TimerThread.java:505)
Comment 1 3rik 2013-09-04 08:25:55 UTC
Created attachment 139641 [details]
stacktrace
Comment 2 Tomas Hurka 2013-09-04 08:49:37 UTC
There is a lot of org.netbeans.modules.editor.lib2.highlighting.HighlightItem instances and other instances from org.netbeans.modules.editor.lib2.view package. 34% of the heap is occupied by float[], most of which are held from org.netbeans.modules.editor.lib2.view.HighlightsView.
Comment 3 Exceptions Reporter 2013-10-31 17:07:48 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=203556
Comment 4 Exceptions Reporter 2013-10-31 23:13:58 UTC
Created attachment 141757 [details]
stacktrace

Locked up when a file that was under Mercurial was reverted by a third-party application.
Comment 5 jyeary 2015-07-04 03:40:31 UTC
Created attachment 154483 [details]
stacktrace

The JS update is crashing the IDE.
Comment 6 timmaher 2015-08-14 15:22:13 UTC
(In reply to jyeary from comment #5)
> Created attachment 154483 [details]
> stacktrace
> 
> The JS update is crashing the IDE.

Just happened to me to.
Comment 7 Miloslav Metelka 2016-06-15 14:33:26 UTC
Report #819749 shows a large number of HtmlLexer instances and I've found a serious error: HtmlLexer$CompoundState is a non-static inner class.
The lexer framework saves a lexer state together with token. There is no reason to hold lexer instances so each relex produces and uses a new lexer instance. However HtmlLexer$CompoundState being non-static holds a HtmlLexer instance together with its input and tokenFactory fields practically for every modification of an html source :(
I'll scan all *Lexer classes in all modules to ensure that this pattern was not copied to other lexer impls too.
http://hg.netbeans.org/jet-main/rev/9fd14b03efad
Comment 8 Quality Engineering 2016-06-16 01:52:28 UTC
Integrated into 'main-silver', will be available in build *201606160002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9fd14b03efad
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #235483 - OutOfMemoryError: GC overhead limit exceeded - fixed HtmlLexer compound state to not be non-static inner class.