Problem with PB

Everything else that doesn't fall into one of the other PB categories.
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Problem with PB

Post by Nubcake »

Hey

I left my computer on for about 20 mins and when I came back i think someone had slept it or it went to sleep anyway when i resumed it i noticed this weird graphical thing happenening with all programs so I closed all programs including PB then restarted my computer. The graphical error went away however something wrong happened with PureBasic : When I opened it up all my preferences were gone (Default PureBasic startup + Splash screen) and the file i'd been working on disappeared. So when I tried to open the file i was working on it came up in File Viewer with just a list of numbers:

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

I really need that file back as it contained a lot of code i had been working on . Is there anything i can do to retrieve it ?

Nubcake
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Problem with PB

Post by jassing »

what you describe is a classic sign of shutting the system off rather than doing a full system shutdown...

If the file is filled with nulls, you're not going to get it back; unless you boot off a cd and look for traces of the old file.

If you've powered your machine on and used any programs, chances of recovering go download dramatically.
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Re: Problem with PB

Post by Nubcake »

so there's no chance of recovery?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Problem with PB

Post by IdeasVacuum »

Do you keep a backup? If not, now is the time to start. Concerning the issue on your PC, you need to try to find the cause since it is unlikely to be a one-off.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: Problem with PB

Post by Ramihyn_ »

There are plenty of file recovery tools. You could ask google for things like "undelete" or "recover files windows" and with a bit of luck, some time and the right tool, you can recover at least a previous version of your source.

For example the "tuneup utitilities" have a 30day trial and contain undelete tools. Maybe you want to try that as most dedicated recovery tool trials don't allow you to save the data during trial, but tuneup might.

If you are very serious about getting the file back, you would not ever start the installation again (risk of overwriting data you want to recover) and only work on a 1:1 image copy you create right after it happened. If it was a faulty suspend mode (incompatible/faulty drivers or hardware), you might find your source in the memory dump windows created on the hard disk. Make a copy, open it with a hex editor and search for a unique string in your source.

You might only get an older version back though, or 90% of your file.

ps: obviously if you install the recovery tools on the same partition/system where you want to undelete data from, you might overwrite the data with that installation ;)
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Re: Problem with PB

Post by Nubcake »

the only thing close enough to the file was a compiled exe that i still have but im guessing decompiling is out of the question right ?
User avatar
kenmo
Addict
Addict
Posts: 2083
Joined: Tue Dec 23, 2003 3:54 am

Re: Problem with PB

Post by kenmo »

A similar thing happened to me when I was editing code under Linux, my laptop battery died, and later I rebooted to Windows XP. My code had become corrupt -- filled with nulls and garbage. I assume it had something to do with the OS, or the filesystem, from not saving and closing the file buffers. Luckily I had backups :?

I have had decent luck with the (free?) recovery program Recuva, although that was on flash/SD drives, and it is always best if you try to recover immediately running as little software as possible (so you don't overwrite that area of the hard drive unintentionally).
Ramihyn_
Enthusiast
Enthusiast
Posts: 314
Joined: Fri Feb 24, 2006 9:40 am

Re: Problem with PB

Post by Ramihyn_ »

Nubcake wrote:the only thing close enough to the file was a compiled exe that i still have but im guessing decompiling is out of the question right ?
You can decompile it to assembler or C/C++, but you wont even be able to change and compile the resulting C/C++ code anymore.

I dont know how much trouble it would be worth to you or how many files we talk about. An easy way to check if there even is a point in trying to recover data, would be to use a linux life CD/DVD like knoppix and do a grep for a unique string on the raw filesystem. That would show you if (fragments) of your source still exist somewhere. A diskeditor and some hours of re-assembling parts from the raw disk, might be worth it for you - or not. Think carefully about the string you search for - the search usually takes hours - thats why professionals copy the images to a super-fast device before doing stuff like that (SSD-Raids).

A good IDE creates backup files or even a backup history for cases like this (i think japbe does it), but lack of backup was of cause your major mistake.
User avatar
kenmo
Addict
Addict
Posts: 2083
Joined: Tue Dec 23, 2003 3:54 am

Re: Problem with PB

Post by kenmo »

Doesn't PB create a temporary copy of your source when you compile/run? Or is that just for new, unsaved source code...

Maybe, if you haven't run PureBasic since then, there is still a good copy in you compiler folder or elsewhere?
Post Reply