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 201423

Summary: Project meta data can be lost
Product: cnd Reporter: Alexander Simon <alexvsimon>
Component: ProjectAssignee: Alexander Simon <alexvsimon>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description Alexander Simon 2011-08-30 07:52:37 UTC
Some times project meta data of full remote project is broken.
Symptoms:
- nbproject/configurations.xml is empty or written partly.
- mirror of nbproject/configurations.xml is OK.
- after restarting IDE project is broken.

Root cause of such behavior is double closing of SmartOutputStream.
At first closing the class copy temporary local file to remote file object and delete temporary file.
At second closing SmartOutputStream counts check sum again and can decides to copy file again (because we have a races and check sum can be performed on partly written remote file). Second writing results in empty nbproject/configurations.xml because temporary file have been deleted.
Comment 1 Alexander Simon 2011-08-30 08:05:18 UTC
Probably remote file system has synchronization problem.
Comment 2 Alexander Simon 2011-08-30 08:13:32 UTC
fixed double closing/writing of remote file object, change set:
http://hg.netbeans.org/cnd-main/rev/b10ccc1c7410
Comment 3 Alexander Simon 2011-08-30 16:42:32 UTC
fix i18n in change set:
6f85d1bf46c1
Comment 4 Vladimir Voskresensky 2011-09-09 14:30:50 UTC
patch candidates are P2s
Comment 5 Vladimir Kvashin 2011-09-12 10:54:08 UTC
I reviewed the fix. It is correct and safe enough.
Comment 6 Alexander Simon 2011-09-13 07:02:48 UTC
transplanted in releases_elif branch release701_fixes
b10ccc1c7410 transplanted to c72db5048f56
6f85d1bf46c1 transplanted to a68751a3f6f4
Comment 7 Alexander Pepin 2011-09-20 14:25:27 UTC
can not reproduce in OSS build 30
Comment 8 Alexander Pepin 2011-09-27 12:05:18 UTC
can not reproduce in OSS dev build based on 7.0.1 patch2