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 253374 - Memory leakage due as bugtracking module does not release some object such as QueryTopComponent
Summary: Memory leakage due as bugtracking module does not release some object such as...
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Issuetracking Framework (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-08 22:33 UTC by jijwang
Modified: 2015-08-27 13:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
bugzilla query memory profile (80.82 KB, application/octet-stream)
2015-07-08 22:33 UTC, jijwang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jijwang 2015-07-08 22:33:01 UTC
Created attachment 154533 [details]
bugzilla query memory profile

Perform memory profile on bugzilla for the following cases separately:
1) Open a new query, execute it and then delete it without any saving;
2) Create a new query, execute it and then delete the query.

In both case, related QueryTopComponent (which creates BugzillaQuery instance), BugzillaQuery (which creates QueryController), QueryController (which creates QueryPanel), QueryPanel and its containing attributes are not released.

The bugtracking module should release QueryTopComponent and also detect if the BugzillaQuery should be deleted. If it is not saved, then it should release the BugzillaQuery as well as other related objects (QueryController, Query Panel, QueryParameter etc)

For saved query, when it is removed, the bugtracking module should release corresponding BugzillaQuery and other related objects.
Comment 1 Tomas Stupka 2015-07-19 17:29:00 UTC
fixed in jet-main #ee362dffa0ea
Comment 2 Quality Engineering 2015-07-21 01:20:17 UTC
Integrated into 'main-silver', will be available in build *201507210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ee362dffa0ea
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #253374 - Memory leakage due as bugtracking module does not release some object such as QueryTopComponent
Comment 3 jijwang 2015-08-12 00:05:34 UTC
The fix did not seem to address test case 1). I still see QueryTopComponent in profiler's snapshot after running GC. The QueryTopComponent is allocated in org.netbeans.modules.bugtracking.ui.query.QueryAction.openQuery(). It is supposed to be deallocated in QueryAction.closeQuery() but I did not see that method is called. In the run() inside closeQuery(), it is also better to put tc = null after tc.close()
Comment 4 Tomas Stupka 2015-08-27 13:30:22 UTC
could not reproduce.

QueryAction holds no reference to QueryTopComponent, it merely opens it.
.closeQuery() is meant to close the TC for a specific query, not to deallocate.

if you have a profiler snapshot, please attach it to the issue