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 149032 - memory leak in make project
Summary: memory leak in make project
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Alexander Simon
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2008-10-03 09:15 UTC by Alexander Simon
Modified: 2008-10-07 06:06 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 Alexander Simon 2008-10-03 09:15:44 UTC
Step to reproduce:
- open large project (for example boost)
- wait parsing finished (or switch off code model)
- restart IDE
- look at memory
- invoke project properties. Close by cancel.
- see memory increase (in my configuration of boost I have 16M). Additional memory do not released by GC. It not Ok, but
it is low priority bug
- invoke project properties 10 times.
- see memory increase at each iteration (in my configuration of boost I have 160M). IMHO it is a P1 bug.

Memory investigation show following memory leak at each iteration:
IntConfiguration 		+215,340 	(+6,890,880)
StringConfiguration		+124,367	(+2,985,024)
BooleanConfiguration		+94,915		(+2,277,960)
VectorConfiguration		+51,056		(+1,225,340)
OptionsConfiguration		+37,749		(+905,976)
CCCompilerConfiguration		+12,704		(+1,016,320)
CCompilerConfiguration		+12,822		(+1,025,760)
FortranCompilerConfiguration	+12,219		(+586,512)
CustomToolConfiguration		+12,218		(+293,232)
ItemConfiguration		+6,109		(+293,232)
Total:						(+16,274,887)
Comment 1 Alexander Simon 2008-10-03 09:34:05 UTC
problem class is ToolsPanel, static field:
 static Set<ChangeListener> listenerModified = new HashSet<ChangeListener>();
When properties panel showing the MakeCustomizerProvider,
the new cloned descriptor created:
ConfigurationDescriptor clonedProjectdescriptor =
projectDescriptorProvider.getConfigurationDescriptor().cloneProjectDescriptor();
In clone added listener.
After dialog closing the cloned descriptor do not delete listener.
Comment 2 Alexander Simon 2008-10-03 09:49:40 UTC
fixed in release65_cnd_freeze branch, change set:
http://elif.russia.sun.com/hg/release65_cnd_freeze/rev/4bc625e995b2
Comment 3 Alexey Vladykin 2008-10-03 10:37:01 UTC
I agree with suggested fix.
Comment 4 Alexander Pepin 2008-10-03 15:59:03 UTC
reproducible in dev build 2008-10-03--15-12
Comment 5 Alexander Simon 2008-10-06 08:01:59 UTC
please, retest.
What you should test:
- start IDE with opened boost
- wait initial parsing
- invoke project properties
- wait (10 seconds) and invoke force GC 3 times, remember memory (consumed, not allocated).
- invoke project properties 5 times
- wait (10 seconds) and invoke force GC 3 times, compare memory.
Expected: consumed (not allocated) memory was not increased (difference +- 10M)
Comment 6 Alexander Pepin 2008-10-06 11:08:50 UTC
Indeed I did not call garbage collector before. Now the behavior is the same as expected so the issue can be treated as
fixed and verified in dev build 2008-10-03--15-12.
Comment 7 Alexander Simon 2008-10-06 11:23:33 UTC
fixed in main trunk, change set:
http://hg.netbeans.org/main/rev/482ae4e1c598
Comment 8 Quality Engineering 2008-10-07 06:06:49 UTC
Integrated into 'main-golden', will be available in build *200810070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/482ae4e1c598
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed: IZ#149032:memory leak in make project