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.
after all projects are closed one instance of org.netbeans.modules.java.j2seproject.J2SEProject is still held in memory. See the offending instance in heapdump at: https://netbeans.org/projects/performance/downloads/download/heapdumps/Heapdump_web_jsf.7z
Should be fixed in web-main #6b7fa0ef35fd.
Integrated into 'main-golden', will be available in build *201306202301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6b7fa0ef35fd User: Martin Fousek <marfous@netbeans.org> Log: #231428 - memory leak in org.netbeans.modules.web.jsf.api.metamodel.ModelUnit
The project is still being held via its source path can you please consider also weakreferencing the field: private final ClassPath sourcePath; I've tried running the IDEValidation with the weakreferenced sourcePath and all went smoothly...
(In reply to comment #3) > The project is still being held via its source path > can you please consider also weakreferencing the field: > > private final ClassPath sourcePath; It means that sourcePath indirectly holds also the reference to the project? Please could you attach new heapdump or let me know how can I reproduce your tests? Thanks a lot. > I've tried running the IDEValidation with the weakreferenced sourcePath and all > went smoothly... Yeah, it's possible. I would like just to take a look on the new heapdump, thanks.
(In reply to comment #3) > The project is still being held via its source path > can you please consider also weakreferencing the field: > > private final ClassPath sourcePath; The original problem was resolved, the another issue looks to be in holding of its classpath + filechange listener. > I've tried running the IDEValidation with the weakreferenced sourcePath and all > went smoothly... I'm afraid that I'm not able to validate my change since I don't have steps how to get this heap dump. Please could you attach them once the issue would remains. It should be fixed in web-main #0ed75a98c0ca. Please give it try whether it's ok or not. Thanks a lot!
Integrated into 'main-silver', will be available in build *201307112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0ed75a98c0ca User: Martin Fousek <marfous@netbeans.org> Log: #231428 - memory leak in org.netbeans.modules.web.jsf.api.metamodel.ModelUnit - listeners
I'm sorry to open this again, but there is still one reference left. Please see heap dump at https://netbeans.org/projects/performance/downloads/download/Heapdump_jsf_model.7z The problem is that there is static WeakHashMap MODELS in org.netbeans.modules.web.jsf.api.metamodel.JsfModelFactory. This map has the projects as it's key, which is okay iff the value does not strongly reference it, which it does, as can be seen in the dump. It may be worth considering if it is even needed to have the static map there or if it is possible/better to use project lookup to get the model.
Integrated into 'main-silver', will be available in build *201307242300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7f65672757db User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #231428, implement profilingPoint() in subclasses; implementation in LockGraphBuilder does nothing
(In reply to comment #7) > I'm sorry to open this again, but there is still one reference left. No problem. Thanks for reopening if it's still valid - that the previous references hid another one. I haven't steps how to reproduce it so I'm not able to test it by myself. > The problem is that there is static WeakHashMap MODELS in > org.netbeans.modules.web.jsf.api.metamodel.JsfModelFactory. This map has the > projects as it's key, which is okay iff the value does not strongly reference > it, which it does, as can be seen in the dump. > It may be worth considering if it is even needed to have the static map there > or if it is possible/better to use project lookup to get the model. Although I would be probably able to remove also this reference and keep the map, I rewrote the model caching into project lookup as was recommended by you and TomasH. BTW, JsfModelProviderImpl creates the model lazy. I believe it will solve this issue for ever, feel free to reopen or comment if would be anything wrong, thanks a lot! web-main #5c2f6be50dca
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5c2f6be50dca User: Martin Fousek <marfous@netbeans.org> Log: #231428 - memory leak in org.netbeans.modules.web.jsf.api.metamodel.ModelUnit