Jump to content
  • Advertisement
Sign in to follow this  
Darkbouncer4689

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

This topic is 2579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Take a look under Right-click->Properties->Previous Versions. And pray that your computer has a backup.

I'd recommend investing some time in setting up version control for next time.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!