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 207412 - Memory leak in ComponentPeer
Summary: Memory leak in ComponentPeer
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Spellchecker (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords: PERFORMANCE
: 217516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-17 20:53 UTC by Jesse Glick
Modified: 2012-10-19 05:45 UTC (History)
2 users (show)

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 Jesse Glick 2012-01-17 20:53:14 UTC
Dev build; leaked 59 closed projects. One of the root refs:

this	org.netbeans.modules.apisupport.project.NbModuleProject	#53
....
lookup	org.netbeans.modules.apisupport.project.suite.SuiteProject	#1
p	org.netbeans.modules.spellchecker.DictionaryImpl	#5
[1]	org.netbeans.modules.spellchecker.spi.dictionary.Dictionary[]	#53 (3 items)
delegates	org.netbeans.modules.spellchecker.CompoundDictionary	#43
value	java.util.Hashtable$Entry	#84535
[71]	java.util.Hashtable$Entry[]	#2026 (95 items)
table	org.netbeans.modules.editor.NbEditorDocument$4	#226
documentProperties	org.netbeans.modules.editor.NbEditorDocument	#216
document	org.netbeans.modules.spellchecker.ComponentPeer	#21
this$0	org.netbeans.modules.spellchecker.ComponentPeer$1	#120
run	org.openide.util.RequestProcessor$Task	#268
action	org.openide.util.RequestProcessor$FastItem	#946
[5]	java.lang.Object[]	#207288 (648 items)
queue	java.util.PriorityQueue	#1
queue (thread object)	org.openide.util.RequestProcessor$TickTac	#1
Comment 1 Jesse Glick 2012-01-17 20:55:14 UTC
Many others with similar traces. Another one had:

this	org.netbeans.modules.apisupport.project.NbModuleProject	#1
project	org.netbeans.modules.apisupport.project.api.LayerHandle	#1
handle	org.netbeans.modules.apisupport.project.layers.LayerNode$LayerChildren	#4
hierarchy	org.netbeans.modules.apisupport.project.layers.LayerNode	#1
nodeDelegate	org.netbeans.modules.apisupport.project.layers.LayerDataObject	#1
obj	org.netbeans.modules.openide.loaders.SimpleES	#6
this$0	org.openide.text.CloneableEditorSupport$DocFilter	#15
documentFilter	org.netbeans.modules.editor.NbEditorDocument	#104
document	org.netbeans.modules.spellchecker.ComponentPeer	#104
this$0	org.netbeans.modules.spellchecker.ComponentPeer$2	#16
run	org.openide.util.RequestProcessor$Task	#228
action	org.openide.util.RequestProcessor$FastItem	#927
[1]	java.lang.Object[]	#207288 (648 items)
queue	java.util.PriorityQueue	#1
queue (thread object)	org.openide.util.RequestProcessor$TickTac	#1

I had indeed edited the layer.xml of one or two modules, but both the file and the owning project had been closed for a while.
Comment 2 Jan Lahoda 2012-01-18 20:45:03 UTC
From the traces, it is not obvious why the RequestProcessor holds the tasks. The RP has throughput 1, so it is possible that a task is "running" in it, blocking all the other tasks, but that cannot be decided without a thread dump. Otherwise, the tasks are scheduled with delays <1s, and I see no other valid reason why RP should hold them (and obviously not run them).
Comment 3 Jesse Glick 2012-01-18 21:28:19 UTC
No idea, sorry.
Comment 4 Quality Engineering 2012-08-29 02:42:16 UTC
Integrated into 'main-golden', will be available in build *201208290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bd468fbf57b4
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #207412: trying to prevent rescheduling of spellchecker tasks for closed components.
Comment 5 Jan Lahoda 2012-08-30 04:37:10 UTC
thurka showed me how to reproduce something similar, attempted to fix as above. Hopefully, the fix will be successful and the root cause is the same as in this report.
Comment 6 Petr Cyhelsky 2012-10-08 09:04:00 UTC
for the case from the performance tests (showed by thurka) this fix works ok -> verified
Comment 7 Jan Lahoda 2012-10-09 01:40:53 UTC
release72:
http://hg.netbeans.org/releases/rev/7a286d481bbb
Comment 8 Quality Engineering 2012-10-10 14:19:05 UTC
Integrated into 'releases', will be available in build *201210100934* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/7a286d481bbb
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #207412: trying to prevent rescheduling of spellchecker tasks for closed components.
Comment 9 Jan Lahoda 2012-10-19 05:45:54 UTC
*** Bug 217516 has been marked as a duplicate of this bug. ***