0
Not a Bug

Bolt flow not work on il2cpp android build [Deserialization Error]

Goodee 7 months ago updated by Reality.Stop() 6 months ago 16

Tested mono build, which works fine, but il2cpp is not on android.
All systems works fine, except of flow macros(any events not invoke, such as Start etc, so any flow functionality are not persist in game process).

My problem seems to be similar to this: https://support.ludiq.io/communities/5/topics/4351-internal-deserialization-error-on-android-il2cpp-build
I sure that i builded Aot before the build.


P.S:
I need to know how fast it will be fixed. This problems looks really danger for project. I cant be sure in reliability of Bolt :/
I do not want to be responsible for a project full of problems before the release date, you must understand me

Bolt Version:
1.4.11
Unity Version:
2019.3.0f6
Platform(s):
Android
Scripting Backend:
IL2CPP
.NET Version (API Compatibility Level):
.NET 4.x

Please edit your post and change the category from Questions to Bugs, otherwise, this might get lost. 

Thanks much. I did it.

Btw, I had the same error in a WebGL IL2CPP build with some community addons pack units in my graphs. The same units work in Mono without issues. Specifically Random Numbers and Defined Events in my case. If you're using community addons pack - it might be worth going through your graphs and making them native. 

Community addons pack is not an official resource so Bolt devs can't fix it. You'd need to contact the devs of the community addons pack instead.

Hi. Thanks for the info. I trying to remove community addons, but i cant open my graphs when it moved out, then i moved it back and explore the "Community" section of nodes picker and detected, that i never used it anywhere... What i can to do?

If you're not using community addons anywhere then it might be another issue altogether. Gotta wait for dev response. 

Need More Information

Hi Goodee,

Sorry you're experiencing this issue and thanks for the report.

Could you please paste the text version of the stack trace? In your screenshot, the error message is truncated.

It would also help if you could upload the scene / macro file that fails to run. The more isolated this file is, the faster we'll be able to help you fix the issue. 

Trying to remove "Bolt.Addons.Community.Fundamentals", which i think was never used in my project, but after this step i cant open my graphs and get this error(full stack):
Failed to deserialize scriptable object.
System.Runtime.Serialization.SerializationException: Deserialization into 'Bolt.FlowMacro' failed. ---> System.InvalidOperationException: Internal Deserialization Error - Object definition has not been encountered for object with id=62; 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.
at Ludiq.FullSerializer.Internal.fsCyclicReferenceManager.GetReferenceObject (System.Int32 id) [0x00023] in <0c215dcd73b64ea081955bf35be307b8>:0
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) [0x00023] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00098] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00022] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in <0c215dcd73b64ea081955bf35be307b8>:0
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) [0x0015c] in <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x00000] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsIEnumerableConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x0005b] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00022] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in <0c215dcd73b64ea081955bf35be307b8>:0
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) [0x0015c] in <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00098] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00022] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in <0c215dcd73b64ea081955bf35be307b8>:0
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) [0x0015c] in <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsReflectedConverter.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00098] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00022] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (System.Type overrideConverterType, Ludiq.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00032] in <0c215dcd73b64ea081955bf35be307b8>:0
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) [0x0015c] in <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
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 <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.FullSerializer.fsSerializer.TryDeserialize (Ludiq.FullSerializer.fsData data, System.Type storageType, System.Type overrideConverterType, System.Object& result) [0x0003d] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.Serialization.DeserializeJson (Ludiq.FullSerializer.fsSerializer serializer, System.String json, System.Object& instance, System.Boolean forceReflected) [0x0001e] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x0003b] in <0c215dcd73b64ea081955bf35be307b8>:0
--- End of inner exception stack trace ---
at Ludiq.Serialization.DeserializeInto (Ludiq.SerializationData data, System.Object& instance, System.Boolean forceReflected) [0x000b0] in <0c215dcd73b64ea081955bf35be307b8>:0
at Ludiq.LudiqScriptableObject.UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize () [0x00016] in <0c215dcd73b64ea081955bf35be307b8>:0
UnityEngine.Debug:LogError(Object, Object)
Ludiq.LudiqScriptableObject:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()

You'll have to re-add the community addons pack back so that you can open the graphs again. I had a similar issue recently and that helped me with opening up graphs again. 

This also signifies that community nodes are in use and removing them is what caused this. 

If you're getting a deserialization failure, that means that you are using some of the Community nodes, and once removed, Bolt can't deserialize properly.  Unfortunately, I can't tell which node from those screenshots, so I can't tell you what to look for.  

What we can do, perhaps, is to add the nodes back in, but a special version of the dll that will exception as soon as one of the Community nodes executes.  This doesn't help your build, but it will help you to find them in your graphs, as you'll see the error in the console and red nodes in your graphs.  After you find and fix all the ones you encounter in normal playing, you can try a build again.  If the build works, then you've successfully removed the ones not compatible with an AOT platform.  Then you can try removing the dlls again.

Another approach might be to search your macros (with a find in files) for "Bolt.Addons.Community", as the serialized form should include the type names.  This will at least tell you which macros use the nodes, though it won't help with embed graphs.

Sorry for the hassle, AOT handling is something something we know the Defined Events aren't compatible with (which is why they're in a separate DLL, with warnings.  Sounds like you found another one in the base library.  :-(

Hi. Thanks for reply. I analyzed flow-assets and found two uses of Bolt.Community.Addons. When i removed nodes which was from Community.Addons a problem gone away. Thanks much. You can close this now.

Do you remember what nodes where causing the build problems?  I don't have any interaction with AOT platforms, so I tend to only find out about these issues when users report them, and I can clean these up for future users.

Bolt.Addons.Community.Fundamentals.IncrementUnit - was a problematic nodes only

There is clear project, where you can reproduce this problem. Just try to remove "Bolt.Addons.Community.Fundamentals" in plugins. I think this is main problem...
Link to project: https://fex.net/s/tsc0tlr
How i detected problem exist in "Level006 Macro" asset

    You'll always have a problem removing nodes that are in use in your project (and it's not something I can fix, out of my control), but I was referring to your original problem, where you had a problem with an AOT build.  I was wondering what nodes you had in your build that were interfering with an AOT Build.

    The Defined Events are known to not be compatible, but they are separated into the separate DLL.  You had something in the Fundamentals package that wasn't compatible.

    Not a Bug

    Hi everyone,

    Thanks for stepping in, Reality.Stop()!

    Indeed, when a unit type is removed from the source entirely, graphs that used it will fail to deserialize, because it doesn't the structure of the data anymore.

    This is why we never actually delete official units, we only mark them as obsolete.

    I recommend the same approach for the Community Addons, but know that we do not officially support those addons at the moment.

    I'm glad you were able to resolve your issue manually by editing the macro files.

    I'll mark this as Not A Bug as it doesn't concern the core Bolt product.

    We haven't removed any nodes (and take the same approach with obsoleting), but the user encountered an AOT problem and wanted to remove the Community nodes (some of which are in use).

    If you have any ideas of how to improve things, let me know!