Exception in the build (not present in editor)

Issue #307 resolved
Anonymous created an issue

Hi!

I encountered a stack overflow when running my build:

StackOverflowException: The requested operation caused a stack overflow.
 at Sirenix.Serialization.BinaryDataReader.EnterNode (System.Type& type) [0x00070] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\Binary\BinaryDataReader.cs:427
 at Sirenix.Serialization.BaseDataReader.SkipEntry () [0x00010] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\BaseDataReader.cs:400
 at Sirenix.Serialization.BinaryDataReader.EnterNode (System.Type& type) [0x00070] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\Binary\BinaryDataReader.cs:427
 at Sirenix.Serialization.BaseDataReader.SkipEntry () [0x00010] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\BaseDataReader.cs:400
 at Sirenix.Serialization.BinaryDataReader.EnterNode (System.Type& type) [0x00070] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\Binary\BinaryDataReader.cs:427
 at Sirenix.Serialization.BaseDataReader.SkipEntry () [0x00010] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\BaseDataReader.cs:400

it did not crash the build, but it seems to show up rather randomly

Other times, I get the following exception:

InvalidOperationException: Invalid binary data stream: could not parse peeked BinaryEntryType byte '0' into a known entry type.
  at Sirenix.Serialization.BinaryDataReader.PeekEntry (System.String& name) [0x00573] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\DataReaderWriters\Binary\BinaryDataReader.cs:340 
  at Sirenix.Serialization.UnitySerializationUtility.DeserializeUnityObject (UnityEngine.Object unityObject, IDataReader reader) [0x00141] in D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Utilities\UnitySerializationUtility.cs:1331 
Rethrow as Exception: Exception thrown while deserializing type 'RigidBodyTargetMovement': Invalid binary data stream: could not parse peeked BinaryEntryType byte '0' into a known entry type.
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, IDataReader) (at D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Utilities\UnitySerializationUtility.cs:1384)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, Byte[]&, List`1&, DataFormat, DeserializationContext) (at D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Utilities\UnitySerializationUtility.cs:1299)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext, Boolean, List`1) (at D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Utilities\UnitySerializationUtility.cs:1032)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext) (at D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Utilities\UnitySerializationUtility.cs:985)
Sirenix.OdinInspector.SerializedMonoBehaviour:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at D:\Sirenix\Sirenix Solution\Sirenix.Serialization\Unity Integration\SerializedMonoBehaviour.cs:25)

Comments (2)

  1. Bjarke Elias Clauson-Kaas ├śrrild
    • changed status to open

    Hey, thanks for submitting it,

    Would love some more information on this. Steps to reproduce would, of course, be appreciated, but if that's not possible. Could possibly share the Scene file that's causing the issue? It's possible I could further track down what object is causing issues from that. Also what version of Odin are you running?

  2. Tor Esa Vestergaard

    After having looked into it, I am fairly certain I have found the one code path that could possibly lead to the serializer landing in the looping state indicated by the stack trace, and prevented it from happening again in this way.

    Since the reporter has posted no further information, I'm marking this as resolved for now.

  3. Log in to comment