Bug 256880 - Memory issue with lookup
Memory issue with lookup
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Lookup
8.1
All All
: P2 (vote)
: 8.2
Assigned To: Jaroslav Havlin
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-30 23:35 UTC by tdanard
Modified: 2017-02-15 15:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Sample NetBeans Platform Application (20.26 KB, application/x-zip-compressed)
2015-11-30 23:35 UTC, tdanard
Details
Trail of references in JProfiler (60.71 KB, image/png)
2015-11-30 23:39 UTC, tdanard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdanard 2015-11-30 23:35:18 UTC
Created attachment 157570 [details]
Sample NetBeans Platform Application

When I upgraded from NetBeans 7.3.1 from NetBeans 8.0.2, I encountered an issue where the lookup system keeps references to obsolete lookup instances, leading to countless memory leaks.

This is regression as lookups were properly cleaned up with NetBeans 7.3.1. This issue is present with 8.0.2 and 8.1. I didn't test it with other versions.

I have attached a sample NetBeans Platform Application module suite that reproduces this issue. You can run it both with NetBeans 7.3.1 and NetBeans 8.0.2. I have also attached the trail of references preventing a proper garbage collection that JProfiler reports.

To use this sample project, start the application. Click the "Create Window" button in the toolbar then click the "Selection Action" in the toolbar. Close the window. Run a profiler and look for a "MutableLookup" instance. With 7.3.1, the MutableLookup instance is garbage collected. With 8.0.2, it is not.

This issue is critical for me as it prevents me from upgrading to recent versions of NetBeans. I tried to look into the lookup code, but couldn't find the root cause or a workaround.
Comment 1 tdanard 2015-11-30 23:39:26 UTC
Created attachment 157571 [details]
Trail of references in JProfiler
Comment 2 Tomas Hurka 2017-02-15 15:51:00 UTC
I tested your project with NetBeans 8.2 and with setting to Xmx24M. "MutableLookup" instance are collected after some time.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo