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 130958 - [PERFORMANCE] Closed debugger sessions leak memory
Summary: [PERFORMANCE] Closed debugger sessions leak memory
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-24 22:41 UTC by _ gtzabari
Modified: 2010-04-29 09:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2008-03-24 22:41:53 UTC
dev build 2008032000007

I noticed that a couple of hours after using Netbeans its heap nearly doubled (70MB to 150MB) even after forced GC. This
makes Netbeans noticeably slower across the board simply due to the extra GC overhead.

I posted a hprof memory dump at http://bbs.darktech.org/netbeans-heap.rar
Please note there might be other large leaks shown by this dump. I just posted to the debugger first because the top-10
entries seemed to point in this direction.

Please let me know as soon as you finish downloading a copy of this dump so I can erase it off my server.
Comment 1 _ gtzabari 2008-03-24 22:42:36 UTC
PS: The dump file is 35MB
Comment 2 Martin Entlicher 2008-03-25 12:34:25 UTC
I've downloaded the file, thanks.
I've found NetBeans profiler completely unusable for this due to following exception
java.lang.ClassCastException: org.netbeans.lib.profiler.ui.components.FilterComponent cannot be cast to
javax.swing.JComboBox
for which I've submitted some issue via automatic reporting tool.

After opeining in JHat, I see several instances of JPDADebuggerImpl, which are held by a buch of associated actions, etc.
I'll explore what the problem can be...
Comment 3 Martin Entlicher 2008-03-25 13:47:41 UTC
From heap.hprof/roots/0x0c88fb48 it looks like all instances of JPDADebuggerImpl are held by
org.netbeans.modules.debugger.jpda.heapwalk.models.HeapActionsFilter@0xbe007d0 (16 bytes)  (field debugger:)
But the root of the problem seems to be in Models.defaultExpansionModels static field.
Comment 4 Martin Entlicher 2008-03-25 17:21:44 UTC
Fixed by using weak reference: changeset:   75431:2a773ccf117f
http://hg.netbeans.org/main/rev/2a773ccf117f
Comment 5 Quality Engineering 2010-04-29 09:38:59 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.