113place
0 votes Vote

Latest build may have an issue Num/Frame chucking out editor errors

Using the latest build. Upon choosing BUILD and RUN (Not just Build)
https://cdn.discordapp.com/attachments/573636747284709377/878087339149262868/unknown.png

Written out is:
Draw Generator MapMagic.Nodes.ObjectsGenerators.ObjectsOutput failed:
System.NullReferenceException: Object reference not set to an instance of an object
at MapMagic.Nodes.GUI.ObjectsEditors.DrawObjectsOutput (MapMagic.Nodes.ObjectsGenerators.ObjectsOutput gen) [0x00146] in \Assets\MapMagic\Generators\Objects\Editor\ObjectsEditors.cs:315
at Den.Tools.GUI.Draw.Invoke[T] (System.Delegate action, T obj, System.Object[] args) [0x0001e] in \Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1562
at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
at Den.Tools.GUI.Draw.Editor (System.Object obj, System.Object[] args, System.String cat) [0x000bf] in \Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1549
at MapMagic.Nodes.GUI.GeneratorDraw.DrawGenerator (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean selected, System.Boolean activeLinks, MapMagic.Nodes.GeneratorMenuAttribute menuAtt) [0x0024d] in \Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:140
at MapMagic.Nodes.GUI.GeneratorDraw.DrawGeneratorOrPortal (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean isMini, System.Boolean selected, System.Boolean activeLinks) [0x00030] in \Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:50
UnityEngine.Debug:LogError (object)
MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal (MapMagic.Nodes.Generator,MapMagic.Nodes.Graph,bool,bool,bool) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:56)
MapMagic.Nodes.GUI.GraphWindow:DrawGraph () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:337)
Den.Tools.GUI.UI:Draw (System.Action,bool,UnityEngine.Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:245)
MapMagic.Nodes.GUI.GraphWindow:OnGUI () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:200)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

This seems to Pertain to the new Num/Frame feature

using (Cell.LineStd) GeneratorDraw.DrawGlobalVar(ref GraphWindow.current.mapMagic.globals.objectsNumPerFrame, "Num/Frame");

Makes debugging a build a real pain. Thanks

twobob, 20.08.2021, 04:26
Idea status: under consideration

Comments

twobob, 20.08.2021, 17:40
I didn't do anything particularly special. As I say this only happens if you choose Build and Run. not just Build. I could try and make a really simple repro I guess at some point. I just figured this must happen for all Build and Run Object using graphs. Dunno.
Wraith, 21.08.2021, 12:23
Do you mean this happens when you click File -> Build and Run or press Ctrl-B? Need more info since I can't reproduce it - it just makes a build and runs it, no errors (2 warnings in test assembles). Does Build, not Build and Run works for you? What is your Unity version?
twobob, 04.09.2021, 12:30
It seems you have to have whatever the errant control is "In View" - that is Loaded as the active graph. If you open a subgraph the error goes away again.

Draw Generator MapMagic.Nodes.ObjectsGenerators.ObjectsOutput failed:
System.NullReferenceException: Object reference not set to an instance of an object
at MapMagic.Nodes.GUI.ObjectsEditors.DrawObjectsOutput (MapMagic.Nodes.ObjectsGenerators.ObjectsOutput gen) [0x00146] in D:\REPOS\AOTA-2021\Assets\MapMagic\Generators\Objects\Editor\ObjectsEditors.cs:315
at Den.Tools.GUI.Draw.Invoke[T] (System.Delegate action, T obj, System.Object[] args) [0x0001e] in D:\REPOS\AOTA-2021\Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1562
at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) [0x00035] in :0
at (wrapper delegate-invoke) System.Action`5[System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,System.Object,System.Object[]].invoke_void_T1_T2_T3_T4_T5(System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,System.Delegate,object,object[])
at Den.Tools.GUI.Draw.Editor (System.Object obj, System.Object[] args, System.String cat) [0x000bf] in D:\REPOS\AOTA-2021\Assets\MapMagic\Tools\GUI\Editor\Draw.cs:1549
at MapMagic.Nodes.GUI.GeneratorDraw.DrawGenerator (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean selected, System.Boolean activeLinks, MapMagic.Nodes.GeneratorMenuAttribute menuAtt) [0x0024d] in D:\REPOS\AOTA-2021\Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:140
at MapMagic.Nodes.GUI.GeneratorDraw.DrawGeneratorOrPortal (MapMagic.Nodes.Generator gen, MapMagic.Nodes.Graph graph, System.Boolean isMini, System.Boolean selected, System.Boolean activeLinks) [0x00030] in D:\REPOS\AOTA-2021\Assets\MapMagic\Nodes\Editor\GeneratorDraw.cs:50
UnityEngine.Debug:LogError (object)
MapMagic.Nodes.GUI.GeneratorDraw:DrawGeneratorOrPortal (MapMagic.Nodes.Generator,MapMagic.Nodes.Graph,bool,bool,bool) (at Assets/MapMagic/Nodes/Editor/GeneratorDraw.cs:56)
MapMagic.Nodes.GUI.GraphWindow:DrawGraph () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:337)
Den.Tools.GUI.UI:Draw (System.Action,bool,UnityEngine.Rect) (at Assets/MapMagic/Tools/GUI/Editor/UI.cs:259)
MapMagic.Nodes.GUI.GraphWindow:OnGUI () (at Assets/MapMagic/Nodes/Editor/GraphWindow.cs:200)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


Is that fail in full,
twobob, 05.09.2021, 00:40
I can actually replicate this with one particular graph. IF I have if OPEN in the editor (Graph editor) - however if you were viewing a subfunction it does not die which leads me to assume it is in the "render" code of the control somehow. Perhaps at some point I could send it to you if you really are bothered. I can't imagine that more than a couple of people in the world will ever bother to do what I did in that workflow.

Up to you.

Leave a comment