0
Fixed

1.4.1b1 GraphPointerException: Missing graph element data for OnMouseDown

TowerCrow 4 months ago • updated by Lazlo Bonin (Lead Developer) 4 months ago 3

I get two errors when trying to use On Mouse Down event:

GraphPointerException: Missing graph element data for OnMouseDown#42a30....
[ (Destroyed) ]
Ludiq.GraphPointer.GetElementData[T] (Ludiq.IGraphElementWithData element) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Graphs/Runtime/GraphPointer.cs:356)
Bolt.GameObjectEventUnit`1[TArgs].GetHook (Ludiq.GraphReference reference) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Framework/Events/GameObjectEventUnit.cs:43)
Bolt.XEventGraph.TriggerEventHandler[TArgs] (Ludiq.GraphStack stack, System.Func`2[T,TResult] predicate, TArgs args, System.Func`2[T,TResult] recurse, System.Boolean force) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/IEventGraph.cs:44)
Bolt.EventMachine`2[TGraph,TMacro].TriggerUnregisteredEvent[TArgs] (Bolt.EventHook hook, TArgs args) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:49)
Bolt.EventMachine`2[TGraph,TMacro].TriggerUnregisteredEvent (System.String name) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:36)
Bolt.EventMachine`2[TGraph,TMacro].OnDrawGizmos () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:138)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
GraphPointerException: Missing graph element data for OnMouseDown#42a30....
[ (Destroyed) ]
Ludiq.GraphPointer.GetElementData[T] (Ludiq.IGraphElementWithData element) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Graphs/Runtime/GraphPointer.cs:356)
Bolt.GameObjectEventUnit`1[TArgs].GetHook (Ludiq.GraphReference reference) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Framework/Events/GameObjectEventUnit.cs:43)
Bolt.XEventGraph.TriggerEventHandler[TArgs] (Ludiq.GraphStack stack, System.Func`2[T,TResult] predicate, TArgs args, System.Func`2[T,TResult] recurse, System.Boolean force) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/IEventGraph.cs:44)
Bolt.EventMachine`2[TGraph,TMacro].TriggerUnregisteredEvent[TArgs] (Bolt.EventHook hook, TArgs args) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:49)
Bolt.EventMachine`2[TGraph,TMacro].TriggerUnregisteredEvent (System.String name) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:36)
Bolt.EventMachine`2[TGraph,TMacro].OnDrawGizmosSelected () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Core/Runtime/Events/EventMachine.cs:143)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Bolt Version:
1.4.1b1
Unity Version:
2018.2.19f1
.NET Version:
4.x
GOOD, I'M SATISFIED
Satisfaction mark by TowerCrow 4 months ago

Steps to reproduce:

  1. Do a graph, something along the lines of what I have here.
  2. Run Play mode
  3. Stop Play mode (you should see errors in console)

EDIT: The event itself is not responsive - doesn't trigger when I press any of the mouse buttons.

+1
Fixed

Found the cause and applied a fix. It's such an obscure Unity quirk that I tweeted about it: https://twitter.com/__lazlo/status/1072187720938782720