"error while saving changes" in editor, reload does not help!

hello, it seems like i broke my project view in the editor.
i always get “error while saving changes

it happened after i played around with “CurveSet” in script - attributes, i had no clue how to set default Curves.
so i was playing around, with editors behavior and thought it is expecting a JSON with “keys” attribute,
this was not very smart, since that the editor always show the same error, and in the console it looks like, editor is always trying to load the old script attributes

any suggestions what i can do?
i deleted already my localstorage and i changed the code in the script back.
i also logged out, but al this did not help

perhaps you can delete the js-file which triggers the error?


Looks like a bug on our end because that shouldn’t happen. Now that you’ve commented out those offending attributes can you re-parse the script in the Editor (so that the attributes get removed from the script asset) and tell us if this continues to happen? You might need to refresh after re-parsing the script.

Hi, fixing the script was not enough.

but i could fix it with hot coding and overloading JSON.stringify and decycling the assigned object

decycling code:

so now its fine again, thanks for the quick reply.
before i go on, have you any example for the defaults for CurveSet?

I think defaults for curve script attributes are not handled correctly at the moment. You don’t have to pass a default value for everything, you can just omit the default field, and then create your curve from the Editor.

Too bad. but ok, the rest of this engine is great :slight_smile:

thank you

Managed to get this bug when merging using the steps below:

Merge branch A to B
Get conflict with an enum attribute of type number
Choose B’s changes
Error shows up: “error while saving changes

However I was able to get around this by making a new branch from the commit before the merge and then choosing A’s changes. ¯_(ツ)_/¯

Hi @jamesgames, that seems like a bug with replication of properties.

@will might be able to take a look at this.

I think @zpaul would be interested to investigate this.

Parsed script attribute types are stored inside the script asset, while the values (including defaults) are stored inside scene entities. If conflicts during a merge were manually resolved in an inconsistent manner, the values/declarations in the two places, and possibly in the script code itself may not match (this would be hard to enforce automatically during a merge). If you are unable to reconcile them by editing your code, parsing etc, then creating a branch from a checkpoint before the merge, as you did, is a good way to “redo” a merge