Can't open gh file - error

Guys please help me - I cannot open my file.

It was working yesterday, i did a lot of work and today i cannot open it.

Can someone help? (239.9 KB)

The file contains only zeroes. Did you save it to a USB stick or a hard-drive? If a stick, did you remove it from the computer without ejecting it first?

no :frowning: i just saved it as usual on my c:/ drive in projects folder. with 10+ other ones.

I hope you have a backup system, because the file you posted is just blank. It contains no information whatsoever.

239.9kb of zeroes, :smiley:

It’s not the first time I have seen such files, although in most cases the problem is associated with the unsafe removal of USB drives.

The file saving mechanism in Grasshopper is designed to fail safe, but clearly I haven’t covered all the possible cases.

@aleksanderdynarek which grasshopper version are you running btw?

First the objects are serialised in memory to a type-safe hierarchical dictionary. This dictionary is then written to a byte array in memory, from this point onwards no plug-code is run as part of a save operation. Then the bytes are compressed, still in memory.
The byte array is then written to a temp file on the machine main drive. The temp file is copied to the destination folder, but under a different name. If that succeeds the old file is renamed, the new file is given the correct name and lastly the old file is deleted entirely.

The idea is that if any step in this process fails, the old file remains either intact or at least accessible.

The saving algorithm has been improved somewhat a few months ago after I found some weak spots though.