Unexpected element - probably copy and pasted bone animation from another project related?

https://drive.google.com/file/d/1IuTB36hyobYxDx8Kd5ydh0HSC1aWb2tc/view?usp=sharing

Hello, I’m loving this program but have hit a problem, the .sif is attached and the error screenshot is there too, this happens when I try to open the file after saving it.

I believe copy and pasting in a character with bones from another project may have caused it from all the googling I’ve been doing here, it all worked fine until i tried to open the file the next day. If its not the copy and pasting I may have deleted the skeleton or a bone in the project.

Maybe I saved it after exporting and animation, I’m not sure.

How do I edit the file to solve this?

Thank you

Hello meandme and welcome,
This does indeed look like the old imported/copied bone error like you suggested. I can look at it more tomorrow, but if you would like to attempt fixing it yourself then try following these instructions.

1 Like

That’s great, I will have a go at repairing the file.

Thank you!

Hello Greg, I tried to edit the file and the

<bone_valuenode type=“bone_object” guid= …

wasn’t at the error line location or near it, I tried a few ways to see if i could get it to work following the guide.

Can you have a look please?

Thanks

I managed to recover the file. Here you go:
SynfigAnimation 3_recovered.sifz (276.0 KB)
Please note that bone links for skeleton nodes and bline nodes have been modified to get the file working, so you will need to fix some things to get everything positioned properly again.

Sorry the instructions didn’t work out for you. I guess the error message line number can’t always be relied upon. I’ll post some new instructions that will hopefully work better.

Wow! Thank you so much, I really appreciate it! What did you do to make it work again? Also what things should I do to avoid this error and other errors too?

1 Like

Well, I mostly did what I did in the instructions, but in order to find the bones that were causing trouble I had to check the guid for each skeleon bone to see if it showed up anywhere else in the file. If it didn’t then that means that it was missing a link which led to the error. I’ll call these “orphan guid”. Whenever I found an orphan guid I replaced it with an existing one from the bone list like in the instructions.

It still didn’t work after fixing all the orphan guids for all the skeletons however. Synfig would just hang forever when I tried to open the modified file, so I went back and searched each bone_valuenode for orphan guids as well and replaced all the ones I found the same way. There were a lot of them so I apologize if your stuff got messed up a lot.

To avoid this in the future, the best I can say is to avoid pasting skeletons from one file to another if you can. It is a known bug that seems to have ruined everyone’s day at least once including me.

1 Like

You did a great job at bringing that back to life for me.

What’s the best way to bring in a skeleton from another file?

Thanks again.

There is no clean way to bring a skeleton from one file to another that I’m aware of. You could potentially paste it into a different file and then re-link everything attached, however missing even a single node will lead to another corrupted file so it is a risky thing to try.

1 Like

Yeah same problem here 3 days work gone I guess, do not import objects with bones or open them, only objects with no bones seem to be stable to import or to copy and paste