ksobon / Mandrill

data visualization for Dynamo
30 stars 14 forks source link

Dynamo crashes when clicking on "Save HTML" button #42

Closed pabloderen closed 6 years ago

pabloderen commented 7 years ago

Dynamo crashes when clicking on "Save HTML" button. The chart works using the "Show Window". According to exception HtmlAgilityPack.dll is not found. Only version on system is located here C:\Windows\assembly\NativeImages_v4.0.30319_64 .

Trying compiling from github

Revit 2017.1 Dynamo 1.3.1.1736 Archi-lab_Mandrill 2017.12.4 (through Dynamo package manager)

Could not load file or assembly 'HtmlAgilityPack, Version=1.4.9.5, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The system cannot find the file specified.

   at Mandrill.Html.MandrillHtmlNodeModel.CustomNodeModelNodeViewCustomization.SaveHtml(Report report, String filePath)
   at Mandrill.Html.MandrillHtmlNodeModel.CustomNodeModelNodeViewCustomization.SaveMandrillWindow(NodeModel model, NodeView nodeView)
   at Mandrill.Html.MandrillHtmlNodeModel.CustomNodeModelNodeViewCustomization.<>c__DisplayClass0_0.<CustomizeView>b__0()
   at Mandrill.Html.MandrillHtmlNodeModel.ShowMessage(Object obj)
   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)
pabloderen commented 7 years ago

Issue solved coping HtmlAgilityPack.dll version 1.4.9.5 into %APPDATA%\Dynamo\Dynamo Revit\1.3\packages\Archi-lab_Mandrill\bin

ksobon commented 7 years ago

Well, that file would be automatically placed in that location if you were to install it from the package manager. I don't believe that I have seen these kinds of issues before.

radumg commented 7 years ago

@ksobon - are you copying everything needed from the project references in the post-build steps ? that's where I typically copy over these reference DLLs to the %APPDATA%\...\PackageName-Dev\bin location to enable testing the dev package alongside the production one published on the package manager.

ksobon commented 7 years ago

my bad...i misunderstood the complain. Yes, if building from source, I might have missed that copy statement. I thought that package was installed from package manager and was missing files. That should not have happened. I will check this out.

pabloderen commented 7 years ago

@ksobon @radumg Maybe I explain it wrong. The issue happens using the version downloaded from the dynamo package manager. It seems HtmlAgilityPack.dll was not included with the other dlls in \bin. When i said "issue solved", I didn't built from source . Just downloaded HtmlAgilityPack.dll 1.4.9.5 with NuGet and paste it on the package folder.

ksobon commented 7 years ago

@pabloderen now I know what's up. Ok, i will check this out. Thanks for reporting.

ksobon commented 6 years ago

@pabloderen I added that missing DLL to the package and posted an update 2018.0.1 Thanks for reporting.