Speckle 2 crashes Dynamo

Hi everyone,

why does the Speckle 2 Receive node causes my Dynamo to crash?

Here are the steps I took that lead to the crash:

  1. Create a script with the Speckle 2 Receive Node in it.
  2. Run script and successfully received data from server.
  3. Close script and Dynamo (sometimes I do not close Dynamo) save.
  4. Open Dynamo and run script again.
  5. Error appears on the Receive node and if I close the script or delete said node Dynamo crashes.

Here is the crash report:

One or more errors occurred.

   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Speckle.ConnectorDynamo.ReceiveNode.Receive.get_Client() in C:\Users\circleci\project\ConnectorDynamo\ConnectorDynamo\ReceiveNode\Receive.cs:line 51
   at Speckle.ConnectorDynamo.ReceiveNode.Receive.Dispose() in C:\Users\circleci\project\ConnectorDynamo\ConnectorDynamo\ReceiveNode\Receive.cs:line 605
   at Dynamo.Graph.Workspaces.WorkspaceModel.Clear()
   at Dynamo.Graph.Workspaces.HomeWorkspaceModel.Clear()
   at Dynamo.Models.DynamoModel.ClearCurrentWorkspace()
   at Dynamo.ViewModels.DynamoViewModel.ClearHomeWorkspaceInternal()
   at Dynamo.ViewModels.DynamoViewModel.CloseHomeWorkspace(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(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.OnMouseUpThunk(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)

Hi @Shuai! Thanks for reporting this! I’ve had a look at the Dynamo connector and I can’t seem to reproduce the crash you are experiencing, although I can confirm the Receive node does not behave properly when opening a saved file containing it, as I get this unspecified Error message…

Screenshot 2021-05-25 at 10.45.59

We’ll look into it asap and try to push a quick update if we find a fix. I created an issue for it here: Dynamo Receive node crashes/throw error when opening file · Issue #520 · specklesystems/speckle-sharp · GitHub

1 Like

Hey @Shuai ,

I could replicate and found the issue, should roll out a quick fix soon!

Hi again @Shuai , this has been fixed and will be included in the next release!

If you need a fix ASAP you can install the dynamo/2.1.16-beta from Manager (but then remember to uncheck the beta setting as otherwise you might get untested versions in the future).

2 Likes