[Mono-dev] Version-specific binding on non-strong-name assemblies: bug?
Brian Crowell
mono-devel at fluggo.com
Mon Jun 12 20:44:52 EDT 2006
I have an application that creates a new AppDomain under Mono. The application
is under /home at the moment. It loads into this assembly, through a
cross-AppDomain delegate, a file called hostee.dll, which lives in
/var/lib/klotron-monitor/images. (The domain's ApplicationBase is set to this
directory when it is created.)
hostee.dll references yet another assembly in /var/lib/klotron-monitor/images.
However, if the version of that assembly does not match the version specified in
hostee.dll, I get an assembly-not-found error, a SIGSEGV, a stack trace, a
native stack trace, and then a command prompt:
===============================================================
Host Proxy: Loading common interface...
Host Proxy: Loading hostee...
/var/lib/klotron-monitor/images/hostee.dll
** (bin/MonitorHost.exe:13141): WARNING **: The following assembly referenced
from /var/lib/klotron-monitor/images/hostee.dll could not be loaded:
Assembly: Clotron.MobileResource (assemblyref_index=1)
Version: 3.0.2354.22385
Public Key: (none)
The assembly was not found in the Global Assembly Cache, a path listed in the
MONO_PATH environment variable, or in the location of the executing assembly
(/var/lib/klotron-monitor/images).
** (bin/MonitorHost.exe:13141): WARNING **: The class
Clotron.MobileResource.Server.Interfaces.INetworkMonitorService could not be
loaded, used in Clotron.MobileResource, Version=3.0.2354.22385, Culture=neutral
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Stacktrace:
in (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType
(System.Reflection.Module,string,bool,bool) <0x4>
in (wrapper managed-to-native) System.Reflection.Assembly:InternalGetType
(System.Reflection.Module,string,bool,bool) <0xffffffc6>
in System.Reflection.Assembly:GetType (string,bool,bool) (at
/tmp/scratch/BUILD/mono-1.1.14/mcs/class/corlib/System.Reflection/Assembly.cs:341)
in System.Activator:CreateInstance
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
(at /tmp/scratch/BUILD/mono-1.1.14/mcs/class/corlib/System/Activator.cs:148)
in System.AppDomain:CreateInstance
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
(at /tmp/scratch/BUILD/mono-1.1.14/mcs/class/corlib/System/AppDomain.cs:291)
in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstance
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
<0xffffffb6>
in System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
(at /tmp/scratch/BUILD/mono-1.1.14/mcs/class/corlib/System/AppDomain.cs:311)
in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
<0xfffffdb4>
in (wrapper xdomain-dispatch) System.AppDomain:CreateInstanceAndUnwrap
(object,byte[]&,byte[]&,string,string,bool) <0xfffe33be>
in (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
<0xffffff76>
in (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap
(string,string,bool,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo,object[],System.Security.Policy.Evidence)
<0xfff9b350>
in Loader.Class1:LoadDomain (string) <0x1a8>
in Loader.Class1:LoadDefaultImageDomain () <0x59>
in Loader.Class1:ContactService () <0x432>
in Loader.Class1:HandleTimerElapsed (object,System.Timers.ElapsedEventArgs) <0x1c>
in (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_ElapsedEventArgs
(object,System.Timers.ElapsedEventArgs) <0xffffdd57>
in System.Timers.Timer:Callback (object) <0x1cf>
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object
(object) <0xffffff95>
in (wrapper runtime-invoke) System.Object:runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xc72643cf>
Native stacktrace:
mono(mono_handle_native_sigsegv+0xbb) [0x815385b]
mono [0x813e1bf]
[0xffffe440]
mono [0x808b683]
mono(mono_class_init+0x555) [0x808ed75]
mono [0x80ee9ba]
mono(mono_reflection_get_type+0x2b) [0x80eeb3b]
mono [0x80c900e]
[0x414cf04c]
[0x414cefdf]
[0x414dd1d2]
[0x414dd11e]
[0x414dd0ae]
[0x414dcf77]
[0x414dcf06]
[0x414dcbcd]
[0x414bfc7f]
[0x414bfaaf]
[0x4145ad59]
[0x4145aad2]
[0x40edc8fb]
[0x40edc295]
[0x40edc262]
[0x40ed9f68]
[0x40ed9d81]
[0x40ed9cce]
mono [0x813e070]
mono(mono_runtime_invoke+0x27) [0x80d7847]
mono(mono_runtime_invoke_array+0x270) [0x80d8d30]
mono(mono_message_invoke+0xc5) [0x80da8f5]
mono [0x80a5e6f]
mono [0x80a6699]
mono [0x809a7d2]
mono [0x80f6a57]
mono [0x81156b5]
/lib/tls/libpthread.so.0 [0x400cf297]
/lib/tls/libc.so.6(__clone+0x5e) [0x401ca37e]
Aborted
===============================================================
I was under the impression that when assemblies were not signed with strong
names, they didn't get version checking. They clearly do here, though, because
when the versions match, no stack trace is produced, and the application keeps
moving.
What's the deal? Or is there something else I should be looking for?
--Brian
More information about the Mono-devel-list
mailing list