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 121855 - Make IDE validation fail if there are memory leaks
Summary: Make IDE validation fail if there are memory leaks
Status: CLOSED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Commit Validation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ivan Sidorkin
URL:
Keywords:
Depends on: 100753 124038 124040 124042 124051 124054 124055 124061 124710 124711 124712 124713 124715 124716 128158 128160 129435
Blocks:
  Show dependency tree
 
Reported: 2007-11-13 22:15 UTC by Jaroslav Tulach
Modified: 2011-06-10 08:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Memory leak test for opened projects (9.10 KB, patch)
2007-11-13 22:16 UTC, Jaroslav Tulach
Details | Diff
IDE log with error messages. (58.81 KB, text/plain)
2007-11-14 09:17 UTC, Jiri Skrivanek
Details
Reference chains for all currently existing memory leaks in this test scenario (9.10 KB, text/plain)
2008-01-04 14:54 UTC, Jaroslav Tulach
Details
Leaks as of Feb 22, 2008 (19.12 KB, text/html)
2008-02-22 13:51 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2007-11-13 22:15:51 UTC
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.
Comment 1 Jaroslav Tulach 2007-11-13 22:16:37 UTC
Created attachment 52948 [details]
Memory leak test for opened projects
Comment 2 Jaroslav Tulach 2007-11-13 22:18:10 UTC
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
Comment 3 Jiri Skrivanek 2007-11-14 09:16:24 UTC
Nothing against but for me it ends up with OutOfMemoryError and bunch of other messages (see attachment). 
Comment 4 Jiri Skrivanek 2007-11-14 09:17:22 UTC
Created attachment 52953 [details]
IDE log with error messages.
Comment 5 Jaroslav Tulach 2007-11-14 18:01:04 UTC
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.
Comment 6 Jaroslav Tulach 2007-12-14 17:02:46 UTC
The test is integrated, just one line disables it. Enable when it passes, e.g. when all the leaks are fixed.

Comment 7 Jaroslav Tulach 2007-12-14 17:05:28 UTC
# 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");
     }
 }
Comment 8 Jaroslav Tulach 2008-01-04 14:54:00 UTC
Created attachment 54692 [details]
Reference chains for all currently existing memory leaks in this test scenario
Comment 9 Jaroslav Tulach 2008-02-22 13:51:55 UTC
Created attachment 57067 [details]
Leaks as of Feb 22, 2008
Comment 10 Jaroslav Tulach 2008-02-29 13:57:19 UTC
http://hg.netbeans.org/core-main/rev/e7480a43547f

Enabling the GC test, all memory leaks are said to be fixed
Comment 11 Jaroslav Tulach 2008-02-29 22:24:14 UTC
I need to disable the test again: b2bceb361d73

Comment 12 Lukas Hasik 2008-04-10 21:34:18 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 13 Peter Pis 2008-06-23 09:26:25 UTC
All depended issues are resolved. Could we close this one as well?
Comment 14 Peter Pis 2008-07-28 09:06:09 UTC
Can we close this issue?
Comment 15 Ivan Sidorkin 2008-07-29 09:54:28 UTC
looks like already fixed
Comment 16 Marian Mirilovic 2011-06-10 08:57:58 UTC
v/c