Repair/data-mine a broken blend file?


If blender crash or the computer shut down while blender is writing the .blend, the file will most likely be corrupted with the “missing DNA block” error message.

While it is indeed possible to recover .blend1 format, finding recover copies in the /tmp/ directory, or appending objects if lucky, I’m wondering if a .blend file with missing DNA block is completely worthless, or, perhaps there is a way to data-mine the .blend to recover, at least some, of the precious information?

I did not find any information online on how we could recover information from a corrupted blend, am i missing something? is there some knowledge on how we can recover information from a .blend?

I hope this development forum is a good place to ask such questions

.blend files are essentially self describing on what information is in there, that’s why there’s a fair amount of freedom of opening .blend files with either newer or older version than they are created with.

This description is contained in the file’s dna, without it it be nearly impossible to recover what data lies within it.

I’d open up the file in a hex editor, most files i have had with corrupt DNA tended to be mostly filled with 0’s

It really depends. I guess if the file was written with no compression, you could extract the data that is intact (although that might take a long time). I would try building a debug build and just stepping through the BLO_read_from_file function until the messed up data-block is hit and then see what the reader contains (up to that point).

Most intact files I’ve looked at contained mostly 0’s :wink:

it’s the first couple of kilobytes that really count :slight_smile:

1 Like

So if i understand correctly
you’re saying, if the blend is broken, it’s unrecoverable?

You only look at them, or were you also able to repair them? :thinking:

No I was talking about good files, not broken ones. Was looking at them out of curiosity.

1 Like