Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAM map saving fails when unsupportedInfoProperties isn't empty #221

Open
Arnuh opened this issue Nov 13, 2023 · 1 comment
Open

HAM map saving fails when unsupportedInfoProperties isn't empty #221

Arnuh opened this issue Nov 13, 2023 · 1 comment

Comments

@Arnuh
Copy link
Contributor

Arnuh commented Nov 13, 2023

Tested on v115 of GMS with map 921160100. It contains a "fieldScript" property which gets put into unsupportedInfoProperties of MapInfo. Can reproduce this issue on any version by adding a fake property in a maps info node.

The JSON serializer is infinite looping/just having issues in general trying to serialize MapleLib objects due to fields like Parent, WzFileParent, parent being a WzFile, WzObject, etc, resulting in having other fields like parent, and children, ending in the serializer essentially trying to save the entire wz as a JSON file.

An option is to note all these fields as [IgnoreDataMember] but I'm not sure how well that'll work when putting the property back as that is the purpose of unsupportedInfoProperties. Looks like parent gets set again so safe? but other parent objects still cause issues. Might have to strip all of this parent data on save using [IgnoreDataMember] then fix it after deserializing.

I assume additionalNonInfoProps and additionalProps will cause the same issue.

@Arnuh
Copy link
Contributor Author

Arnuh commented Nov 13, 2023

Noticed this is the same issue as #210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant