Dynamo exception running Solar Radiation Sample with Vasari b3


#1

Hi there,

 

Just downloaded and installed Vasari b3 and Dynamo 0.5.0 and tried running Sample 7 - Solar Radiation Analysis but it’s coming up with exceptions when I click ‘Run’.

 

The Solar Radiation Optimiser node goes red and the following exception is generated in the console:

 

Running expression in debug.
> (Solar_Radiation_Optimizer Family_Instance_Selection “increment” 1 36 “C:AutodeskDynamoCoresamples7 Solar Radiation Optimizerresult.csv”)
Starting a debug transaction for element: Set Instance Parameter
System.Collections.Generic.KeyNotFoundException:
The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Dynamo.Nodes.dynNodeModel.<>c__DisplayClass1c.<evaluateNode>b__19()
System.Exception:

 

at Dynamo.Nodes.dynNodeModel.evaluateNode(FSharpList1 args)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at Dynamo.Nodes.dynNodeModel.evalIfDirty(FSharpList1 args)
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc2 mapping, FSharpList1 x)
at Dynamo.FScheme.compile@795-13.Invoke(FSharpRef1 env)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at Dynamo.Nodes.dynTransaction.TransactionProcedureNode.&lt;compileBody&gt;b__9(FSharpList1 args)
at Dynamo.FScheme.fold@835[a](Value d, a env, FSharpList1 _arg6)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList1 cons, FSharpFunc2 f, FSharpList1 x)
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc2 mapping, FSharpList1 x)
at Dynamo.FScheme.compile@795-13.Invoke(FSharpRef1 env)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at Dynamo.Nodes.dynBuiltinFunction.Evaluate(FSharpList1 args)
at Dynamo.Nodes.dynNodeWithOneOutput.Evaluate(FSharpList1 args, Dictionary2 outPuts)
at Dynamo.Nodes.dynNodeModel.<>c__DisplayClass1c.<evaluateNode>b__19()

 

 

If I double click on the red node and the node is already open, then it switches to that tab ok, and I can switch back and re-run (with the same result). If the node is not already open, then I get a popup with the following error:

 

 

An ItemsControl is inconsistent with its items source.
See the inner exception for more information.

 

at System.Windows.Controls.ItemContainerGenerator.Verify()
at System.Windows.Controls.Panel.AddChildren(GeneratorPosition pos, Int32 itemCount)
at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at System.Windows.WeakEventManager.ListenerList1.DeliverEvent(Object sender, EventArgs e, Type managerType)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Windows.Controls.ItemCollection.OnViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Windows.WeakEventManager.ListenerList1.DeliverEvent(Object sender, EventArgs e, Type managerType)
at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at Dynamo.Controls.DynamoViewModel.Workspaces_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)</span> <span class="font-size-1" style="font-family: 'courier new', courier;">at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Dynamo.Controls.DynamoViewModel.ViewCustomNodeWorkspace(FunctionDefinition symbol)
at Dynamo.Controls.dynNodeView.dynNodeView_OnMouseDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int3

 

 

and after continuing, Dynamo closes.

 

 

This is the first thing I’ve tried to run in Dynamo, so I’m a bit stumped. I’m going to try and download the source and see if I can get a debug session working, but thought I’d report the error for now anyways.

 

 

Cheers

 

Rob


#2

Ok, so the above is probably a red-herring - those exceptions are from the console, and they also appear when it runs ok (see below). The actual error - tooltip from the red node is:


This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.



But I've tried running from the latest source code and can't reproduce it - tried debug, release and installed release. So perhaps it's fixed already.