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 56783 - Cannot create project with name of already closed and deleted project
Summary: Cannot create project with name of already closed and deleted project
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: RANDOM
: 56080 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-22 10:23 UTC by Milan Kubec
Modified: 2006-03-24 13:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc stack trace (12.89 KB, text/plain)
2005-03-22 10:23 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-03-22 10:23:05 UTC
[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.
Comment 1 Milan Kubec 2005-03-22 10:23:26 UTC
Created attachment 21024 [details]
exc stack trace
Comment 2 Milan Kubec 2005-03-22 10:26:59 UTC
I think it might be duplicate of #56080.
Comment 3 Jesse Glick 2005-03-25 10:44:37 UTC
Only dupe of first part of #56080, not the latter exception.
Comment 4 Tomas Zezula 2005-03-25 12:48:01 UTC
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.
Comment 5 Jesse Glick 2005-03-28 18:51:53 UTC
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.
Comment 6 Milan Kubec 2005-03-29 06:43:57 UTC
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.
Comment 7 Tomas Zezula 2005-03-29 06:50:17 UTC
I will try to look at it in the OptimizeIt today. But still think it's a P3 bug.
Comment 8 Tomas Zezula 2005-03-29 12:11:57 UTC
The problem is that the event about folder deletion sometimes comes later then
the request for creation of new project. The issue is RANDOM.
Comment 9 Tomas Zezula 2005-03-29 15:20:35 UTC
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
Comment 10 Milan Kubec 2005-03-30 07:07:16 UTC
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?
Comment 11 Tomas Zezula 2005-03-30 07:22:25 UTC
It is random. It didn't happend to me sometimes while I was trying it,
especially while running under debugger.
Comment 12 Tomas Zezula 2005-03-30 07:23:53 UTC
I've talked about it with Radek by email. He is trying to find out why the
FS.refresh () does not work.
Comment 13 Tomas Zezula 2005-04-04 10:07:49 UTC
*** Issue 56080 has been marked as a duplicate of this issue. ***
Comment 14 Milan Kubec 2005-07-08 12:36:07 UTC
Not able to reproduce in dev-200507061800.