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 253730 - OutOfMemoryError: 430 instances of Symtab
Summary: OutOfMemoryError: 430 instances of Symtab
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2015-07-24 11:02 UTC by Exceptions Reporter
Modified: 2015-07-29 01:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 218693


Attachments
stacktrace (3.18 KB, text/plain)
2015-07-24 11:02 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2015-07-24 11:02:36 UTC
This issue was reported manually by thurka.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build nbms-and-javadoc-170-on-20150721)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b15
OS: Windows 8

User Comments:
GUEST: Refactoring packages done gone fucked up!




Stacktrace: 
java.lang.OutOfMemoryError: GC overhead limit exceeded
   at java.util.Hashtable.addEntry(Hashtable.java:435)
   at java.util.Hashtable.put(Hashtable.java:476)
   at java.util.Properties.load0(Properties.java:392)
   at java.util.Properties.load(Properties.java:341)
   at org.netbeans.modules.java.source.indexing.FQN2Files.load(FQN2Files.java:115)
   at org.netbeans.modules.java.source.indexing.FQN2Files.<init>(FQN2Files.java:81)
Comment 1 Exceptions Reporter 2015-07-24 11:02:38 UTC
Created attachment 154849 [details]
stacktrace
Comment 2 Tomas Hurka 2015-07-24 11:21:35 UTC
There are 430 instances of Symtab. It looks like they are referenced from org.netbeans.api.java.source.ModificationResult$Difference
Comment 3 Tomas Hurka 2015-07-24 11:43:09 UTC
This looks like regression introduced by <http://hg.netbeans.org/main-silver/rev/733fc267c72e>
Comment 4 Svata Dedic 2015-07-27 13:14:58 UTC
Important on large projects
Comment 5 Svata Dedic 2015-07-28 13:10:15 UTC
I believe the OOM is not specific to 8.1/dev versions. The Source is held by ModificationResult$Difference now, but it used to be hold by ModificationResult. The refactoring keeps a hardref to ModificationResult, so I believe the OOM could eventually happen in earlier releases as well.

The sources were kept around until after commit(), and the Source instances were used to revalidate the Source object.
Comment 6 Svata Dedic 2015-07-28 14:01:30 UTC
Should be fixed by jet-main#64f253d51488
Comment 7 Quality Engineering 2015-07-29 01:30:32 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/64f253d51488
User: Svata Dedic <sdedic@netbeans.org>
Log: #253730: allow to free Source instances backed by FileObjects, Source instance can be recreated later