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 173914

Summary: AssertionError: BaseKit.install() incorrectly called from non-AWT thread.
Product: debugger Reporter: Jesse Glick <jglick>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: blocker CC: jtulach
Priority: P1 Keywords: REGRESSION, TEST, THREAD
Version: 6.x   
Hardware: All   
OS: All   
URL: http://deadlock.netbeans.org/hudson/job/trunk/6734/testReport/org.netbeans.test.ide/MemoryValidationTest/testGCDocuments/
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2009-10-06 21:23:47 UTC
Seems to be breaking commit validation:

SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.debugger.jpda.ui.CodeEvaluator$2
java.lang.AssertionError: BaseKit.install() incorrectly called from non-AWT thread.
	at org.netbeans.editor.BaseKit.install(BaseKit.java:750)
	at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:961)
	at org.netbeans.api.editor.DialogBinding.bind(DialogBinding.java:76)
	at org.netbeans.api.editor.DialogBinding.bindComponentToDocument(DialogBinding.java:71)
	at org.netbeans.modules.debugger.jpda.ui.WatchPanel.setupContext(WatchPanel.java:216)
	at org.netbeans.modules.debugger.jpda.ui.WatchPanel.setupContext(WatchPanel.java:133)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.setupContextLazily(CodeEvaluator.java:241)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.access$400(CodeEvaluator.java:103)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator$2.run(CodeEvaluator.java:220)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
	at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:655)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.setupContext(CodeEvaluator.java:225)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.access$2100(CodeEvaluator.java:103)
	at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator$15.run(CodeEvaluator.java:690)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at org.netbeans.jemmy.QueueTool$JemmyQueue.dispatchEvent(QueueTool.java:610)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jesse Glick 2009-10-06 21:31:19 UTC
main #8dde4fa8546a most likely responsible.
Comment 2 Martin Entlicher 2009-10-07 10:46:02 UTC
Right, http://hg.netbeans.org/main/rev/8dde4fa8546a is responsible.
Comment 3 Martin Entlicher 2009-10-07 13:19:00 UTC
It definitely did not cause the commit validation to fail.
Also in dev builds it does not print any error into messages.log...

Fixed in changeset:   148419:9acf737bf00f
http://hg.netbeans.org/main/rev/9acf737bf00f
Comment 4 Jesse Glick 2009-10-07 15:27:51 UTC
*** Issue 173949 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2009-10-07 17:08:22 UTC
I think this was indeed the cause of C/V failure. High priority uncaught exception/error -> exception dialog displayed
-> GUI components related to dialog hold on to state -> memory unreclaimed -> test failure.
Comment 6 Martin Entlicher 2009-10-07 19:44:16 UTC
Yes, you're right. But I think that it's really unfortunate that the original failure is masked with a GC test.
Comment 7 Jesse Glick 2009-10-07 19:51:21 UTC
We do actually have a facility to make a C/V test fail immediately (and more informatively) if there is an uncaught
exception reported to the logger. Last I recall it had to be turned off due to frequent but random exceptions from PHP.
Probably we could try again.
Comment 8 Jaroslav Tulach 2009-10-08 07:23:16 UTC
Go ahead. It is one simple NbModuleSuite.Configuration.failOnError call.
Comment 9 Quality Engineering 2009-10-09 23:05:13 UTC
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9acf737bf00f
User: mentlicher@netbeans.org
Log: #173914 - DialogBinding.bindComponentToDocument() must be called in AWT.
Comment 10 Quality Engineering 2009-10-15 10:19:57 UTC
Integrated into 'main-golden', will be available in build *200910150201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/106fb6aae477
User: Jesse Glick <jglick@netbeans.org>
Log: Mentioned in #173914: reenable C/V failures in case stack traces are printed or SEVERE messages printed.
Cannot currently fail on WARNING messages due to:
WARNING [org.netbeans.core.ui.warmup.DiagnosticTask]: Using netbeans.full.hack=true; see http://wiki.netbeans.org/DevFaqNetBeansFullHack
WARNING [org.netbeans.modules.project.ui.ProjectsRootNode]: Warning - project of class org.netbeans.test.ide.WatchProjects$1 in /space/src/nb/core-main/java.kit/build/test/qa-functional/work/userdir0/config failed to supply a LogicalViewProvider in its lookup