NodeCanvas Forums › Support › Issue: Behaviour Tree gone (canvas empty)
Hi,
I accidentally declared a Blackboard variable inside a custom condition class like this (my bad):
[RequiredField]
public T typeToCheck;
Which leads to following error and the permanent(?) deletion of the behaviour tree inside the canvas:
Deserialization Error: ‘Type doesn’t have a parameter less constructor’
‘ at System.Linq.Expressions.Expression.New (System.Type type) [0x00000] in <filename unknown>:0
at ParadoxNotion.Serialization.FullSerializer.fsMetaType..ctor (System.Type reflectedType) [0x00050] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Reflection\fsMetaType.cs:41
at ParadoxNotion.Serialization.FullSerializer.fsMetaType.Get (System.Type type) [0x00012] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Reflection\fsMetaType.cs:18
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.CreateInstance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType) [0x00000] in NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Converters\fsReflectedConverter.cs:88
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000df] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:777
1& processors) [0x0003f] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:689
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x00038] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:659
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00085] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Converters\fsReflectedConverter.cs:76
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00012] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:821
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00029] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:812
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000fc] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:790
1& processors) [0x0003f] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:689
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x00038] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:659
at ParadoxNotion.Serialization.FullSerializer.Internal.fsIEnumerableConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance_, System.Type storageType) [0x0006a] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Converters\fsIEnumerableConverter.cs:69
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00012] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:821
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00029] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:812
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000fc] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:790
1& processors) [0x0003f] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:689
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x00038] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:659
at ParadoxNotion.Serialization.FullSerializer.Internal.fsReflectedConverter.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Object& instance, System.Type storageType) [0x00085] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\Converters\fsReflectedConverter.cs:76
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_5_Converter (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00012] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:821
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_4_Cycles (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type resultType, System.Object& result) [0x00029] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:812
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_3_Inheritance (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List1& processors) [0x000fc] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:790
1& processors) [0x0003f] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:689
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.InternalDeserialize_1_CycleReference (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result, System.Collections.Generic.List
at ParadoxNotion.Serialization.FullSerializer.fsSerializer.TryDeserialize (ParadoxNotion.Serialization.FullSerializer.fsData data, System.Type storageType, System.Object& result) [0x00038] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\FullSerializer\fsSerializer.cs:659
at ParadoxNotion.Serialization.JSONSerializer.Deserialize (System.Type type, System.String serializedState, System.Collections.Generic.List1 objectReferences) [0x00066] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\JSONSerializer.cs:78
1 objectReferences) [0x00000] in \NodeCanvas\Framework\_ParadoxNotion (shared)\Runtime\Serialization\JSONSerializer.cs:48
at ParadoxNotion.Serialization.JSONSerializer.Deserialize[GraphSerializationData] (System.String serializedState, System.Collections.Generic.List
at NodeCanvas.Framework.Graph.Deserialize (System.String serializedGraph, Boolean validate, System.Collections.Generic.List1 objectReferences) [0x0001b] in \NodeCanvas\Framework\Runtime\Graphs\Graph.cs:102 ‘
<b>Please report bug</b>
UnityEngine.Debug:LogError(Object, Object)
NodeCanvas.Framework.Graph:Deserialize(String, Boolean, List1) (at Assets/NodeCanvas/Framework/Runtime/Graphs/Graph.cs:113)
NodeCanvas.Framework.Graph:OnAfterDeserialize() (at Assets/NodeCanvas/Framework/Runtime/Graphs/Graph.cs:54)
Hey,
This is a bug that has been fixed now. Let me know of an email and I will send you the new version through. Sorry about this.
Regarding recovering the graph from this bug, exporting it to json through the menu should give the original serialized graph data, which we can change to fix it. Does the json file has any data within in your case?
Thanks
Join us on Discord: https://discord.gg/97q2Rjh
Hi Gavalakis,
thanks for dropping by. Sorry, I don’t understand what you mean by the data inside json file, I just know: I can load json files without a problem, but I haven’t tried to export and reload it while it’s in the broken empty state, if you mean that. I will try this, if it ever happens again.
I already reported a similar bug via email (grandsilence@ -> “serious bug”), imported it into one of my projects but then forgot to import it into the one I’m working on now, silly me. :-S
Regarding your offer, does this new version already contain the option for fixed “one line” connections? I’m eager to try this out!
Hey,
What I ment before, was that if this ever happens again, you can try exporting the visualy empty graph to a json file. Then you could open up the json file and fix the thing that causes the issue from there (or send it over to me so that I do so) and then reimport the json back to the graph.
With the new version though, this problem should not occur again hopefuly.
The new version doesn’t yet has the “one line” connection style, but rather only the straight lines one. This will come a bit later on. Sorry 🙂 I’ve already submited this version to the asset store, but if you want it sooner, let me know of an email.
Also, what “other bug” do you refer to? 🙂
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Oops, the sentence wasn’t complete. Nevermind, it was the same bug and you already sent me a fixed version of NC, which I in return forgot to import into all of my projects, thus I was thinking it’s an issue with the fixed version. But at least now I know of a way to recover a tree, just in case this or something of the kind happens again.
I’d actually be happy to grab a copy of the new version a little bit sooner. I’ll send you an email. Thank you!