Sign in to follow this  
Darkbouncer4689

Crazy C++/VS Crash - Deleted my file!

Recommended Posts

Hey all,

So a few minutes ago I ran my C++/opengl project and get a runtime error about accessing an element outside of my array boundary. I change some code, recompile and it crashes my whole computer. When I restart my .cpp file won't open in visual studios, it defaults it to a generic text editor.

When I try opening it with notepad++ using c++ language encoder its nothing but nulls.

Wtf happened? Did I lose my whole file? I spent hours on it!!

I'm on 64bit windows 7. Is there any way to recover the file? I didn't even know it was possible to have a massive crash like this by compiling some C++ code. How is it possible that accessing bad memory can trash a file on my hard drive?

Anddd IE lag caused me to double post.... sorry.

Share this post


Link to post
Share on other sites
Well that helped a little, thank you. Unfortunately the last 6 hours of my work wasn't backed up.

I use github for major project backups, but I didn't know that with each compile there is a chance of wiping a file on the hard drive..... that makes absolutely no sense to me. I thought using a repo was more about making sure you have a backup incase your hard drive explodes. Do people really sit there pushing their project to a repo every hour because C++ might randomly trash it?

P.S. The file isn't empty, it has 15KB of data in it. It's just all null when I open it in notepad++. Anyone know what this means?

Share this post


Link to post
Share on other sites
If you run Scan Disk it should be able to find the file fragments and will store them in FOUND~000 (or so) directories in the root folder of the drive.
Open the files inside of that folder with a hex editor and you should be able to find your code sitting in one of them, along with some other file data from other files.
I recommend 010 Editor for hex editing.


L. Spiro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this