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 231254

Summary: OutOfMemoryError in org.openide.explorer.view.TreeViewTest
Product: platform Reporter: Martin Entlicher <mentlicher>
Component: ExplorerAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal Keywords: TEST
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Linux   
URL: http://deadlock.netbeans.org/hudson/job/NB-Core-Build/10350/consoleText
Issue Type: DEFECT Exception Reporter:
Attachments: Console text
Console text, failure of build #10429.

Description Martin Entlicher 2013-06-14 07:44:32 UTC
All invokeAndWait() calls can not be finished, because threads "AWT-XAWT" and "AWT-EventQueue-0" are interrupted with OutOfMemoryError.
Comment 1 Martin Entlicher 2013-06-14 07:47:43 UTC
Created attachment 135787 [details]
Console text
Comment 2 Jan Peska 2013-06-17 13:33:18 UTC
(In reply to comment #0)
> All invokeAndWait() calls can not be finished, because threads "AWT-XAWT" and
> "AWT-EventQueue-0" are interrupted with OutOfMemoryError.

Unfortunately I'm not able to reproduce it locally so it is hard to determine what causes the OutOfMemoryError because I can't find anything suspicious in these tests. I'll reopen this issue if it occurs again.
Comment 3 Martin Entlicher 2013-06-26 11:53:18 UTC
As Jaroslav Tulach pointed out at https://netbeans.org/projects/platform/lists/core-commits/archive/2013-06/message/265 the OOME might be related to assertGC() calls.
Comment 4 Martin Entlicher 2013-06-27 11:03:12 UTC
Created attachment 136396 [details]
Console text, failure of build #10429.

There are similar failures of BeanTreeViewTest. See http://deadlock.netbeans.org/hudson/job/NB-Core-Build/10429/testReport/ or the attached console output.
Comment 5 Martin Entlicher 2013-06-27 11:05:34 UTC
I have one wild idea - try to block AWT during assertGC so that OutOfMemoryError can not occur in AWT-EventQueue-0 thread.
Comment 6 Martin Entlicher 2013-06-27 15:57:31 UTC
I've tried to fix it by blocking of AWT thread during the GC checks:
changeset:   257629:78e6da76d2fd
http://hg.netbeans.org/core-main/rev/78e6da76d2fd
Comment 7 Quality Engineering 2013-07-01 15:57:43 UTC
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/78e6da76d2fd
User: mentlicher@netbeans.org
Log: #231254: Solve OutOfMemoryError occuring in AWT-EventQueue-0 thread by suspension of AWT thread during GC checks.