RAW Datat value is null
Posted: Tue Feb 21, 2023 5:29 am
Hey,
I have a cloudy problem I would like to post here. I am working on a game for Nintendo Switch and currently, I have a problem while saving. "Something" seems to crash during this process. It is quite hard to pin down just because it only happens in the release build not in the dev build.
This leads to the game not writing anymore to the disk. As long as you don't turn of the app saving works fine, but if you want to load the savegame file you will see, that it has not been saving for quite a while(depending on when this issue happened).
This bug happens either when saving before exiting the scene. Or when loading the data loading the new scene or somewhere in between.
While hunting this down we found out that in the PersistentDataManager of the Dialogue System, the values for Location, Actor, Variable, and Item can return a null value. This seems to lead to that issue.
Line 1388:
I know this is not much to go with but it might show how desperate I am looking for a solution! Maybe you have a clue what is going on or in what direction I could look into.
I have a cloudy problem I would like to post here. I am working on a game for Nintendo Switch and currently, I have a problem while saving. "Something" seems to crash during this process. It is quite hard to pin down just because it only happens in the release build not in the dev build.
This leads to the game not writing anymore to the disk. As long as you don't turn of the app saving works fine, but if you want to load the savegame file you will see, that it has not been saving for quite a while(depending on when this issue happened).
This bug happens either when saving before exiting the scene. Or when loading the data loading the new scene or somewhere in between.
While hunting this down we found out that in the PersistentDataManager of the Dialogue System, the values for Location, Actor, Variable, and Item can return a null value. This seems to lead to that issue.
Line 1388:
Code: Select all
public static byte[] GetRawData()
{
Record();
using (var ms = new MemoryStream())
{
var writer = new BinaryWriter(ms);
var conversationTable = Lua.Run("return Conversation").AsTable.luaTable;
PrepSimStatusForRawData(conversationTable);
WriteValue(writer, Lua.Run("return Actor").AsTable.luaTable);
WriteValue(writer, Lua.Run("return Item").AsTable.luaTable);
WriteValue(writer, Lua.Run("return Location").AsTable.luaTable);
WriteValue(writer, Lua.Run("return Variable").AsTable.luaTable);
WriteValue(writer, conversationTable);
WriteExtraData(writer);
writer.Flush();
return ms.GetBuffer();
}
}