Crash - Corrupt File, Months of Work Lost

I flipping my shit right now, big time. I was working on a large project and my computer blue screened and when I booted back up the ONE important source file I needed was corrupted somehow. It’s a .cs file and it’s 1.5k+ lines long. Losing it is NOT an option. I haven’t done any backups either because I’m stupid. I’ve tried using Recuva, it gives me a partially complete file but around 1k lines are still NULL. There are no other versions of the file on the disk, Visual Studio didn’t make any backups. Essentially I’m completely screwed right now unless you guys can give me any help. I’ve worked for at least 6 months on this project and if I lost it… I don’t know that’s just incomprehensible.

I’ve decompiled the binary of the apparent last build but the code it gives me is at least 4 months old so the majority of my modern code is missing. I haven’t run a CHKDSK /f yet because I’m using that as a last resort just in case any you guys ideas require me to not have rebooted.

Please help me out here. I’m dying.

Is this Windows, Linux, or Mac?

Windows

If you’re using Windows 7, Microsoft’s website may have what you’re looking for.

If you’re on Windows 8, again, Microsoft’s website has the answer

I hope this helps.

Unfortunately that’s only for specified folders… No dice :frowning:
It’s really kind of starting to sink in now. God this fucking sucks. I suppose nobody else has any suggestions…?

Have you tried System Restore on Windows 8?

I haven’t… I’ll do the CHKDSK and if that doesn’t work I’ll try to do a restore. The last point was about a week ago but the only code I’ve written since then was a bit of radian lerp code which shouldn’t be hard at all to rewrite. I just have to hope and hope that it affects my file. Thanks for reminding me; If this works I’ll… I don’t know but I will love you.

You’re welcome, glad I could help.

Dammit. It doesn’t affect it. Jesus… Well… I guess it’s over. This really really sucks, badly. Probably the most crushing and demotivating thing to happen to me, ever. I’m not exaggerating when I say 200+ hours of work. This was my Battlefield hack. My reversed SDK, GUI code, mathematics, everything. So this isn’t just my code, this is the time I spent reverse engineering the game. This is so messed up.
I suppose I’ll be uploading everything to github every 10 minutes from now on…

I need therapy :frowning: please send ice cream

Aren’t you using a Version Control? If so you could pull from your repository again. If you are using Visual Studio, it has Git integration built in, and BitBucket/CodePlex offers you free private repositories. You should be using them to prevent these kinds of losses.

I said in the op that I wasn’t. I know. Don’t lecture me on it. I’m retarded.

Try use some restore software - many off them,
I use this – not perfect but fast and sometimes help = PC INSPECTOR File Recovery
Also i try many another software – they find something but file full of byte mass.
so don’t find what i can recommend.

Also searching in google, ppl recommend this - http://www.runtime.org/data-recovery-software.htm
I Don’t try it self)

Also last recovery option is use some sort old DOS utilities for recovery – they are best but search spend so much time

Get Git (msysgit/Git Bash for windows).

Learn the basics (like 10 commands).

Use the cloud (dropbox, bitbucket, github, gitlab…).

Be living the dream.

As a side note: Why aren’t/weren’t you using version control?

I’ve never used Visual Studio, but does it have a directory specifically for compiled files. I know you decompiled a 4 month old version but you must have compiled it in VS since then. The “output path” location must have some files.

I’ll look into some more data recovery software but I’m not hopeful… Unfortunately when I tried to run the code for the first time after the crash it produced some exe for some reason that’s unexecutable. I’ve given up really.

EDIT: I SEE LIGHT I REPEAT I SEE LIGHT WILL UPDATE SHORTLY

i think you’r right, when you run project VS compile source somewhere in temp folder

but Imho: 2k lines is not big and you write them,
so to restore them you spend half – full day, max 2
its no so critical as you think it be.

I also lose some code in past :wink:
(some times start rewriting something and after 2-3 days understand I do something wrong, sometimes rewrite all from scratch, and yes I start use Git for own projects only 5 month ago ^^ so yes, I understand you’r problem)

And after so many time I now know code is not important – if you write him self, you can do it again and with new knowledge you do it even better =)

Well the nightmare is over! I retried decompiling, and tried a different exe I hadn’t checked before… And there we go. Code saved. Of course the decompiler outputted some funky names for variables but other than that, everything is intact. I am so relieved right now. Wow. Off to github.

The correct answer starts like this: “six months ago, establish a reliable backup procedure…”

well I dont use version control / git unless I work in a group.
I just backup to 2 different external HDDs, dropbox and google drive in my case, YMMV but I dont see the point in using version control in that case.
I mean I wanna save my assets too… they are always more valuable.

Even as single developer, version control is invaluable.

  • for tracking down bugs
  • for developing features in separate branches
  • for freezing published software and applying fixes independent of the ongoing work
  • for just throwing away recent work that has gone into the wrong direction
  • for looking up older implementations
  • for freezing milestones