#3164 closed defect (fixed)
(De)serialisation fails on nested Map objects
Reported by: | tom | Owned by: | Itms |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
An error occurred loading the game, the game crashes. I tested 16528, the game fails to load a saved game, load game again after loading, the game crashes.
BTW: when I shut down the computer start your computer, start the game again loading the save game, the game crashes. My os is win8 64bit.
See forum for logs: http://wildfiregames.com/forum/index.php?showtopic=19804&hl=
Attachments (2)
Change History (14)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
by , 9 years ago
Attachment: | nested_maps.diff added |
---|
Workaround for the Auramanager, though it should probably be fixed in the C++ (de)serialisation part
comment:4 by , 9 years ago
Summary: | Load map error! → (De)serialisation fails on nested Map objects |
---|
comment:6 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:7 by , 9 years ago
Before sanderd17 reverted that code above, I got some mysterious crashes and aura errors. Linking this ticket for completeness: #3188.
comment:8 by , 9 years ago
Keywords: | patch review added |
---|---|
Milestone: | Alpha 20 → Alpha 19 |
I looked into the issue and it is not caused by the nested maps but by object references in maps. I would like to commit the following workaround, which clones the data before inserting it inside the map.
When it is committed, I will create a ticket for the references bug, containing a patch and some code to reproduce the error.
Please review the style and let me know.
by , 9 years ago
Attachment: | aura_manager_maps.patch added |
---|
Also includes some reordering of add/multiply to avoid any ordering mistake
comment:9 by , 9 years ago
Any reason for using that custom function instead of clone() (from globalscripts/utility.js
)?
I'd prefer not naming it like it should be used by other components (So eg. starting with lower case like that ensureExists
, though we did have internal funcs starting with _ some time ago. It seems all of those are now gone though).
Apart from that it looks good. Should we also commit the new map tests too?
comment:11 by , 9 years ago
Keywords: | review removed |
---|
Ok, seems like it's a problem with the deserialization of nested Maps (which are used in the Auramanager).