Could not load type 'az' from assembly

Discussion forum for the Picoscope 6 Linux software
Post Reply
cyril42e
Newbie
Posts: 0
Joined: Tue Jul 29, 2014 9:07 pm

Could not load type 'az' from assembly

Post by cyril42e »

Hi,

I insalled the latest version of picoscope with its dependencies (for 2204a) :
  • libpicoipp-1.1.2-4r21.x86_64.rpm
    libusbtc08-1.8.8-1r03.x86_64.rpm
    libusbdrdaq-1.0.2-1r04.x86_64.rpm
    libps2000a-1.1.2-5r04.x86_64.rpm
    picoscope-6.10.1-4r8.noarch.rpm
I'm running Gentoo distribution, so I used the RPM packages that I manually installed by disabling the dependencies check, after resolving them manually (rpm -i --nodeps).

When trying to run the "picoscope" executable, I get the following error :

Code: Select all

Unhandled Exception: System.TypeLoadException: Could not load type 'az' from assembly 'PicoScope.GTK, Version=6.10.1.8, Culture=neutral, PublicKeyToken=d07fd3de7c3ccbb2'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'az' from assembly 'PicoScope.GTK, Version=6.10.1.8, Culture=neutral, PublicKeyToken=d07fd3de7c3ccbb2'.
Where is this 'az' type supposed to come from ? Is there a missing system dependency, or a version incompatibility ?

My system package versions :
  • mono 2.10.9
    glibc 2.17
    gcc 4.7.3
    libusb 1.0.18
Thanks for your help !

mario_
Site Admin
Site Admin
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm

Re: Could not load type 'az' from assembly

Post by mario_ »

Hi Cyril,

This kind of error usually tells that one or more dlls are not available to the assembly. Assuming that contents of /opt/picoscope/lib is on your system as it would be extracted from picoscope package (plus libp* files as drivers) and MONO_PATH is set /opt/picoscope/lib ( or you use picoscope script provided ), here is the list of DLLs that should your mono installation provide:

Code: Select all

/usr/lib/mono/4.0/mscorlib.dll
/usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
/usr/lib/mono/gac/atk-sharp/2.12.0.0__35e10195dab3c99f/atk-sharp.dll
/usr/lib/mono/gac/gdk-sharp/2.12.0.0__35e10195dab3c99f/gdk-sharp.dll
/usr/lib/mono/gac/glib-sharp/2.12.0.0__35e10195dab3c99f/glib-sharp.dll
/usr/lib/mono/gac/gtk-dotnet/2.12.0.0__35e10195dab3c99f/gtk-dotnet.dll
/usr/lib/mono/gac/gtk-sharp/2.12.0.0__35e10195dab3c99f/gtk-sharp.dll
/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll
/usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
/usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
/usr/lib/mono/gac/System.Management/4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
/usr/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
/usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
/usr/lib/mono/gac/UiaAtkBridge/1.0.0.0__f4ceacb585d99812/UiaAtkBridge.dll
/usr/lib/mono/gac/UIAutomationBridge/3.0.0.0__31bf3856ad364e35/UIAutomationBridge.dll
/usr/lib/mono/gac/UIAutomationClient/3.0.0.0__31bf3856ad364e35/UIAutomationClient.dll
/usr/lib/mono/gac/UIAutomationProvider/3.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
/usr/lib/mono/gac/UIAutomationSource/3.0.0.0__31bf3856ad364e35/UIAutomationSource.dll
/usr/lib/mono/gac/UIAutomationTypes/3.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
/usr/lib/mono/gac/UIAutomationWinforms/1.0.0.0__f4ceacb585d99812/UIAutomationWinforms.dll
/usr/lib/mono/gac/WindowsBase/4.0.0.0__31bf3856ad364e35/WindowsBase.dll
Please verify if they're present either in gac ( `gacutil -l | grep lib_name_without_dot_dll` ) or available at all in your mono compilation.

Mario

mario_
Site Admin
Site Admin
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm

Re: Could not load type 'az' from assembly

Post by mario_ »

Also, please note that correct driver for 2204a is libps2000.

cyril42e
Newbie
Posts: 0
Joined: Tue Jul 29, 2014 9:07 pm

Re: Could not load type 'az' from assembly

Post by cyril42e »

mario_ wrote:here is the list of DLLs that should your mono installation provide
Thank you for this information, I was indeed missing several DLLs. In addition to installing mono, I had to install the following Gentoo packages:
  • atk-sharp
    gdk-sharp
    glib-sharp
    gtk-dotnet-sharp
    gtk-sharp
mario_ wrote:Also, please note that correct driver for 2204a is libps2000.
Thanks, good to know as it's not obvious (but I probably failed to read some doc).

So now it works, except that it crashes when the splash screen reads "Enumerating devices". The device is not plugged in, is it normal that it crashes if the picoscope is not plugged in? I cannot test with the device plugged in right now.

mario_
Site Admin
Site Admin
Posts: 112
Joined: Fri Sep 13, 2013 12:57 pm

Re: Could not load type 'az' from assembly

Post by mario_ »

If there is no device plugged it - it should call Demo device.

it is possible that it still crashes due to some other libraries loading in. Try running it without management script:

Code: Select all

cd /opt/picoscope/lib
mono PicoScope.GTK.exe
Should produce some helpful messages. Alternatively you could look for trace.xml files in folder inside ~/.local/share/Pico Technology/

Mario

cyril42e
Newbie
Posts: 0
Joined: Tue Jul 29, 2014 9:07 pm

Re: Could not load type 'az' from assembly

Post by cyril42e »

System.NullReferenceException: Object reference not set to an instance of an object at pL.a () [0x00000] in :0 at eH.a (jT , ProbeCategories ) [0x00000] in :0 at eH.a (jT , Boolean ) [0x00000] in :0 at dm.m (Boolean ) [0x00000] in :0 at ap.a () [0x00000] in :0 at az.a (System.Object , System.EventArgs ) [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in :0 at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in :0 at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in :0 at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in :0 at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in :0 at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in :0 Exception: Error: Inner Exception:System.NullReferenceException: Object reference not set to an instance of an object at pL.a () [0x00000] in :0 at eH.a (jT , ProbeCategories ) [0x00000] in :0 at eH.a (jT , Boolean ) [0x00000] in :0 at dm.m (Boolean ) [0x00000] in :0 at ap.a () [0x00000] in :0 at az.a (System.Object , System.EventArgs ) [0x00000] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
Is the file pL.a part of picoscope suite? Is there a way to get debug info?

Thanks
-->
Actually I was still missing some DLLs you mentioned before, I also had to manually install (because not available in Gentoo's package manager):
  • mono-uia-2.1-31.1.x86_64.rpm
    uiaatkbridge-2.0.2-10.1.2.x86_64.rpm
    uiautomationwinforms-2.0.2-10.1.1.x86_64.rpm
However I still get the same crash and the same error in the trace, related to a null reference:

Code: Select all

[...]
Device: Info: No of Devices Found: 0
InitalDeviceLoadSequence: Info: Complete
libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Marshaling show signal
Exception: Error: Unhandled Exception:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at pL.a () [0x00000] in :0 
  at eH.a (jT , ProbeCategories ) [0x00000] in :0 
  at eH.a (jT , Boolean ) [0x00000] in :0 
  at dm.m (Boolean ) [0x00000] in :0 
  at ap.a () [0x00000] in :0 
  at az.a (System.Object , System.EventArgs ) [0x00000] in :0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in :0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in :0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in :0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in :0 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in :0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in :0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in :0 
Exception: Error: Inner Exception:System.NullReferenceException: Object reference not set to an instance of an object
  at pL.a () [0x00000] in :0 
  at eH.a (jT , ProbeCategories ) [0x00000] in :0 
  at eH.a (jT , Boolean ) [0x00000] in :0 
  at dm.m (Boolean ) [0x00000] in :0 
  at ap.a () [0x00000] in :0 
  at az.a (System.Object , System.EventArgs ) [0x00000] in :0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 
Is the file pL.a part of picoscope suite? Is there a way to get debug info?

Thanks