[Mono-bugs] [Bug 70116][Nor] New - Passing non-serializable classes across appdomains.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 1 Dec 2004 17:35:48 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by miguel@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70116
--- shadow/70116 2004-12-01 17:35:48.000000000 -0500
+++ shadow/70116.tmp.19287 2004-12-01 17:35:48.000000000 -0500
@@ -0,0 +1,81 @@
+Bug#: 70116
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: JIT
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: miguel@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Passing non-serializable classes across appdomains.
+
+The following program produces an exception on Mono:
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+class X {
+ static void Main ()
+ {
+ AppDomain ad = AppDomain.CreateDomain("MyDomain",
+AppDomain.CurrentDomain.Evidence);
+
+ Assembly [] asms = ad.GetAssemblies();
+ }
+}
+
+The program works as expected on MS.NET
+
+The output produced on Mono is:
+
+Unhandled Exception: System.Runtime.Serialization.SerializationException:
+Type System.Reflection.Emit.AssemblyBuilder is not marked as Serializable.
+
+Server stack trace:
+in <0x000be>
+System.Runtime.Serialization.Formatters.Binary.BinaryCommon:CheckSerializable
+(System.Type,System.Runtime.Serialization.ISurrogateSelector,System.Runtime.Serialization.StreamingContext)
+in <0x00166>
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:GetObjectData
+(object,System.Runtime.Serialization.Formatters.Binary.TypeMetadata&,object&)
+in <0x00044>
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObject
+(System.IO.BinaryWriter,long,object)
+in <0x0013d>
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectInstance
+(System.IO.BinaryWriter,object,bool)
+in <0x00035>
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteQueuedObjects
+(System.IO.BinaryWriter)
+in <0x00045>
+System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectGraph
+(System.IO.BinaryWriter,object,System.Runtime.Remoting.Messaging.Header[])
+in <0x00230>
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize
+(System.IO.Stream,object,System.Runtime.Remoting.Messaging.Header[])
+in <0x00015>
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize
+(System.IO.Stream,object)
+in <0x00090> System.Runtime.Remoting.RemotingServices:SerializeCallData
+(object)
+in <0x0010d> (wrapper xdomain-dispatch) System.AppDomain:GetAssemblies
+(object,byte[]&,byte[]&)
+
+
+Exception rethrown at [0]:
+
+in <0x00166> (wrapper xdomain-invoke) System.AppDomain:GetAssemblies ()
+in <0x0002b> (wrapper remoting-invoke-with-check)
+System.AppDomain:GetAssemblies ()
+in <0x00043> X:Main ()
+
+
+Notice that AssemblyBuilder is not flagged as serializable on .NET either.