"Data layout mismatch; skipping past node boundary when exiting array" error on iOS - works on Android and Unity Editor
I get this error when I run my game on iOS and it doesn’t start at all. If I force quit, I can manage to get it running, but the functionality doesn’t work as expected. I don’t know what it’s related to yet, but I recently started using Odin Serializer in my project and this is the first time I try iOS build with it. Like said - everything works well on Android. I have tried with both Binary and JSON as serialization option. This error is from the JSON-build but same happened with both.
Here’s the error:
Data layout mismatch; skipping past node boundary when exiting array.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
System.Action`1:Invoke(T)
Sirenix.Serialization.CustomLogger:LogError(String)
Sirenix.Serialization.DebugContext:LogError(String)
Sirenix.Serialization.JsonDataReader:ExitArray()
Sirenix.Serialization.ListFormatter`1:DeserializeImplementation(List`1&, IDataReader)
Sirenix.Serialization.BaseFormatter`1:Deserialize(IDataReader)
Sirenix.Serialization.ComplexTypeSerializer`1:ReadValue(IDataReader)
Sirenix.Serialization.Serializer`1:ReadValueWeak(IDataReader)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, IDataReader)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, Byte[]&, List`1&, DataFormat, DeserializationContext)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext, Boolean, List`1)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext)
Sirenix.OdinInspector.SerializedScriptableObject:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
Data layout mismatch; skipping past node boundary when exiting array.
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
System.Action`1:Invoke(T)
Sirenix.Serialization.CustomLogger:LogError(String)
Sirenix.Serialization.DebugContext:LogError(String)
Sirenix.Serialization.JsonDataReader:ExitArray()
Sirenix.Serialization.ListFormatter`1:DeserializeImplementation(List`1&, IDataReader)
Sirenix.Serialization.BaseFormatter`1:Deserialize(IDataReader)
Sirenix.Serialization.ComplexTypeSerializer`1:ReadValue(IDataReader)
Sirenix.Serialization.Serializer`1:ReadValueWeak(IDataReader)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, IDataReader)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, Byte[]&, List`1&, DataFormat, DeserializationContext)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext, Boolean, List`1)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext)
Sirenix.OdinInspector.SerializedScriptableObject:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
Comments (4)
-
reporter -
I can’t seem to reproduce this issue by serializing or deserializing the kind of data types you have there. Could you provide an example project that reproduces the issue reliably?
-
I have this error on Android, but works in the Editor. Odin version: 3.0.3.0
-
The problem is with the AOT. Maybe in Juhana iOS built is using IL2CPP, so it get this error, I was facing this because I’m using IL2CPP in Android. You could improve the error message.
- Log in to comment
This was caused by the following line:
SerializeTexture serializeTexture = SerializationUtility.DeserializeValue<SerializeTexture>(_serializedThumbnailSprite, DataFormat.Binary);
where the following is:
public byte[] _serializedThumbnailSprite
public class SerializeTexture
{
public int x;
public int y;
public byte[] bytes;
}
I switched to FullSerializer for this task now, I’m now sure why OdinSerializer didn’t work.