0
Pending Review

2a10 Connection to Bolt typed port breaks periodically

Ex-Crow 9 months ago updated by Lazlo Bonin (Lead Developer) 9 months ago 2

This connection breaks after each Unity restart since alpha 7 or so. This, however, is not the original graph, I recreated it from 0 in a fresh project so it seems reproducible and should be present in the project I linked in Discord.

Connection can be fixed by rewiring it.

Graph: https://imgur.com/jeAikOH

Could not load connection between 'value' of 'IndexerGetMember#28a47...' and 'input' of 'SetBoltClassVariable#1745d...'.
UnityEngine.Debug:LogWarning(Object, Object)
Ludiq.Bolt.UnitConnection`2:HandleDependencies() (at Assets/Ludiq/Bolt.Flow/Runtime/Connections/UnitConnection.cs:190)
Ludiq.Bolt.GraphElementMergedCollection:Add(IEnumerable`1) (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/GraphElementMergedCollection.cs:26)
Ludiq.Bolt.Graph:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/Graph.cs:168)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltMemberUnit`3:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/BoltMemberUnit.cs:194)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:NotifyDependencyAvailable(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:878)
Ludiq.Serialization:NotifyDependencyDeserialized(ISerializationDependency) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:842)
Ludiq.Bolt.BoltType:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltType.cs:154)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:AwaitDependencies(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:832)
Ludiq.Bolt.BoltType:OnAfterDeserialize() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltType.cs:147)
Ludiq.LudiqAsset:Ludiq.ILudiqRootObject.OnAfterDeserialize() (at Assets/Ludiq/Ludiq.Core/Runtime/Unity/LudiqAsset.cs:46)
Ludiq.Serialization:OnAfterDeserializeImplementation(LudiqAsset, FullSerializationData, SerializationData, Boolean&) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:755)
Ludiq.LudiqAsset:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at Assets/Ludiq/Ludiq.Core/Runtime/Unity/LudiqAsset.cs:26)

When trying to run the game:

MissingValuePortInputException: Missing input value for 'input'.
Ludiq.Bolt.Flow.GetSourceValueAndType (Ludiq.Bolt.ValueInput input, System.Object& sourceValue, Ludiq.Bolt.HybridType& sourceType) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:607)
Ludiq.Bolt.Flow.GetValue (Ludiq.Bolt.ValueInput input, Ludiq.Bolt.HybridType type) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:651)
Ludiq.Bolt.Flow.GetValue (Ludiq.Bolt.ValueInput input) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:663)
Ludiq.Bolt.SetBoltClassVariable.Set (Ludiq.Bolt.Flow flow) (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Architecture/SetBoltClassVariable.cs:76)
Ludiq.Bolt.Flow.InvokeDelegate (Ludiq.Bolt.ControlInput input) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:513)
Rethrow as GraphPingException:
Ludiq.Bolt.Flow.InvokeDelegate (Ludiq.Bolt.ControlInput input) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:517)
Ludiq.Bolt.Flow.Invoke (Ludiq.Bolt.ControlOutput output) (at Assets/Ludiq/Bolt.Flow/Runtime/Flow.cs:408)
Ludiq.Bolt.EventHandlerUnit`1[TArgs].Invoke (Ludiq.Bolt.GraphReference reference, TArgs args) (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Events/EventHandlerUnit.cs:114)
Ludiq.Bolt.EventHandlerUnit`1+<>c__DisplayClass17_0[TArgs].b__0 (TArgs args) (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Events/EventHandlerUnit.cs:73)
Ludiq.Bolt.EventBus.Invoke[TArgs] (Ludiq.Bolt.EventHook hook, TArgs args) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:153)
UnityEngine.Debug:LogException(Exception, Object)
Ludiq.Bolt.EventBus:Invoke(EventHook, EmptyEventArgs) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:157)
Ludiq.Bolt.BoltClassShellTrait:InvokeEvent(EventHookID) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltClassShellTrait.cs:870)
Ludiq.Bolt.BoltUnityClassShellTrait:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltUnityClassShellTrait.cs:30)
Ludiq.Bolt.BoltComponent:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltComponent.cs:121)

This appears after clicking the above error in C# preview:

Ludiq.Bolt.CodeGenerationException: Missing value for 'Set Item'.
at Ludiq.Bolt.FlowGenerationUtility.GenerateSourceExpression (Ludiq.Bolt.ValueInput valueInput, Ludiq.Bolt.MethodGeneration method) [0x000b6] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Editor\Generation\FlowGenerationUtility.cs:192
at Ludiq.Bolt.FlowGenerationUtility.GenerateExpression (Ludiq.Bolt.ValueInput valueInput, Ludiq.Bolt.MethodGeneration method, Ludiq.Bolt.HybridType destinationType) [0x00001] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Editor\Generation\FlowGenerationUtility.cs:203
at Ludiq.Bolt.SetBoltClassVariableGenerator+d__2.MoveNext () [0x0008a] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Editor\Units\Architecture\SetBoltClassVariableGenerator.cs:26
at System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) [0x0005e] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00033] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Ludiq.LinqUtility.ForceEvaluation[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00016] in C:\GameDev\Bolt2a10\Assets\Ludiq\Ludiq.Core\Runtime\Utilities\LinqUtility.cs:19
at Ludiq.Bolt.UnitGenerator`1[TUnit].GenerateControlInputBody (Ludiq.Bolt.MethodGeneration method, Ludiq.Bolt.ControlInput controlInput) [0x00033] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Editor\Units\UnitGenerator.cs:104


UnityEngine.Debug:LogError(Object)
Ludiq.Bolt.CodeGenerationConsole:PingAndLogException(CodeGenerationException) (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodeGenerationConsole.cs:195)
Ludiq.Bolt.CodeGenerationConsole:DrawEntry(Entry, Boolean) (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodeGenerationConsole.cs:117)
Ludiq.Bolt.CodeGenerationConsole:OnGUI(GUILayoutOption[]) (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodeGenerationConsole.cs:30)
Ludiq.Bolt.CodePreviewWindow:_OnGUI() (at Assets/Ludiq/Bolt.Core/Editor/Generation/CodePreviewWindow.cs:319)
Ludiq.LudiqEditorWindow:OnGUI() (at Assets/Ludiq/Ludiq.Core/Editor/Windows/LudiqEditorWindow.cs:140)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Bolt Version:
2.0.0a10
Unity Version:
2019.3.2f1
Platform(s):
PC
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2

Seems to also break on domain reload. 

Pending Review

Hi TowerCrow,

Thanks for the report and sorry for the late reply.

My hypothesis is that this may be due to serialization dependencies. This is why it is inconsistent. Presumably, the asset defining the port's type hasn't been loaded yet when this unit is defined. I'll have to look deeper into this — there are many issues trickling from that caveat.