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 256289

Summary: AssertionError: Should be called in EDT only!
Product: platform Reporter: misterm <misterm>
Component: TemplatesAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal CC: misterm, ovrabec, twolf2919
Priority: P2    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 220670
Attachments: stacktrace
stacktrace

Description misterm 2015-10-31 08:04:34 UTC
Build: NetBeans IDE Dev (Build 20151002-3d4c315fd13b)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.66-b17, Java(TM) SE Runtime Environment, 1.8.0_66-b17
OS: Windows 8.1

User Comments:
GUEST: I went into Tools > Templates.. And this error occurred.

GUEST: Tools > Templates

GUEST: ...

GUEST: 1

misterm: .

twolf2919: I simply clicked on "Tools->Templates" and this occured

misterm: Tools -> templates




Stacktrace: 
java.lang.AssertionError: Should be called in EDT only!
   at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:140)
   at org.openide.explorer.view.TreeView.initializeTree(TreeView.java:328)
   at org.openide.explorer.view.TreeView.<init>(TreeView.java:252)
   at org.openide.explorer.view.TreeView.<init>(TreeView.java:242)
   at org.openide.explorer.view.BeanTreeView.<init>(BeanTreeView.java:98)
   at org.netbeans.modules.templates.ui.TemplatesPanel$TemplateTreeView.<init>(TemplatesPanel.java:201)
Comment 1 misterm 2015-10-31 08:04:36 UTC
Created attachment 157077 [details]
stacktrace
Comment 2 misterm 2015-10-31 08:09:59 UTC
Created attachment 157078 [details]
stacktrace

.
Comment 3 Ondrej Vrabec 2015-11-01 16:05:50 UTC
Martine, could you switch TemplatesAction to run in EDT? It does a lot of swing stuff but runs in a RP.
Comment 4 Martin Entlicher 2015-11-01 18:21:23 UTC
Agreed, the Swing code must run in EDT.
This action seems to be asynchronous by a mistake.
Comment 5 Martin Entlicher 2015-11-02 10:51:51 UTC
The action is unusable => P2 at least.
Comment 6 Martin Entlicher 2015-11-02 11:01:55 UTC
Fixed by changeset:   293397:462935f9d0ef
http://hg.netbeans.org/core-main/rev/462935f9d0ef
Comment 7 Quality Engineering 2015-11-03 02:27:24 UTC
Integrated into 'main-silver', will be available in build *201511030002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/462935f9d0ef
User: mentlicher@netbeans.org
Log: #256289: Make the Templates action synchronous, since it's initializing a lot of GUI.