Dynamo
Dynamo copied to clipboard
Crash report from Dynamo 2.18.1.5096
Issue Description
Please fill in the following information to help us reproduce the issue:
Dynamo version
Dynamo: 2.18.1.5096
Operating system
OS: Microsoft Windows NT 10.0.19044.0
What did you do?
Trying to get the Revit categories from a Binding class
OUT = [pb.Categories for pb in doc.ParameterBindings]
What did you expect to see?
A list of categories
What did you see instead?
Null (Object reference not set to an instance of an object.)
What packages or external references (if any) were used?
None
Stack Trace
Object reference not set to an instance of an object.
at Autodesk.Revit.DB.Category.GetHashCode()
at System.Collections.Generic.Dictionary`2.Remove(TKey key)
at ProtoFFI.CLRObjectMarshaler.OnDispose(StackValue dsObject, Context context, Interpreter dsi)
at ProtoFFI.DisposeFunctionPointer.Execute(Context c, Interpreter dsi, List`1 s)
at ProtoCore.Lang.FFIFunctionEndPoint.Execute(Context c, List`1 formalParameters, StackFrame stackFrame, RuntimeCore runtimeCore)
at ProtoCore.CallSite.DispatchDispose(StackValue stackValue, RuntimeCore runtimeCore)
at ProtoCore.DSASM.Executive.CallDispose(ProcedureNode fNode, StackValue svThisPtr, Int32 classIndex)
at ProtoCore.DSASM.Heap.GCDisposeObject(StackValue svPtr, Executive exe)
at ProtoCore.DSASM.Heap.Sweep()
at ProtoCore.DSASM.Heap.SingleStep(Boolean forceGC)
at ProtoCore.DSASM.Heap.FullGC(IEnumerable`1 gcroots, Executive exe)
at ProtoScript.Runners.LiveRunner.ApplyUpdate()
at ProtoScript.Runners.LiveRunner.CompileAndExecuteForDeltaExecution(List`1 astList)
at ProtoScript.Runners.LiveRunner.SynchronizeInternal(GraphSyncData syncData)
at ProtoScript.Runners.LiveRunner.UpdateGraph(GraphSyncData syncData)
at Dynamo.Scheduler.UpdateGraphAsyncTask.HandleTaskExecutionCore()
at Dynamo.Scheduler.AsyncTask.Execute()
CLR: 4.0.30319.42000
EDIT
Resolves with restart of Revit (Not just Dynamo) but always happens on re-run of script
minimal example code
OUT = [pb.get_Categories() for pb in doc.ParameterBindings]
Thank you for submitting the issue to us. We are sorry to see you get stuck with your workflow. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.
I've seen this kind of error more times than I can count when working with categories in python nodes, always when re-running a script. Super annoying.