FlowCanvas Forums › Support › Graph initialization problem on Android
Hello everybody!
I am having trouble with an Android build concerning graph initialization. I created a scene with an object containing a FlowscriptController, and exported it into a .unitypackage file. This file I imported in another project (FlowCanvas is already imported there), and when I build an APK and run it, I see the following errors in the console and the scene freezes up, without excuting anything from the flow script:
AndroidPlayer “**********” NullReferenceException: Object reference not set to an instance of an object.
at ParadoxNotion.Serialization.FullSerializer.Internal.fsDictionaryConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsDictionaryConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.JSONSerializer.Internal_Deserialize (System.Type type, System.String json, System.Collections.Generic.List1[T] references, System.Object instance) [0x00000] in <00000000000000000000000000000000>:0
1[T] references) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.JSONSerializer.TryDeserializeOverwrite[T] (T instance, System.String json, System.Collections.Generic.List
at NodeCanvas.Framework.Blackboard.SelfDeserialize () [0x00000] in <00000000000000000000000000000000>:0AndroidPlayer “**********” TargetException: Non-static field requires a target
at System.Reflection.RuntimeFieldInfo.SetValue (System.Object obj, System.Object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsListConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.Internal_Deserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Type overrideConverterType) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.JSONSerializer.Internal_Deserialize (System.Type type, System.String json, System.Collections.Generic.List1[T] references, System.Object instance) [0x00000] in <00000000000000000000000000000000>:0
1[T] references) [0x00000] in <00000000000000000000000000000000>:0
at ParadoxNotion.Serialization.JSONSerializer.TryDeserializeOverwrite[T] (T instance, System.String json, System.Collections.Generic.List
at NodeCanvas.Framework.Graph.Deserialize (System.String serializedGraph, System.Collections.Generic.List1[T] references, System.Boolean validate) [0x00000] in <00000000000000000000000000000000>:0
1, Boolean)
at NodeCanvas.Framework.Graph.LoadOverwrite (NodeCanvas.Framework.Internal.GraphLoadData data) [0x00000] in <00000000000000000000000000000000>:0
at NodeCanvas.Framework.GraphOwner.Initialize () [0x00000] in <00000000000000000000000000000000>:0
ParadoxNotion.Services.Logger:Internal_Log(LogType, Object, String, Object)
NodeCanvas.Framework.Graph:Deserialize(String, List
NodeCanvas.Framework.Graph:LoadOverwrite(GraphLoadData)
NodeCanvas.Framework.GraphOwner:Initialize()AndroidPlayer “**********” NullReferenceException: Object reference not set to an instance of an object.
at FlowCanvas.FlowNode.AssignSelfInstancePort () [0x00000] in <00000000000000000000000000000000>:0
at FlowCanvas.FlowGraph.InitSecondPass () [0x00000] in <00000000000000000000000000000000>:0
at NodeCanvas.Framework.Graph.LoadOverwrite (NodeCanvas.Framework.Internal.GraphLoadData data) [0x00000] in <00000000000000000000000000000000>:0
at NodeCanvas.Framework.GraphOwner.Initialize () [0x00000] in <00000000000000000000000000000000>:0
This does not happen, when I build an APK from the original project. Can someone help me figure out, what exactly the problem is here?
Any tips or hints would be greatly appreciated.
Thanks in advance,
Patrick
Hello there,
Hmm. Are there any differences in built settings between the two projects? Have you built the AOTClasses and link.xml ( DOC LINK ) in the project that shows the error?
Let me know.
Join us on Discord: https://discord.gg/97q2Rjh
Hello Gavalakis!
First I want to apologize for the late replay, I was away on a business trip and could not check your questions.
The AOTClasses and link.xml were generated, but there are differences in the build setup concerning the scripting backend. I will check if any of those differences are responsible for my problems.
I will report what I found out, as soon as I can. Thank for for your input!
Best regards,
Patrick