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.
Summary: | ProjectClassLoader is never garbage collected. IDE runs out out memory when using the GUI builder. | ||
---|---|---|---|
Product: | guibuilder | Reporter: | schulte2004 <schulte2004> |
Component: | Code | Assignee: | issues@guibuilder <issues> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | Other | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Example project demonstrating the issue.
Example project demonstrating the issue with Maven. |
Created attachment 162722 [details]
Example project demonstrating the issue with Maven.
|
Created attachment 162721 [details] Example project demonstrating the issue. Please see the two example projects attached. Steps to reproduce: cmd>unzip ProjectClassLoaderTestAnt.zip Archive: ProjectClassLoaderTestAnt.zip creating: ProjectClassLoaderTestAnt/ creating: ProjectClassLoaderTestAnt/nbproject/ inflating: ProjectClassLoaderTestAnt/nbproject/project.xml creating: ProjectClassLoaderTestAnt/nbproject/private/ inflating: ProjectClassLoaderTestAnt/nbproject/private/private.properties inflating: ProjectClassLoaderTestAnt/nbproject/private/private.xml inflating: ProjectClassLoaderTestAnt/nbproject/project.properties inflating: ProjectClassLoaderTestAnt/nbproject/genfiles.properties inflating: ProjectClassLoaderTestAnt/nbproject/build-impl.xml inflating: ProjectClassLoaderTestAnt/build.xml creating: ProjectClassLoaderTestAnt/src/ inflating: ProjectClassLoaderTestAnt/src/ProjectComponent.java inflating: ProjectClassLoaderTestAnt/src/ProjectComponent.form inflating: ProjectClassLoaderTestAnt/src/ProjectFrame.java inflating: ProjectClassLoaderTestAnt/src/ProjectFrame.form inflating: ProjectClassLoaderTestAnt/manifest.mf cmd>cd ProjectClassLoaderTestAnt cmd>ant compile .... BUILD SUCCESSFUL Total time: 4 seconds Start the Netbeans IDE and open the project. Connect with visualvm. Take a memory snapshot and verify no "ProjectClassLoader" objects exist. Open "ProjectFrame" with the GUI builder. Close the form without doing anything else. Take a memory snapshot and verify one "ProjectClassLoader" object exists. Open "ProjectFrame" with the GUI builder again. Close the form without doing anything else. Take a memory snapshot and verify two "ProjectClassLoader" objects exist. Repeat. Whenever the form is opened, a new "ProjectClassLoader" object is created and never garbage collected. After working with multiple forms for some time, the IDE runs out of memory. Same for Maven based projects. See "ProjectClassLoaderTestMaven.zip". The cause for this seems to be the "ProjectFrame" form using "ProjectComponent" from the project. That's why the form can only be opened when the project has been compiled. Expected behaviour is the "ProjectClassLoader" object of the form getting garbage collected when the form has been closed.