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.
[dev-200503211900, JDK 1.5.0_02] 1) Create Java Application project 2) Close the project 3) Delete the project from disk outside of IDE 4) Try to create project with the same name in the same folder After pressing Finish in New Project Wizard you get IllegalArgumentException.
Created attachment 21024 [details] exc stack trace
I think it might be duplicate of #56080.
Only dupe of first part of #56080, not the latter exception.
This is probably not j2seproject issue. It seems as a ProjectManager issue. The projec directory was deleted, so the ProjectManager should remove the corresponding project from cache. I can add the following workaround into the j2seproject: In the new project wizard I will create the project folder and use FOQ to find if there is a project owning the directory. If so I would forbit user to use this directory. Not nice, but may work. Should I do it? I am not sure if it is really P2.
ProjectManager does not hold a Project ref if the FileObject for its folder is deleted, so there is probably a memory leak somewhere. Who knows where the bug actually is. Might need to use a heap debugger or something. Anyway I don't think this is P2 either.
This workflow I've described is very common for newbie users when they create a project, try something and then after figuring out what's going on they delete the project and create new one (correct one) with the same name. I've seen already couple reports like this. And your sentence: "... so there is probably a memory leak somewhere. Who knows where the bug actually is. Might need to use a heap debugger or something." is scaring for me enough to mark this issue as P2. Moreover I think it's regression. And also there is issue #53365 that might be related to this problem. Increasing prio again to P2, since I think that such issue should be fixed in 4.1 FCS.
I will try to look at it in the OptimizeIt today. But still think it's a P3 bug.
The problem is that the event about folder deletion sometimes comes later then the request for creation of new project. The issue is RANDOM.
The actual problem is that the FS does not fire fileDeleted () when refresh is called on FS. Redek will take a look at it. The fix uses FO.refresh () rather then FS.refresh () Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java,v <-- J2SEProjectGenerator.java new revision: 1.38; previous revision: 1.37 done
This issue is not random from users point of view, I can reproduce it whenever I try it. Does Radek know about this issue or better is there any other issue filed for him?
It is random. It didn't happend to me sometimes while I was trying it, especially while running under debugger.
I've talked about it with Radek by email. He is trying to find out why the FS.refresh () does not work.
*** Issue 56080 has been marked as a duplicate of this issue. ***
Not able to reproduce in dev-200507061800.