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 176013 - MemoryValidationTest.testGCProjects failure from KenaiPopupMenu
Summary: MemoryValidationTest.testGCProjects failure from KenaiPopupMenu
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Team Framework (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Dvorak
URL: http://deadlock.netbeans.org/hudson/j...
Keywords: RANDOM, TEST
Depends on:
Blocks:
 
Reported: 2009-11-04 15:54 UTC by Jesse Glick
Modified: 2009-11-10 03:34 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 Jesse Glick 2009-11-04 15:54:18 UTC
Checking if all projects are really garbage collected Project:
private static java.util.HashMap org.netbeans.modules.kenai.ui.KenaiPopupMenu.repoForProjCache->
java.util.HashMap@5d6cf8-table->
[Ljava.util.HashMap$Entry;@c2155f-[6]->
java.util.HashMap$Entry@6e8e00-key->
org.netbeans.modules.java.j2seproject.J2SEProject@b4e680

private static java.util.HashMap org.netbeans.modules.kenai.ui.KenaiPopupMenu.versioningItemMap->
java.util.HashMap@d25356-table->
[Ljava.util.HashMap$Entry;@1fcc84c-[15]->
java.util.HashMap$Entry@c874d6-value->
[Ljavax.swing.JComponent;@eda165-[0]->
javax.swing.JMenuItem@10d311e-action->
org.netbeans.modules.mercurial.ui.update.UpdateAction@1798b30-context->
org.netbeans.modules.versioning.spi.VCSContext@b3e508-elements->
org.openide.util.lookup.SingletonLookup@72a378-objectToLookup->
org.netbeans.modules.project.ui.ProjectsRootNode$BadgingNode@c44924-pair->
org.netbeans.modules.project.ui.ProjectsRootNode$ProjectChildren$Pair@1eae60f-project->
org.netbeans.modules.java.j2seproject.J2SEProject@b4e680WARNING [org.netbeans.test.ide.WatchProjects]: visHolder for
TreeView in 'Projects':Parent: Projects [ [Main] 
{[org.netbeans.modules.project.ui.ProjectsRootNode$BadgingNode@ce6203[Name=nbfs://nbhost/SystemFileSystem/, displayName=
[Main]]]}]
WARNING [org.netbeans.test.ide.WatchProjects]: visHolder for TreeView in 'Files':Parent: Projects [ [Main] 
{[org.netbeans.modules.project.ui.ProjectsRootNode$BadgingNode@c05c4e[Name=nbfs://nbhost/SystemFileSystem/, displayName=
[Main]]]}]
WARNING [org.netbeans.test.ide.WatchProjects]: visHolder for TreeView in 'services':Parent:  [Databases Hudson Builders
Kenai Instances Issue Trackers  {[org.openide.nodes.LazyNode@bb19ab[Name=Databases, displayName=Databases],
org.openide.nodes.LazyNode@192635f[Name=hudson, displayName=Hudson Builders],
org.openide.nodes.LazyNode@1b9f7e8[Name=kenai, displayName=Kenai Instances],
org.openide.nodes.LazyNode@42bced[Name=bugtracking, displayName=Issue Trackers]]}]
Comment 1 Petr Dvorak 2009-11-04 15:58:35 UTC
That's mine... I will have a look...
Comment 3 Jan Becicka 2009-11-04 16:12:37 UTC
at least you can use WeakHashMap
Comment 4 Petr Dvorak 2009-11-04 16:16:52 UTC
Yes, or I can stop being retarded and not use project as a HashMap key...
Comment 5 Jesse Glick 2009-11-04 19:29:11 UTC
Since this is breaking continuous builders, I made a hotfix: core-main #044f806e648a (suitable for directly pulling into
other repos).
Comment 6 Jesse Glick 2009-11-04 22:33:54 UTC
Hotfix has propagated to cdev so you can try to fix it better. I switched to a WeakHashMap for repoForProjCache, which
seems to be straightforward; just disabled versioningItemMap since it is the values which leak, not the keys, so fixing
would be a little more work - maybe need to wrap values in SoftReference's or something like this. Use
MemoryValidationTest to verify attempted fixes.
Comment 7 Petr Dvorak 2009-11-05 09:21:11 UTC
Thanks Jesse, I played with the action yesterday and fixed more "weird stuff I wrote" there...

Btw/OT: I suggest deprecation of the CookieAction in the next API version - I wanted to implement the action, so I
looked how this is done elsewhere in the IDE and I found cookie action somewhere and then colleagues in my office
laughed that this is no longer the good way of doing this - annoying for someone who starts with the platform, if
something should not be used, it should be marked as deprecated...
Comment 8 Quality Engineering 2009-11-05 10:19:36 UTC
Integrated into 'main-golden', will be available in build *200911050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/044f806e648a
User: Jesse Glick <jglick@netbeans.org>
Log: Hotfix for #176013: memory leak.
Comment 9 Petr Dvorak 2009-11-05 11:57:01 UTC
http://hg.netbeans.org/cdev/rev/fb1067bfebd3
Comment 10 Quality Engineering 2009-11-06 10:05:01 UTC
Integrated into 'main-golden', will be available in build *200911060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fb1067bfebd3
User: joshis@netbeans.org
Log: #176013 - MemoryValidationTest.testGCProjects failure from KenaiPopupMenu