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 186648 - netbeans can corrupt project files (nbproject/*)
Summary: netbeans can corrupt project files (nbproject/*)
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 10:16 UTC by Alexey Vladykin
Modified: 2014-04-14 14:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Vladykin 2010-05-25 10:16:29 UTC
Yesterday I accidentally corrupted my project's configurations.xml by killing NetBeans while it was rewriting that file. NB should be more careful about writing those files in nbproject/. It should write a new version to a new file, e.g. configurations.xml.new, and if writing succeeds then rename configurations.xml.new file to configurations.xml.

The same applies to all files under nbproject: Makefile-*.mk, Package-*.bash, qt-*.pro, *.xml.
Comment 1 Thomas Preisler 2010-05-25 20:43:33 UTC
Does other projects (Jave) do this?
Comment 2 Alexey Vladykin 2010-05-26 10:08:29 UTC
Looking at AntProjectHelper I don't see such logic. So they rewrite the file in place as we currently do.
However project.xml is usually less than 1 kilobyte, while our configurations.xml can be several megabytes. Chance of catching NetBeans in the middle of writing is much higher for our files.
Comment 3 Thomas Preisler 2010-05-28 21:33:25 UTC
I'm not convinced that your solution is good. If we did what you suggest we would end up with the old configuration files and you would have lost all your changes. Better than a corrupted project but still not good.
Comment 4 Thomas Preisler 2010-11-19 17:35:27 UTC
Downgrading to p4. Perhaps we need to do something but not sure what. And no urgent fix needed.