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 189900 - Not all objects GCed
Summary: Not all objects GCed
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.0
Hardware: PC All
: P2 normal (vote)
Assignee: Stanislav Aubrecht
URL: http://qa-findbugs.netbeans.org/job/C...
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2010-08-26 11:20 UTC by Ivan Sidorkin
Modified: 2010-10-15 02:58 UTC (History)
6 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 Ivan Sidorkin 2010-08-26 11:20:26 UTC
Jarda, could you please help to define correct product/component

Caused by: junit.framework.AssertionFailedError: Checking if all projects are really garbage collected Project:
private static org.netbeans.core.windows.WindowManagerImpl org.netbeans.core.windows.WindowManagerImpl.defaultInstance->
org.netbeans.core.windows.WindowManagerImpl@517317-registry->
org.netbeans.core.windows.RegistryImpl@132e6dd-currentNodes->
[Lorg.openide.nodes.Node;@c33f0f-[0]->
org.openide.nodes.FilterNode@1f2fec6-parent->
org.openide.nodes.FilterNode$Children@df691d-original->
org.netbeans.spi.java.project.support.ui.PackageViewChildren$PackageNode@c5f07a-this$0->
org.netbeans.spi.java.project.support.ui.PackageViewChildren@1def450-group->
org.netbeans.spi.project.support.ant.SourcesHelper$SourceRoot$Group@1a5f00a-this$1->
org.netbeans.spi.project.support.ant.SourcesHelper$TypedSourceRoot@dda8ac-this$0->
org.netbeans.spi.project.support.ant.SourcesHelper@193e4bb-project->
org.netbeans.modules.java.j2seproject.J2SEProject@6f4654
Comment 1 Tomas Zezula 2010-08-26 11:48:34 UTC
If the project as closed the whole PackageViewChildren should be freed.
Seems as bug in the org.netbeans.core.windows.RegistryImpl@132e6dd-currentNodes which still holds it.
Comment 2 Stanislav Aubrecht 2010-08-26 15:44:39 UTC
are there any steps to reproduce? currentNodes in RegistryImpl seems to refresh correctly when topcomponents are being switched. who should clear the activated nodes when a project is being closed?
Comment 3 Ivan Sidorkin 2010-08-26 16:18:55 UTC
to reproduce:
cd java.kit
ant test -Dtest.config=uicommit

scenario in general:
- create new project
- add new file
- edit java file
- build and run
- debug
Comment 4 Tomas Zezula 2010-08-26 18:50:10 UTC
Does the test correct closing of the project?
Comment 5 Ivan Sidorkin 2010-08-26 19:33:54 UTC
I think so.
And it worked fine before.

check also results of failed testGCDocuments
it can be related

http://qa-findbugs.netbeans.org/job/CV-multi-UI-st/jdk=jdk1.6,label=Lin-Ubuntu-1-stable/lastBuild/testReport/org.netbeans.test.ide/MemoryValidationTest/testGCDocuments/?
Comment 6 Jaroslav Tulach 2010-08-26 21:22:42 UTC
The testGCDocument seems to be clear problem of debugger.jpda.ui.models.VariablesTreeModelFilter. Unless the bug is not reported yet, move this one to debugger and let see what happens.

Could we modify the test to run with 
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$workdir/heapdump.hprof
That could allow us to investigate more in the case of PackageNodeChildren.
Comment 7 Martin Entlicher 2010-08-27 06:58:53 UTC
I'll reopen issue #183895 for the problem in VariablesTreeModelFilter. The fix actually did not improve anything because of a small overlook.
Comment 8 Jaroslav Tulach 2010-08-27 12:55:15 UTC
Please note that you may run the test locally to verify your fix.
Comment 10 Jaroslav Tulach 2010-08-28 06:55:19 UTC
The snapshot shows that J2SEProject is referenced as OpenProjectList.INSTANCE.mainProject. If the test really closed the project, this would signal problem in the project ui infrastructure.
Comment 11 Ivan Sidorkin 2010-08-28 07:17:45 UTC
this snapshot taken for testGCDocuments before closing project
Comment 12 Stanislav Aubrecht 2010-09-14 13:24:57 UTC
reassigning to debugger team for evaluation
Comment 13 Martin Entlicher 2010-09-14 13:35:19 UTC
? What is the current problem?

Looking at http://qa-findbugs.netbeans.org/job/CV-multi-UI-st/533/ when I click on any failed test, I get Status Code: 404

I've found some failures at http://qa-findbugs.netbeans.org/job/CV-multi-UI-st/533/jdk=jdk1.6,label=Sol10-x86-4-stable//testReport/org.netbeans.test.ide/MemoryValidationTest/testGCProjects/?
and
http://qa-findbugs.netbeans.org/job/CV-multi-UI-st/533/jdk=jdk1.6,label=MacOSX-1-stable//testReport/org.netbeans.test.ide/MemoryValidationTest/testGCProjects/?

There are still reported problems in window system, not debugger!

Please evaluate yourself.
Comment 14 Stanislav Aubrecht 2010-10-14 14:45:48 UTC
i've cleared some additional static fields in keyboard focus manager (core-main e01966172ac2) and navigator topcomponent is now properly garbage collected.

the project instance is still held in other classes though.

please check that the test properly closes the project and/or open a new issue, thanks
Comment 15 Quality Engineering 2010-10-15 02:58:32 UTC
Integrated into 'main-golden', will be available in build *201010150000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e01966172ac2
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #189900 - clear some extra static fields in KeyboardFocusManager