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.
Steps: - Create C/C++ Applicaton project - Add "C++ Main file..." into 'Source Folder' dir - Modify file - Delete file from project without save ==> NullPointerException appears java.lang.NullPointerException at org.netbeans.modules.cnd.makeproject.api.configurations.Item.getMakeConfigurationDescriptor(Item.java:253) at org.netbeans.modules.cnd.makeproject.api.configurations.Item.getMakeConfiguration(Item.java:257) at org.netbeans.modules.cnd.makeproject.api.configurations.Item.getLanguage(Item.java:358) at org.netbeans.modules.cnd.modelimpl.csm.core.ProjectImpl.onFileEditEnd(ProjectImpl.java:123) at org.netbeans.modules.cnd.modelimpl.platform.ModelSupport$FileChangeListener.stateChanged(ModelSupport.java:516) at org.openide.loaders.DataObject$ModifiedRegistry.fireChangeEvent(DataObject.java:1072) at org.openide.loaders.DataObject$ModifiedRegistry.remove(DataObject.java:1056) at java.util.Collections$SynchronizedCollection.remove(Collections.java:1584) at org.openide.loaders.DataObject.setModified(DataObject.java:415) at org.openide.text.DataEditorSupport$Env.unmarkModified(DataEditorSupport.java:556) at org.openide.windows.CloneableOpenSupport$Listener.run(CloneableOpenSupport.java:321) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
I cannot reproduce this one. Please reopen with exact steps if problem still exists.
More detailed scenario: - Push File|New Project... menu item - Select 'C/C++ Development' category and 'C/C++ Application' project type - Press 'Next' button - Press 'Finish' button - Select 'Source Files' logical folder in 'Projects' tab - Call context menu and select 'New|Main C++ File...' menu item - Press 'Finish' button in 'New Main C++ File' window - Add '//' string into 9th line - Select 'newmain.cc' file in 'Projects' tab - Call context menu and select 'Delete' menu item - Press 'Yes' button in 'Confirm Object Deletion' window ==> NullPointerException appears
No, still cannot reproduce. I will investigate further. Which platform are you on?
intel-Linux (JDS 3) and amd64-S2 (SunOS 5.10) --------------------------------------------------------------------------- Product Version = NetBeans IDE 5.5.1 Beta (Build 200702211400) Operating System = Linux version 2.6.5-7.97-default running on i386 Java; VM; Vendor; Home = 1.5.0_08; Java HotSpot(TM) Client VM 1.5.0_08-b03; Sun Microsystems Inc.; /usr/java/j2sdk1.5.0_08/jre System Locale; Encoding = en_US (nb); UTF-8 Home Dir.; Current Dir. = /home/vs157455; /home/vs157455/Desktop Installation; User Dir. = /opt/netbeans-5.5.1beta/nb5.5:/opt/netbeans-5.5.1beta/ide7:/opt/netbeans-5.5.1beta/enterprise3:/opt/netbeans-5.5.1beta/harness:/opt/netbeans-5.5.1beta/cnd1:/opt/netbeans-5.5.1beta/platform6; /tmp/sova ---------------------------------------------------------------------------
OK, I can reproduce it now and I also see what is wrong. CodeModel is requesting the language on an item that is in the middel of being deleted and no longer has a folder assiciated with it.
Fixed.
verified in build 5.5.1u1