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 178592 - MemoryValidationTest.testGCDocuments failure
Summary: MemoryValidationTest.testGCDocuments failure
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: TEST
Depends on:
Blocks: 178071
  Show dependency tree
 
Reported: 2009-12-14 06:45 UTC by David Strupl
Modified: 2010-02-03 21:47 UTC (History)
2 users (show)

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 David Strupl 2009-12-14 06:45:01 UTC
This is a spinoff for one half of the problem reported in Bug 178071.

testGCDocuments:

Caused by: junit.framework.AssertionFailedError: Are all documents GCed?
TextDocument:
static java.util.Vector sun.awt.motif.MFramePeer.allFrames->
java.util.Vector@196444d-elementData->
[Ljava.lang.Object;@2d119d-[0]->
sun.awt.motif.MFramePeer@1ea2c7-target->
org.netbeans.core.windows.view.ui.MainWindow@8a6465-dispatcher->
java.awt.LightweightDispatcher@17f1fcb-mouseEventTarget->
org.openide.text.QuietEditorPane@a013f6-model->
org.netbeans.modules.editor.NbEditorDocument@141f799

If the problem is not in winsys (or test itself) please re-assign to Text subcomponent/owner Marek.
Comment 1 Stanislav Aubrecht 2009-12-14 07:33:30 UTC
looks like a bug in the test, sun.awt.motif.MFramePeer.allFrames should be cleared.
reassigning to the author of the test for evaluation
Comment 2 Jesse Glick 2009-12-14 09:00:20 UTC
I guess P2 after hotfix in 94e7c9950c88.
Comment 3 Jesse Glick 2009-12-16 12:56:47 UTC
Why should allFrames be cleared? It is a potential source of actual memory leaks. In this case, what is held is simply the NB main window, which is certainly not about to be GC'd. cleanWellKnownStaticFields seems to be used only for references which you would expect normal GUI activity to change quickly.

Possibly the test should be clearing the mouseEventTarget, and perhaps other Component-typed fields, in the LightweightDispatcher for each native window. Probably best for someone from window system to confirm this and test it.
Comment 4 Stanislav Aubrecht 2010-02-03 06:57:31 UTC
i modified the test to clear 'dispatcher' field in opened Frames and testGCDocuments passed on my laptop

core-main 890a92acb3ca
Comment 5 Quality Engineering 2010-02-03 21:47:03 UTC
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/890a92acb3ca
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #178592 - clear 'dispatcher' field in opened Frames to remove potential references to editor windows