Power outage erased bmx contents

BlitzMax Forums/BlitzMax Programming/Power outage erased bmx contents

JoshK(Posted 2007) [#1]
Is there any way to recover this? The file size is correct, but it seems to contain null characters.


GW(Posted 2007) [#2]
www.undelete-plus.com


JoshK(Posted 2007) [#3]
I rewrote the code...whew.

It wasn't just deleted in the Windows trash. The file was still there, same file size, but all null characters!

This happened to me once before a long time ago, power went out and open codefile was deleted.

It might happen when the code is being run?


Gabriel(Posted 2007) [#4]
I've had this happen before too. I think MaxIDE saves the open files when you run a project, and if the power outage happens to time it badly, bosh, your file is empty. It used to happen with Protean too, so I'm not sure if it's inherent in the IDE or the compiler, but I haven't ( touch wood ) had it happen in Blide yet.


Perturbatio(Posted 2007) [#5]
It's possible that it had been cached by the OS (with write caching enabled on the drive) just after a save, but not actually written to disk yet.

If you regularly get power cuts maybe get a UPS?


ziggy(Posted 2007) [#6]
This can be narrowed sometimes using streamed saving with big buffers (2 megabytes or the like), so the whole file is rewrited at once when the file is closed (faster). This way is more difficult to corrupt a file in a power off.