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

TAML Write/Read Crash #345

Open
Juason opened this issue Apr 17, 2016 · 3 comments
Open

TAML Write/Read Crash #345

Juason opened this issue Apr 17, 2016 · 3 comments

Comments

@Juason
Copy link

Juason commented Apr 17, 2016

Using latest T2D head with Visual Studio 2015 on Windows 10.

TamlWrite in binary format, and then reading it will cause a crash with some objects. It appears to error on line 339, with the AssertFatal of "field object cannot be NULL."

TamlWrite with XML or JSON does not crash, but exhibits unusual behavior. When writing and then reading the object via XML or JSON, I experience the occasional dynamic field not being setup properly from the same saved files. This leads me to believe there is a problem with the reading. Loading it 10 times I get 10 different problems being exhibited among the different NPCs in my game.

Example Code for Save and then Load:

TamlWrite($ACTORS, %saveActors, "binary", false);
$ACTORS = TamlRead(%loadActors, "binary");

Below is a link to a zip with saves of the simplest game scenario I could engineer, with just a single Imp character present. Imps are CompositeSprites with a Behavior and many dynamic fields. I've tried to include the Binary, JSON and XML versions of the start of a game in hopes someone can identify the problem.

Thank you!

https://drive.google.com/file/d/0B9EYwAWdSUu2SU03WWFpMnVNMUU/view?usp=sharing

@greenfire27
Copy link
Contributor

Did this start just after the release or did you just recently start using binary files?

@Juason
Copy link
Author

Juason commented Apr 17, 2016

This has existed for the past several releases. I've only just now had time to do a deep dive into it.

@camporter
Copy link
Contributor

Do you see a message similar to "Taml: Failed to create type '' as such a registered type could not be found."?

The curious thing I'm noticing is that reading the binary file yields a type named "StarActor", but "aStarActor" in the JSON and XML TAML. Which is the correct type? When looking at the previous bytes in the binary file, the character 'a' exists, even though it is not considered part of the type when loaded...

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

3 participants