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 140518 - Regession: NPE appears when gui tests opens 'Options' tab
Summary: Regession: NPE appears when gui tests opens 'Options' tab
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sergey Grinev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 13:42 UTC by soldatov
Modified: 2008-07-28 21:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2008-07-17 13:42:31 UTC
Scenario:
1) Push 'Tools|Options' menu item
2) Click on 'C/C++' icon
3) Open 'Formatting Style' tab
4) Press 'Ok' button
5) Repeat 1-4 steps 5-10 times
==> NPE
java.lang.NullPointerException
	at org.netbeans.modules.cnd.makeproject.ui.options.ParserSettingsPanel.updateTabs(ParserSettingsPanel.java:156)
	at
org.netbeans.modules.cnd.makeproject.ui.options.ParserSettingsPanel.updateCompilerCollections(ParserSettingsPanel.java:151)
	at org.netbeans.modules.cnd.makeproject.ui.options.ParserSettingsPanel.stateChanged(ParserSettingsPanel.java:205)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel.fireCompilerSetChange(ToolsPanel.java:765)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel.changeCompilerSet(ToolsPanel.java:525)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel.valueChanged(ToolsPanel.java:889)
	at javax.swing.JList.fireSelectionValueChanged(JList.java:1765)
	at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1779)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:147)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:194)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:388)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:398)
	at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:442)
	at javax.swing.JList.setSelectedIndex(JList.java:2179)
	at javax.swing.JList.setSelectedValue(JList.java:2295)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel.realUpdate(ToolsPanel.java:459)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel.access$000(ToolsPanel.java:97)
	at org.netbeans.modules.cnd.ui.options.ToolsPanel$1.run(ToolsPanel.java:412)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 Thomas Preisler 2008-07-17 16:25:09 UTC
Mot likely a regression caused by remote development changes.
Comment 2 Thomas Preisler 2008-07-19 00:06:39 UTC
The NPE could happen if serverList lookup returns null in ParserSettingsPanel.java:124:

124 ServerList serverList = (ServerList) Lookup.getDefault().lookup(ServerList.class);

Are there a timing issue and a possible race condition? Assigning to Sergey for further evaluation.
Comment 3 Sergey Grinev 2008-07-21 16:13:35 UTC
fixed by http://hg.netbeans.org/main/rev/dbbcf40f0d81