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 228855 - Memory leak in openide.text
Summary: Memory leak in openide.text
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.4
Hardware: PC All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2013-04-22 14:42 UTC by Petr Cyhelsky
Modified: 2013-09-02 08:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test (9.11 KB, text/plain)
2013-05-13 13:25 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2013-04-22 14:42:48 UTC
Even though all editor tabs are closed, NbEditorDocument instance is still held in memory. Please see the heapdump - NbEditorDocument instance #3 for details
Comment 1 Petr Cyhelsky 2013-05-13 13:24:22 UTC
reassigning to Mila - the Attached test proves there is a problem with GCing the Document instance.
Comment 2 Petr Cyhelsky 2013-05-13 13:25:32 UTC
Created attachment 134367 [details]
test
Comment 3 Miloslav Metelka 2013-05-13 14:05:30 UTC
http://hg.netbeans.org/jet-main/rev/83fab96e9746
Comment 4 Jan Lahoda 2013-05-14 13:43:34 UTC
Sorry, but I had to revert for now (the patch allowed the Document to be GCed without converting the PositionRefs into the external kind, which then broke a lot of Java hints tests and has probably some effect on the refactoring preview as well):
http://hg.netbeans.org/jet-main/rev/5240bc3466b2

I'll try to look for a solution for converting the PositionRefs in this case.
Comment 5 Quality Engineering 2013-05-18 02:52:18 UTC
Integrated into 'main-golden', will be available in build *201305172300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/83fab96e9746
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #228855 - Memory leak in openide.text.
Comment 6 Jan Lahoda 2013-08-27 13:06:36 UTC
Re-applied, lets see how it will work this time:
http://hg.netbeans.org/jet-main/rev/2afb2c7c14ae
Comment 7 Quality Engineering 2013-08-31 01:27:45 UTC
Integrated into 'main-silver', will be available in build *201308310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2afb2c7c14ae
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #228855: re-applying Mila's fix for the leak, and ensuring the PositionRefs are reasonable for visually not opened Documents.
Comment 8 Miloslav Metelka 2013-09-02 08:03:09 UTC
Honzo, thanks for the fix.