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 136392

Summary: NPE when trying to open a non-existent project
Product: projects Reporter: Kirill Sorokin <ksorokin>
Component: Ant ProjectAssignee: Milos Kleint <mkleint>
Status: RESOLVED INVALID    
Severity: blocker CC: mkozeny
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Stack trace
Stack trace (FileStateInvalidException)

Description Kirill Sorokin 2008-06-03 15:52:21 UTC
Steps to reproduce:

1) Create a Java Application project (it does not really depend on the project type)
2) Close the project
3) Open the project (this is needed in order to make the Open Project dialog be in the correct directory when invoked
next time)
4) Close the project
5) Switch to the file system and erase the project's files, but not the project's directory
6) Invoke the Open Project dialog

Note that the (now non-existent) project's directory is marked as being a project. If you try to open it, an NPE will
occur (attached).
Comment 1 Kirill Sorokin 2008-06-03 15:53:02 UTC
Created attachment 62322 [details]
Stack trace
Comment 2 Kirill Sorokin 2008-06-03 15:55:43 UTC
Also, under slightly different circumstances I got a FileStateInvalidException at the very moment the Open project
dialog is displayed at step 6 (also attached).
Comment 3 Kirill Sorokin 2008-06-03 15:56:14 UTC
Created attachment 62323 [details]
Stack trace (FileStateInvalidException)
Comment 4 Peter Pis 2008-06-04 07:00:56 UTC
Reassigning to "projects" for evaluation.
Comment 5 Milos Kleint 2008-06-04 07:14:17 UTC
why are we having such obscure scenarios as P2s? I would argue that deleting your project (be it from the IDE or outside
of it) is not what general public is doing on daily basis. 

the first exception is from ant projects, the second one from gsf.
Comment 6 Antonin Nebuzelsky 2010-03-29 14:10:38 UTC
Change of default owner.
Comment 7 Martin Kozeny 2013-08-21 12:26:15 UTC
Now you are unable to open nonexistent project when missing project metadata. closing as INVALID.