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 160784

Summary: Renaming C/C++ project and its folder delete all the files
Product: projects Reporter: jack_z <jack_z>
Component: Generic Projects UIAssignee: Jiri Skrivanek <jskrivanek>
Status: VERIFIED FIXED    
Severity: blocker CC: anebuzelsky, issues, mmirilovic
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: The log file required

Description jack_z 2009-03-21 08:17:59 UTC
Hi there,

I'm developing a highly important project with NetBeans IDE. But the bug just happened frustrated me...

When I was trying rename the project and and the folder the project living in (by checking off Also Rename the project 
folder), an error message about something "null" poped out. And immediately I found NetBeans had deleted all the files 
and subfolders in the project folder... I could not even recover those files/subfolders by recovery software...

I tried to repeat the error on a toy project, but the error did not happen again. 

At this point, I would highly appreciate any help from you to get my project files back and find out the cause of the 
bug.

Thank you very much!

Jack
Comment 1 Marian Mirilovic 2009-03-23 09:57:06 UTC
Hi jack_z, 
thanks for your report. We need more informations to find a solution/fix for your problem, so please attach
${netbeans.userdir}/var/log/messages.log to this issue. Thanks in advance.
Comment 2 Leonid Lenyashin 2009-03-23 10:04:40 UTC
Sasha,

Since it is a P1 a give it to you for now, while it is a night time in US. If it is not fixed until US morning, then
feel free to hand it over to Thomas.

Leonid.
Comment 3 jack_z 2009-03-23 10:18:29 UTC
Created attachment 78623 [details]
The log file required
Comment 4 jack_z 2009-03-23 10:22:13 UTC
Hi all,

Thanks for your time and effort on this issue.

Just one more thing... I have used NetBeans on several different other projects since this issue happened.

So I'm not quite sure whether the log file attached still keeps the useful info for that issue...
Comment 5 Alexander Simon 2009-03-23 12:56:57 UTC
CND uses a default rename action.
Rename implementation is:
org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementation.doMoveProject()
By the way I do not see a attempt to compare (or read) moved files before deletion.

Comment 6 Antonin Nebuzelsky 2009-03-23 14:51:33 UTC
Reassigning to jskrivanek for evaluation.
Comment 7 Jiri Skrivanek 2009-03-24 11:41:56 UTC
I fixed problems with shared access as read in the log file. But I am not sure whether it is a root problem. Original
project is removed only if copying is OK. So I wonder how it could happen. Only idea is that renamed project was somehow
created inside the original one and both were removed. But this is not possible to achieve from UI. I would need steps
how to reproduce it to be able to find out what's wrong.

http://hg.netbeans.org/core-main/rev/a5addb20f14b
Comment 8 Quality Engineering 2009-03-25 21:21:46 UTC
Integrated into 'main-golden', will be available in build *200903251400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a5addb20f14b
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #160784 - Charset is not removed from cache by concurrent thread. It is removed when all stop using the cache.
Comment 9 martinhavle 2009-04-03 14:50:09 UTC
I tried to reproduce the error few times and imho it should be fixed, therefore I am changing the state of the issue to
VERIFIED. 

jack_z, please migrate to the latest build and if the error occurs again (which shouldn't), juat reopen the issue.