This object is in archive! 

Visual Scripting - Crash Deleting Input Parameter

Richard Gemmell shared this bug 3 years ago
Solved

Visual Scripting sometimes crashes when deleting parameters from an Input node.

This crash doesn't happen with all scripts and the behaviour with this particular script has varied over time. At first it crashed as soon as I tried to remove the typeId parameter. Then it crashed only when I removed the second. In between I removed some of the connections to an instance of this script from the calling script. Whatever state it's in, the same crash happens every time I try it until I change something else.

Steps to reproduce:

  • open the FindAssertGridBlock script
  • double click on the typeId parameter of the input block
  • double click on the subtypeId parameter of the input block
  • VST crashes with the following exceptions:

2020-08-05 16:31:17.380 - 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 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-05 16:31:19.125 - 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 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,

Replies (2)

photo
1

In the end, I was able to delete these parameters by removing all references to this script from another scripts, saving everything, restarting VST and then removing the parameters.

photo
1

Hello, Engineer!

Already fixed in v197.

Kind Regards

Keen Software House: QA Department

Replies have been locked on this page!