Visual Scripting - Crash Adding Output Param
The Visual Scripting Tool crashes to the desktop when attempting to add a parameter to an output node in some circumstances. This crash is reproducible.
Steps to Reproduce
- Unzip the attached zip file and add the scripts to a project.
- Close VST and open it again
- Open the "Bug_CrashAddingOutputParam" script in VST
- Double click on the "Deliverables_Load" node. (VST should open an editor for the Deliverables_Load script)
- Find the Output node in Deliverables_Load and attempt to add a new integer output parameter.
- VST crashes when you close the "Parameter" popup
Note that you can add the parameter successfully if you open the Deliverables_Load script without opening the Bug_CrashAddingOutputParam script first.
The stack traces are:-
2020-08-09 16:50:07.662 - Thread: 1 -> Error: System.NullReferenceException: Object reference not set to an instance of an object.
at GraphWPF.NodeConnector.<get_Connections>d__28.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at VisualScriptingPlugin.Utils.VisualScriptingTools.Clear(NodeConnector connector, GraphControlWPF graph)
at VisualScriptingPlugin.Nodes.MyScriptNodeScriptInteraction.ReloadSignature(Boolean init)
at VisualScriptingPlugin.Nodes.MyInteractionHandler.ScriptSignatureChanged()
at VisualScriptingPlugin.Nodes.MyScriptNodeOutputInteraction.AddParam(String name, Type type)
at VisualScriptingPlugin.Nodes.MyScriptNodeOutputInteraction.AddParamButtonOnDoubleClicked(Object o, NodeItemEventArgs nodeItemEventArgs)
at GraphWPF.NodeItem.OnDoubleClick(Point& cursorTransformedLocation)
at GraphWPF.GraphControlWPF.OnMouseDoubleClick(MouseButtonEventArgs e)
at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at VRageEditor.VRageEditor.OnTick()
at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at VRageEditor.VRageEditor.Run()
2020-08-09 16:50:09.950 - Thread: 1 -> Error: System.NullReferenceException: Object reference not set to an instance of an object.
at GraphWPF.NodeConnector.<get_Connections>d__28.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at VisualScriptingPlugin.Utils.VisualScriptingTools.Clear(NodeConnector connector, GraphControlWPF graph)
at VisualScriptingPlugin.Nodes.MyScriptNodeScriptInteraction.ReloadSignature(Boolean init)
at VisualScriptingPlugin.Nodes.MyInteractionHandler.ScriptSignatureChanged()
at VisualScriptingPlugin.Nodes.MyScriptNodeOutputInteraction.AddParam(String name, Type type)
at VisualScriptingPlugin.Nodes.MyScriptNodeOutputInteraction.AddParamButtonOnDoubleClicked(Object o, NodeItemEventArgs nodeItemEventArgs)
at GraphWPF.NodeItem.OnDoubleClick(Point& cursorTransformedLocation)
at GraphWPF.GraphControlWPF.OnMouseDoubleClick(MouseButtonEventArgs e)
at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventR
Hello, Engineer!
Already fixed in v197.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Already fixed in v197.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!