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.
I'd like to integrate the IDE validation suite with (anti) memory leak checking. That shall help us find and fix already existing leaks, but more importantly to prevent their re-integration in future. I'll attach a sample patch showing current memory leaks holding projects in memory. It shows the principle that can be used generally.
Created attachment 52948 [details] Memory leak test for opened projects
Btw. currently there are some memoryleaks, like: junit.framework.AssertionFailedError: Can project be GCed?: private static javax.swing.Action[] org.netbeans.spi.java.project.support.ui.PackageViewChildren.actions-> [Ljavax.swing.Action;@136e8a4-[11]-> org.netbeans.modules.uml.integration.netbeans.actions.ReverseEngineerAction@920919-sourceProject-> org.netbeans.modules.java.j2seproject.J2SEProject@7b1133
Nothing against but for me it ends up with OutOfMemoryError and bunch of other messages (see attachment).
Created attachment 52953 [details] IDE log with error messages.
The OutOfMemoryError is just informational and fine. Basically it indicates there is a memory leak, but the system is not able to find a path to it.
The test is integrated, just one line disables it. Enable when it passes, e.g. when all the leaks are fixed.
# This is the patch to apply, when the test starts to pass. Index: ide/test/qa-functional/src/org/netbeans/test/ide/WatchProjects.java --- ide/test/qa-functional/src/org/netbeans/test/ide/WatchProjects.java Base (1.2) +++ ide/test/qa-functional/src/org/netbeans/test/ide/WatchProjects.java Locally Modified (Based On 1.2) @@ -89,7 +89,6 @@ getProjects.invoke(projectManager) ); - // disabled due to issue 124038 - // Log.assertInstances("Checking if all projects are really garbage collected"); + Log.assertInstances("Checking if all projects are really garbage collected"); } }
Created attachment 54692 [details] Reference chains for all currently existing memory leaks in this test scenario
Created attachment 57067 [details] Leaks as of Feb 22, 2008
http://hg.netbeans.org/core-main/rev/e7480a43547f Enabling the GC test, all memory leaks are said to be fixed
I need to disable the test again: b2bceb361d73
moving opened issues from TM <= 6.1 to TM=Dev
All depended issues are resolved. Could we close this one as well?
Can we close this issue?
looks like already fixed
v/c