"Data layout mismatch; skipping past node boundary when exiting array" error on iOS - works on Android and Unity Editor

Issue #557 new
Juhana Lehtiniemi created an issue

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 (2)

  1. Juhana Lehtiniemi reporter

    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.

  2. Tor Esa Vestergaard

    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?

  3. Log in to comment