-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
AccessViolationException when serializing two worlds, but deserializing in different order #154
Comments
Thank you! Anyway, I could run it without problems and there were no errors :/ Where did you include the whole thing? Is there some more information? |
You know, it just occurred to me that I had the |
I had it also checked out and well... it worked for me :o |
I'm also getting this error
It only happens in FlaxEngine builds, not in editor. And this is the code that I use to cause it:
edit: where TestStruct3 just holds an int |
Thanks for investigating! Excited what you might else discover ^^ |
Is this still the case in the more recent versions of arch and arch extended? |
I'm using recent versions of Arch and Extended serialization, I've tested only binary so far but I didn't run into this anymore. |
Thank you for implementing the serialization! I recently had a chance to try it out and found an issue when using multiple worlds. The TLDR is basically this:
If you create two worlds and add an entity to each (with a component), serialize both worlds, then deserialize them later in a different order and in a different process, an
AccessViolationException
is thrown in the MessagePack formatters.It looks like the exception is thrown almost every time in the
ChunkFormatter
implementation when the chunk array is setup for the first component type.Here is some code to help reproduce it:
You can simply run the
TestDeserialized()
method, which has the encoded world already there. But of course, prove it out completely by runningTestSerialized()
, copying the output of each world (A and B) to theTestDeserialized()
method, then running that method to show theAccessViolationException
.Thanks again for an awesome ECS!
EDIT: This also happens with the
ArchJsonSerializer
, for what it's worth.The text was updated successfully, but these errors were encountered: