Mono corrupted D files

AsmMan via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 6 19:49:51 PDT 2014


On Saturday, 6 September 2014 at 19:09:30 UTC, Kapps wrote:
> On Wednesday, 3 September 2014 at 21:13:31 UTC, AsmMan wrote:
>> Something very strange happened 2/3 days ago. Two of my D 
>> files of the project I was working on got all values replaced 
>> by 0 (that's what I seen rather D code if I open the file with 
>> a hex debugger). The file size of both files keep intact 
>> although. And no, I have no backup of these files. I had a old 
>> copy of it on a external hard drive but I needed to format it 
>> to use in something else and didn't put my files before it...
>>
>> Instead of turn off my windows machine I always hirbenate it 
>> and left open all stuff and then I just back quickly to point 
>> where I was on. That day, when I logged on system I noticied 
>> first non-usual behavior: the machine looked like I had 
>> restarted it instead of hibernate. All stuff I left open 
>> (including mono) wasn't open anymore. I find it strage but 
>> moved on. But to my surprise when I open mono, the "recent 
>> projects" always available on left menu bar was empty. Just 
>> like I had installed mono not used yet. I open my project 
>> directly by clicking on "open" and navigating to folder of 
>> projec and then I see the two of main project files with a 
>> values set to zero.
>>
>> Can some Mono expected help me?
>> My question is: can I recovery these files? or what remains to 
>> me is cry?
>> restore the system didn't helped (and I neither expected to 
>> but I tried)
>>
>> Not sure if it is related: that day my machine had no a 
>> network connection.
>
> Sounds like something crashed during the middle of a write. I 
> would be surprised if this was related to Mono-D at all (I 
> highly doubt that he changed the way files are saved). I'd also 
> be concerned about the potential of a dying HDD, though that's 
> less likely if this is the only thing that broke.


My guess: I had a project opened on mono/xamarim studio where all 
the files has already been saved before I hibernate the computer. 
The computer somehow lost the power xamarim/mono tried to save it 
but computer aborted before making these files into 
zero-byte-file. A zero-byte-file does happen when a program is 
writing to a file but is prematurely aborted because this write 
isn't transfered to file at same time but to a "cache" instead of 
and at later time written in the file. The computerd turned off 
before it. I think the @Etienne Cimon's method didn't worked well 
because I used the computer after it. Maybe if I had kept the 
computer untouched I could get back them.


More information about the Digitalmars-d mailing list