+2
Cannot Reproduce

WebGL: Failed to deserialize scriptable object

YakDogGames 2 months ago • updated by Lazlo Bonin (Lead Developer) 1 day ago 7

Both Firefox and Chrome latest version. Build options WebGL asm.js.

Unity 2018.2.14f1 (64 bits)

Bolt 1.4.0f10


Made a simple game with Bolt, ran AOT Pre Build every time I buld to WebGL and get the same error.

Edit: Sorry forgot to add the stack trace error.

(Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
UnityLoader.js:4 
UnityLoader.js:4 Failed to deserialize scriptable object.
UnityLoader.js:4 System.Runtime.Serialization.SerializationException: Deserialization into 'Bolt.FlowMacro' failed. ---> System.InvalidOperationException: Internal Deserialization Error - Object definition has not been encountered for object with id=89; have you reordered or modified the serialized data? If this is an issue with an unmodified Full Serializer implementation and unmodified serialization data, please report an issue with an included test case.
UnityLoader.js:4   at Ludiq.FullSerializer.Internal.fsCyclicReferenceManager.GetReferenceObject (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0 
UnityLoader.js:4    --- End of inner exception stack trace ---
UnityLoader.js:4   at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x00000] in <00000000000000000000000000000000>:0 
UnityLoader.js:4  
UnityLoader.js:4 (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
Bolt Version:
1.4.0f10
Unity Version:
2018.2.14f1 (64 bits)
.NET Version:
.NET 4.x
Under Review

Hi YakDog,

Can you please send a minimal project that reproduces this issue?

It's hard to tell what's happening from just the stack trace. It seems like data corruption in the serialized data, but I've never had reports of that so far.

Lazlo, Hi.

How can I send directly to you? Will send this project, because it's not something I think I can reproduce.

Is there a way to find orphaned Flows?

Regards.

has the same error
Failed to deserialize behaviour.
System.Runtime.Serialization.SerializationException: Deserialization into 'Bolt.Variables' failed. ---> System.InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread

and my Variables on all the objects become empty, I think that cause I am using scriptable object as one of the variable extended from Odin SerializedScriptableObject

Bolt 1.4.0f10

Hi Babywka, what is the full stack trace of that error? With only the first few lines I cannot tell where it's coming from.

Hi, I'm having a similar error, where at some point all of my macros become empty and lose all my variables, and I'm unsure on why it happened. Now I just can't use Bolt on the project I was working, every time I open it everything disappears. I had to create a new project with all my assets and start creating the macros from the beginning.

I'm trying to reproduce it, but I have been using only for a couple days and it already happened twice, losing all my progress...

I'm using Unity 2018.3.0f2, Bolt 1.4.0f11.NET3.

The errors I get are:

Failed to log deserialization failure data:
System.InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
  at UnityEngine.Object.EnsureRunningOnMainThread () [0x00010] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:153 
  at UnityEngine.Object.GetInstanceID () [0x00002] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:73 
  at UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) [0x0003b] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:182 
  at UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) [0x00025] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:140 
  at UnityEngine.Object.op_Equality (UnityEngine.Object x, UnityEngine.Object y) [0x00003] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:403 
  at Ludiq.UnityObjectUtility.IsUnityNull (System.Object obj) [0x00000] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Utilities\UnityObjectUtility.cs:18 
  at Ludiq.SerializationData.ToString (System.String title) [0x00054] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\SerializationData.cs:77 
  at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x0004b] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\Serialization.cs:120 
UnityEngine.Debug:LogWarning(Object, Object)
Ludiq.Serialization:DeserializeInto(SerializationData, Object&, Boolean) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Serialization/Serialization.cs:124)
Ludiq.LudiqBehaviour:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Unity/LudiqBehaviour.cs:46)

and

Failed to deserialize behaviour.

System.Runtime.Serialization.SerializationException: Deserialization into 'Bolt.FlowMachine' failed. ---> System.InvalidOperationException: EnsureRunningOnMainThread can only be called from the main thread
  at UnityEngine.Object.EnsureRunningOnMainThread () [0x00010] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:153 
  at UnityEngine.Object.GetInstanceID () [0x00002] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:73 
  at UnityEngine.Object.IsNativeObjectAlive (UnityEngine.Object o) [0x0003b] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:182 
  at UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs) [0x00025] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:140 
  at UnityEngine.Object.op_Equality (UnityEngine.Object x, UnityEngine.Object y) [0x00003] in C:\buildslave\unity\build\Runtime\Export\UnityEngineObject.bindings.cs:403 
  at Ludiq.UnityObjectUtility.IsUnityNull (System.Object obj) [0x00000] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Utilities\UnityObjectUtility.cs:18 
  at Ludiq.UnityObjectConverter.TryDeserialize (Ludiq.FullSerializer.fsData storage, System.Object& instance, System.Type storageType) [0x0003c] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\Converters\UnityObjectConverter.cs:57 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001a] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:861 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:851 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00157] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:826 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_2_Version (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x0011c] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:730 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00049] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:675 
  at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:628 
  at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00082] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\Converters\fsReflectedConverter.cs:97 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001a] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:861 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:851 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00157] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:826 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_2_Version (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x0011c] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:730 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00049] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:675 
  at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:628 
  at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00082] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\Converters\fsReflectedConverter.cs:97 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x0001a] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:861 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:851 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00157] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:826 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_2_Version (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x0011c] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:730 
  at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List`1[Ludiq.FullSerializer.fsObjectProcessor]& processors) [0x00049] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:675 
  at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Dependencies\FullSerializer\fsSerializer.cs:628 
  at Ludiq.Serialization.DeserializeJson (Ludiq.FullSerializer.fsSerializer serializer, System.String json, System.Object& instance, System.Boolean forceReflected) [0x00015] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\Serialization.cs:171 
  at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x0002e] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\Serialization.cs:113 
   --- End of inner exception stack trace ---
  at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x0007f] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Serialization\Serialization.cs:127 
  at Ludiq.LudiqBehaviour.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () [0x00010] in C:\Users\lazlo\Projects\Bolt1\Package\Ludiq.Core\Runtime\Unity\LudiqBehaviour.cs:46 
UnityEngine.Debug:LogError(Object, Object)
Ludiq.LudiqBehaviour:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Unity/LudiqBehaviour.cs:53

I'm kinda new on programming overall, and Bolt made it pretty easy to understand. I'm looking forward to solving this problem too keep working with it.

Hi Gabriel, 

Sorry you're having this issue. That specific bug was fixed in Bolt v.1.4.1b3, can you try updating to the latest beta and see if it works for you? We're working hard on bringing that version to stable ASAP.

Cannot Reproduce

I'm closing this because:

  • We couldn't reproduce the initial report ("Object definition has not been encountered for object with id...")
  • The other bugs reported by babywka and Gabriel in the comment is unrelated and fixed in v.1.4.1b3 and v.1.4.1b4