Bug SS-187
1 vote

Maxima: Draw2D/Draw3D unhandled exceptions

Created by Davide on 8/4/2014 5:04 PM Last Updated by Martin Kraska on 7/13/2017 2:23 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

An exception is thrown if the Image Region is not installed. I suggest to check if the image region assembly is loaded and then ask to install the plugin with a popup message.

 

************** Testo dell'eccezione **************
System.Reflection.TargetInvocationException: Eccezione generata dalla destinazione di una chiamata. ---> System.IO.FileNotFoundException: Impossibile caricare il file o l'assembly 'SharpVectors.Rendering.Gdi, Version=0.3.1.1595, Culture=neutral, PublicKeyToken=03902092284347e3' o una delle relative dipendenze. Impossibile trovare il file specificato.
Nome file: 'SharpVectors.Rendering.Gdi, Version=0.3.1.1595, Culture=neutral, PublicKeyToken=03902092284347e3'
   in MaximaPlugin.PlotImage.MaximaPluginCanvas.Init()
   in MaximaPlugin.PlotImage.MaximaPluginCanvas..ctor()

AVV: la registrazione dell'associazione di assembly è disattivata.
Per attivare la registrazione degli errori di associazione di assembly, impostare il valore del Registro di sistema [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) su 1.
Nota: alcune penalità di prestazione sono associate alla registrazione degli errori di associazione di assembly.
Per disattivare la funzionalità, rimuovere il valore del Registro di sistema [HKLM\Software\Microsoft\Fusion!EnableLog].

   --- Fine dell'analisi dello stack dell'eccezione interna ---
   in System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   in System.Activator.CreateInstance[T]()
   in SMath.Control.RegionHolder`1..ctor()
   in MaximaPlugin.PlotImage.MaximaPluginRegion..ctor(PlotType pt)
   in MaximaPlugin.MainClass.<SMath.Manager.IPlugin.Initialize>b__4(MenuButtonArgs args)
   in ..(Object , RegionBase , MenuButton )
   in ...(Object , EventArgs )
   in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   in System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   in System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ToolStrip.WndProc(Message& m)
   in System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

    Martin Kraska (Thursday, July 13, 2017 2:22 AM) #

In SMath 6398 and Maxima SVN 2418 it is possible to insert a draw region even if the ImageRegion plugin is not installed

    Davide (Monday, August 4, 2014 6:31 PM) #

I think that a simple  PluginsManager.IsPluginInstalled("63ddaef8-9a56-4ff6-938e-d590b638bf99") should be enough (to enable/disable the context menu items or as I've written, to show a popup insted of inserting the region)

    Martin Kraska (Monday, August 4, 2014 6:07 PM) #

Obviously, the Maxima draw regions rely on dlls from the ImageRegion plugin without giving SMath a chance to recognize this dependency.

Would there any problems to be expected, if the libraries were included in the Maxima Plugin and thus might occure twice in the extension folder (with some bad luck in different versions)?

As Kay won't have much time for SMath in the next months, I shall try to mitigate the problem by issuing a new portable distribution with the plugins pre-installed. This, however, has to wait until the recalculation problem upon inserting/deleting blank lines is resolved.

 

    Martin Kraska (Monday, August 4, 2014 6:07 PM) #

Obviously, the Maxima draw regions rely on dlls from the ImageRegion plugin without giving SMath a chance to recognize this dependency.

Would there any problems to be expected, if the libraries were included in the Maxima Plugin and thus might occure twice in the extension folder (with some bad luck in different versions)?

As Kay won't have much time for SMath in the next months, I shall try to mitigate the problem by issuing a new portable distribution with the plugins pre-installed. This, however, has to wait until the recalculation problem upon inserting/deleting blank lines is resolved.

 

    Martin Kraska (Monday, August 4, 2014 6:07 PM) #

Obviously, the Maxima draw regions rely on dlls from the ImageRegion plugin without giving SMath a chance to recognize this dependency.

Would there any problems to be expected, if the libraries were included in the Maxima Plugin and thus might occure twice in the extension folder (with some bad luck in different versions)?

As Kay won't have much time for SMath in the next months, I shall try to mitigate the problem by issuing a new portable distribution with the plugins pre-installed. This, however, has to wait until the recalculation problem upon inserting/deleting blank lines is resolved.