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 255297

Summary: NullPointerException at javax.swing.JLabel.setIcon
Product: platform Reporter: PolesApart
Component: ExplorerAssignee: Jan Peska <JPESKA>
Status: RESOLVED INCOMPLETE    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 212884
Attachments: stacktrace

Description PolesApart 2015-09-15 13:05:17 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: OpenJDK 64-Bit Server VM, 25.66-b01, OpenJDK Runtime Environment, 1.8.0_66-internal-b01
OS: Linux

User Comments:
PolesApart: Refactoring a C++ method.

GUEST: JPA???????????????




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.JLabel.setIcon(JLabel.java:406)
   at org.openide.explorer.view.NodeRenderer.configureFrom(NodeRenderer.java:231)
   at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:147)
   at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807)
   at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492)
   at javax.swing.tree.FixedHeightLayoutCache.getBounds(FixedHeightLayoutCache.java:553)
Comment 1 PolesApart 2015-09-15 13:05:19 UTC
Created attachment 156185 [details]
stacktrace
Comment 2 Ondrej Vrabec 2015-09-15 14:27:39 UTC
Please reopen if reproducible with official Oracle JDK, not with OpenJDK
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Comment 3 Ondrej Vrabec 2015-09-15 14:39:40 UTC
On second thought this looks as a concurrent access to swing components outside of AWT, let's add an assert for AWT thread access only after release.
Comment 4 Ondrej Vrabec 2015-10-16 13:25:25 UTC
adding an assert

fix: http://hg.netbeans.org/core-main/rev/3c7c59233c13
Comment 5 Quality Engineering 2015-10-17 02:01:01 UTC
Integrated into 'main-silver', will be available in build *201510170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/3c7c59233c13
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #255297 - NullPointerException at javax.swing.JLabel.setIcon
Add EDT assert.
Comment 6 Ondrej Vrabec 2015-11-09 09:46:21 UTC
fix: http://hg.netbeans.org/core-main/rev/9eec1ed979da
Comment 7 Quality Engineering 2015-11-10 02:32:05 UTC
Integrated into 'main-silver', will be available in build *201511100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/9eec1ed979da
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #255297 - NullPointerException at javax.swing.JLabel.setIcon
White-list TreeView.constructor from the callers.

Lot of calls is coming from TreeView constructor, when new instance of NodeRenderer is just created
along with its internal renderers. This does not look like the problematic call we're hunting.