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 193164 - [70cat] AssertionError at org.netbeans.modules.cnd.makeproject.api.configurations.VectorConfiguration.setValue
Summary: [70cat] AssertionError at org.netbeans.modules.cnd.makeproject.api.configurat...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 15:14 UTC by swpalmer
Modified: 2010-12-11 06:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 174868


Attachments
stacktrace (6.03 KB, text/plain)
2010-12-09 15:14 UTC, swpalmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description swpalmer 2010-12-09 15:14:40 UTC
Build: NetBeans IDE Dev (Build 201012060001)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03-307, Java(TM) SE Runtime Environment, 1.6.0_22-b04-307-10M3261
OS: Mac OS X

User Comments:
swpalmer: C:/C++
Project properties
Build/C
 All configurations
 browse to add Include paths (had <Different values>)
 Cancel
-- CRASH ---




Stacktrace: 
java.lang.AssertionError
   at org.netbeans.modules.cnd.makeproject.api.configurations.VectorConfiguration.setValue(VectorConfiguration.java:79)
   at org.netbeans.modules.cnd.makeproject.configurations.ui.VectorNodeProp.setValue(VectorNodeProp.java:94)
   at org.netbeans.modules.cnd.makeproject.configurations.ui.VectorNodeProp.setValue(VectorNodeProp.java:60)
   at org.openide.explorer.propertysheet.ProxyNode$ProxyProperty.setValue(ProxyNode.java:413)
   at org.openide.explorer.propertysheet.NodePropertyModel.setValue(NodePropertyModel.java:113)
   at org.openide.explorer.propertysheet.PropertyDialogManager.cancelValue(PropertyDialogManager.java:443)
Comment 1 swpalmer 2010-12-09 15:14:44 UTC
Created attachment 103873 [details]
stacktrace
Comment 2 Thomas Preisler 2010-12-09 22:51:46 UTC
can reproduce with 6.9.1 but getting a different stack trace:


java.lang.NullPointerException
        at java.util.ArrayList.addAll(ArrayList.java:472)
        at org.netbeans.modules.cnd.makeproject.configurations.ui.VectorNodeProp.getPropertyEditor(VectorNodeProp.java:115)
        at org.openide.explorer.propertysheet.ProxyNode$ProxyProperty.getPropertyEditor(ProxyNode.java:481)
        at org.openide.explorer.propertysheet.PropUtils.getPropertyEditor(PropUtils.java:821)
        at org.openide.explorer.propertysheet.PropUtils.getPropertyEditor(PropUtils.java:806)
        at org.openide.explorer.propertysheet.SheetTable.onCustomEditorButton(SheetTable.java:846)
        at org.openide.explorer.propertysheet.SheetTable.processMouseEvent(SheetTable.java:709)
        at java.awt.Component.processEvent(Component.java:6117)
        at java.awt.Container.processEvent(Container.java:2085)
        at java.awt.Component.dispatchEventImpl(Component.java:4714)
Comment 3 Thomas Preisler 2010-12-09 23:12:05 UTC
What happens in case of editing All Configurations:

Property system saves old value and restores it in case of cancel:

When editing multiple properties with different values, there is no one good old value and it is set to null. When you cancel, the property systems 'restores' the old value (which is null) and VectorConfiguration attemted to write null back to the value . It didn't check for null.

In case of a single value property, the restore never ends up in a set command because old and current value are the same.

Fixed by checking for null and just returning.
Comment 4 Thomas Preisler 2010-12-09 23:14:08 UTC
changeset:   184563:aa8dcc09e08e
tag:         tip
user:        Thomas Preisler <thp@netbeans.org>
date:        Thu Dec 09 15:13:35 2010 -0800
summary:     #193164 - [70cat] AssertionError at org.netbeans.modules.cnd.makeproject.api.configurations.VectorConfiguration.setValue
Comment 5 Quality Engineering 2010-12-11 06:35:14 UTC
Integrated into 'main-golden', will be available in build *201012110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/aa8dcc09e08e
User: Thomas Preisler <thp@netbeans.org>
Log: #193164 - [70cat] AssertionError at org.netbeans.modules.cnd.makeproject.api.configurations.VectorConfiguration.setValue