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 47436

Summary: Cannot create project with the same name after project delete
Product: projects Reporter: Milan Kubec <mkubec>
Component: AntAssignee: Jesse Glick <jglick>
Status: CLOSED FIXED    
Severity: blocker Keywords: REGRESSION
Priority: P2    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    
Attachments: exc stack trace in console
exc in IDE dialog
exc stack trace

Description Milan Kubec 2004-08-19 09:11:50 UTC
[beta 1 candidate 200408181510, JDK 1.5.0 b63]

Steps to reproduce:
1) Have a java project
2) Close the project in IDE
3) Delete the project from disk
4) Return to IDE
AssertionError is thrown to console, see attachment.
5) Create project with the same name
AssertionError (FileNotFoundException) is thrown
again, in this case not to console. The project is
not created.
Comment 1 Milan Kubec 2004-08-19 09:12:18 UTC
Created attachment 16937 [details]
exc stack trace in console
Comment 2 Milan Kubec 2004-08-19 09:12:52 UTC
Created attachment 16938 [details]
exc in IDE dialog
Comment 3 Milan Kubec 2004-08-19 09:21:15 UTC
Also exception is thrown when I hit F6 to run another just opened project.
Comment 4 Milan Kubec 2004-08-19 09:21:39 UTC
Created attachment 16939 [details]
exc stack trace
Comment 5 Petr Hrebejk 2004-08-20 11:18:26 UTC
I suspect the LogicalViewChildren to get some events from
SourcesHeleper even after the project is closed (it of course does not
matter until someone deleted all the files). When the files are
deleted the SourceHeleper fires a change and LogicalViewChildren try
to react. The children would have to know that the project was closed
(GC may be too late). Listen to OpenProjects in projectuiapi?
Comment 6 Jesse Glick 2004-08-20 17:08:36 UTC
Probably some easier solution in SourcesHelper.
Comment 7 Jesse Glick 2004-08-20 21:21:47 UTC
Can reproduce. Have simple patch which seems to correct it.
Comment 8 Jesse Glick 2004-08-20 22:51:16 UTC
Should have fixed it, please verify on your machine to make sure.

committed     Up-To-Date  1.8        
ant/project/src/org/netbeans/spi/project/support/ant/SourcesHelper.java
Comment 9 Milan Kubec 2004-08-23 15:52:27 UTC
*** Issue 47662 has been marked as a duplicate of this issue. ***
Comment 10 Milan Kubec 2004-08-26 14:17:28 UTC
Verified in custom 20040826.