[Mono-bugs] [Bug 515355] New: Delegate serialization doesn't handle assemblies with same name
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jun 22 15:53:18 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=515355
Summary: Delegate serialization doesn't handle assemblies with
same name
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: rkumpera at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
If you have two assemblies with the same name but different extensions,
delegate serialization code fails to resolve the proper target assembly and
type.
How to reproduce:
bug.cs:
using System;
class Program
{
static void OtherDomain () {
Console.WriteLine ("here {0}", AppDomain.CurrentDomain);
}
static void Main(string[] args)
{
AppDomainSetup setup = new AppDomainSetup ();
setup.ApplicationBase = ".";
AppDomain newDomain = AppDomain.CreateDomain ("NewDomain", null,
setup);
newDomain.DoCallBack (Program.OtherDomain);
}
}
Compile this into bug.exe, the create a bug.dll without the Program type.
At runtime this will throw:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation.
Server stack trace:
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
...
Exception rethrown at [0]:
---> System.ArgumentNullException: Argument cannot be null.
Parameter name: target
at System.Delegate.CreateDelegate (System.Type type, System.Type target,
System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000]
at System.Delegate.CreateDelegate (System.Type type, System.Type target,
System.String method) [0x00000]
This works under MS as expected.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list