PDA

View Full Version : [SOLVED:] Strange File Corruption



garyj
03-18-2020, 09:43 PM
I have an Access 2016 file that I was working on in January and when I tried to open it the error came back that it was not recognized as a database file. I tried a few things including the use of Stellar to fix the file... but nothing worked. So I downloaded a Hex Editor to take a look, and the result is that every single byte in the whole file is a binary zero. No wonder it isn't recognized! But what happened? Does anyone know of a virus that would do this?

A friend asked if I had saved a copy before using Stellar. I had, and it is no different.

Thankfully I have a file from mid-November with 3 file changes and quite a bit of code changes. I know what the 3 file changes were. I will have to rewrite the code from scratch sigh...

Gary

garyj
03-19-2020, 10:39 PM
I read something from one person who proposed that during every file save there is a three step process.
1. Bytes are allocated for the save.
2. The allocated bytes are zeroed to prepare for the save.
3. The save is completed.

They said that in some situation a computer may have a longer period between steps 2 and 3 and if a crash occurs at that point, it corrupts the file.
I couldn't find a virus that does this particular thing. Ransomware tends to encrypt files, not zero them.
Will go with this for now and my fix will include a file backup save on the close event.

OBP
03-20-2020, 04:36 AM
You could use the backup routine set up I think it was by cookie gal where it takes a Copy every day and puts it in a folder named for that day with the date incorporated in the file name.