Project is malformed

My project says its malformed and I can’t open it. This is my most recent version so if I cannot recover it I will have to redo so many things plz hewp );

The autosave doesnt work either

If the auto save doesn’t work, there is nothing we can do. Your save is probably corrupted.

So will I have to redo all the unsaved work?

Yes, sadly. That’s why it’s important to save and backup regularly.

oh okay. Thanks for the help

Did you ever manually saved the project before? because sometimes the autosave doesn’t work well. In that case you have to press on “Cancel” on that window and gdevelop will load the last time that you save it manually. Other thing that happened me before is that i couldn’t load my project (autosaved and manually saved neither). I uninstalled gdevelp and reinstall it again, and then i could load my project

Neither manual nor autosave load and it tells me this:


I haven’t tried reinstalling but I’ll give it a go. Thanks m8

i hope it works :sweat:

it didn’t. I think the .json file itself is the problem and I don’t know how to fix it

I don’t know if it will work but maybe you can try renaming your .json.autosave to .json… it worked for me :slight_smile:

I tried but it didn’t work but hey thanks anyway (:

Okay so I was messing with the .json file in notepad and found some code was missing so I copied it from an older backup and its all good now so uh problem solved i guess(?)

3 Likes

Can you show us which part was missing ?

Sure!
This is the code for the sine movement and as you can see it just cuts off at the end:


I thought it might have cut off some code at the end so I went back to an older backup:

Sure enough, I saw I was right so I copied the code from the older one to the new and now it works like it shoud.I’m not sure if this happened to anyone else or why it just cut off the end of the code.
Hope this helps!

1 Like

It is cut because the saving has been interrupted.
You have to leave the software after the saving process, wait for the confirmation and close the project.

Note that when you have the project open in GD, you can save it wherever you want.

And that the automatic backup is the version of the file before you save over it.

1 Like

Okay, thanks! I was probably in a rush and closed it before it saved. Sorry for wasting your time.

:hushed:
Can’t we prevent the end of the process until the save is complete?

Yes, I’ll try to make a PR later.
In case anyone else want to tackle this, it’s simple to do: replace the direct saving to saving to filename + “.tmp”, then delete the old file an rename the tmp one to filename.
If while writing the process quits, the original file has not been overridden.
If it quits while deleting the old file, there will only be the tmp and the user can easily open it or rename it to remove the tmp

3 Likes