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 96153 - NullPointerException appears when user delete unsaved file
Summary: NullPointerException appears when user delete unsaved file
Status: CLOSED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 13:46 UTC by soldatov
Modified: 2007-08-06 17:11 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 2007-02-21 13:46:10 UTC
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)
Comment 1 Thomas Preisler 2007-02-28 05:00:44 UTC
I cannot reproduce this one. Please reopen with exact steps if problem still exists.
Comment 2 Thomas Preisler 2007-02-28 05:01:08 UTC
I cannot reproduce this one. Please reopen with exact steps if problem still exists.
Comment 3 soldatov 2007-02-28 07:50:53 UTC
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
Comment 4 Thomas Preisler 2007-02-28 20:15:57 UTC
No, still cannot reproduce. I will investigate further. Which platform are you on?
Comment 5 soldatov 2007-03-01 07:58:25 UTC
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
---------------------------------------------------------------------------
Comment 6 Thomas Preisler 2007-03-01 18:54:57 UTC
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.
Comment 7 Thomas Preisler 2007-03-01 19:41:14 UTC
Fixed.
Comment 8 Maria Tishkova 2007-08-06 17:11:42 UTC
verified in build 5.5.1u1