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 262200 - NullPointerException at javax.swing.JLabel.setIcon
Summary: NullPointerException at javax.swing.JLabel.setIcon
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 07:40 UTC by sviatopolk
Modified: 2016-07-21 01:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 224182


Attachments
stacktrace (3.78 KB, text/plain)
2016-05-24 07:40 UTC, sviatopolk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sviatopolk 2016-05-24 07:40:07 UTC
Build: NetBeans IDE Dev (Build 201605230002)
VM: OpenJDK 64-Bit Server VM, 25.91-b14, OpenJDK Runtime Environment, 1.8.0_91-8u91-b14-2-b14
OS: Linux

User Comments:
sviatopolk: This error just came forth when starting the IDE with several projects and a dozen or two (PHP) files opened.




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.JLabel.setIcon(JLabel.java:406)
   at org.netbeans.core.multitabs.impl.TabDataRenderer.getPreferredWidth(TabDataRenderer.java:169)
   at org.netbeans.core.multitabs.impl.TabTable.adjustColumnWidths(TabTable.java:176)
   at org.netbeans.core.multitabs.impl.TabTable$1.tableChanged(TabTable.java:85)
   at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
   at javax.swing.table.AbstractTableModel.fireTableDataChanged(AbstractTableModel.java:198)
Comment 1 sviatopolk 2016-05-24 07:40:08 UTC
Created attachment 159854 [details]
stacktrace
Comment 2 Martin Entlicher 2016-07-19 16:45:27 UTC
When run in a single AWT thread, this NPE can not happen at that location (http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/f8725698a870/src/share/classes/javax/swing/JLabel.java)
There was some asynchronous thread, which set the icon to null.
clear() must not be called in a non-event thread:
changeset:   299409:2d56b865928e
http://hg.netbeans.org/core-main/rev/2d56b865928e
Comment 3 Quality Engineering 2016-07-21 01:52:22 UTC
Integrated into 'main-silver', will be available in build *201607210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2d56b865928e
User: mentlicher@netbeans.org
Log: #262200: Assert that clearing is done in AWT to prevent from race conditions.