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 174121 - Memory leaks when navigator panel is visible
Summary: Memory leaks when navigator panel is visible
Status: RESOLVED WORKSFORME
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrew Korostelev
URL: http://javafx-jira.kenai.com/browse/R...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-08 16:20 UTC by Lukas Hasik
Modified: 2009-10-30 14:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2009-10-08 16:20:33 UTC
When the Navigator panel is open FXDComposer leaks memory and some (large) graphics cannot be opened twice. Workaround
is to close the Navigator panel before fxz file is opened.

Problem is caused by the fact, that the FXDNavigator component keeps the references to FXZEditorSupport objects and
whole DocumentElement tree after fxz file is close and is longer visible. It standard behaviour since the navigator
should show the content of document even if the document is closed. However the references on the FXZDataObject has been
reset in the FXZDataObject.reset() method and because of that the when the fxz document is reopened again these objects
are not reused but created again.

Either the reset must be done when document is not visible both in view and navigator, or the large objects (like
FXZEditorSupport, etc) should be linked via WeakReference so that it would be GCed.

Another problem is thet FXZEditorSupport gets created again during document close since, some calls during document
shutdown requests some objects provided by it. The removal of such object should be scheduled when framework is done
with them so that they are not created again in vain.
Comment 1 Andrew Korostelev 2009-10-30 14:45:37 UTC
can't reproduce this issue in NB 6.8 build from 29.10.2009
I start netbeans with different Xmx option values (e.g. -J-Xmx100m ) and try to open/reopen large fxz files.
OOM is thrown on the first attempt (with too small Xmx value) or is not thrown even after reopening.

It seems there were changes in navigator behavior that doesn't allow to reproduce this issue.