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 239870 - Macro expanded token stream of huge source file results in OutOfMemoryError
Summary: Macro expanded token stream of huge source file results in OutOfMemoryError
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 239878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-30 12:33 UTC by Exceptions Reporter
Modified: 2014-01-09 10:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 206251


Attachments
stacktrace (1.51 KB, text/plain)
2013-12-30 12:33 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2013-12-30 12:33:41 UTC
This issue was reported manually by alexvsimon.
It already has 1 duplicates 


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:
GUEST: When I try to use the funcionality "Find Usage" of an especific method, It get stucked in the 43% and crashes after some time




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at org.netbeans.modules.cnd.apt.utils.APTUtils.createAPTToken(APTUtils.java:261)
   at org.netbeans.modules.cnd.apt.impl.support.generated.APTLexer.makeToken(APTLexer.java:284)
   at org.netbeans.modules.cnd.apt.impl.support.generated.APTLexer.mFIRST_STAR(APTLexer.java:1157)
   at org.netbeans.modules.cnd.apt.impl.support.generated.APTLexer.nextToken(APTLexer.java:746)
   at org.netbeans.modules.cnd.apt.utils.APTCommentsFilter.nextToken(APTCommentsFilter.java:68)
   at org.netbeans.modules.cnd.apt.utils.APTCommentsFilter.nextToken(APTCommentsFilter.java:57)
Comment 1 Exceptions Reporter 2013-12-30 12:33:43 UTC
Created attachment 143516 [details]
stacktrace
Comment 2 Alexander Simon 2013-12-30 15:48:26 UTC
Biggest object:
org.netbeans.modules.cnd.modelimpl.impl.services.MacroExpansionDocProviderImpl$2
1 object, size 160 Mb
Comment 3 Quality Engineering 2013-12-31 03:05:38 UTC
Integrated into 'main-silver', will be available in build *201312310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/80ea742df6e4
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #239870 OutOfMemoryError: GC overhead limit exceeded
- reduce size of IntervalCorrespondence
Comment 4 Quality Engineering 2014-01-01 02:27:42 UTC
Integrated into 'main-silver', will be available in build *201401010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0276b77682c7
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #239870 OutOfMemoryError: GC overhead limit exceeded
- reduce size of IntervalCorrespondence (part 2)
Comment 5 Alexander Simon 2014-01-09 06:42:28 UTC
(In reply to Alexander Simon from comment #2)
> Biggest object:
> org.netbeans.modules.cnd.modelimpl.impl.services.
> MacroExpansionDocProviderImpl$2
> 1 object, size 160 Mb
Source file contains 166,462 lines with 2,530,835 tokens
Comment 6 Alexander Simon 2014-01-09 08:45:12 UTC
*** Bug 239878 has been marked as a duplicate of this bug. ***
Comment 7 Vladimir Voskresensky 2014-01-09 10:06:02 UTC
as pointed out by user 
I as able to alleviate this issue by adding -J-Xmx2g and
-J-XX:+UseConcMarkSweepGC to the netbeans_default_options property.