[Mono-dev] AppDomains
Matthijs ter Woord
matthijsterwoord at gmail.com
Mon Nov 13 11:10:27 EST 2006
Hi,
I'm the project coordinator of the NApf project. (see
http://www.codeplex.com/NApf)
For testing our project, we designed a special test harness, which starts
small test applications in separate AppDomains. To transfer test states back
to the "runner", the child domains get callback methods using the
AppDomain.SetData/GetData methods. Whe the SetData method gets called. I get
a very strange exception (all namespaces starting with NApf are ours):
----- START SNIPPET
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]
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000]
at System.Runtime.Serialization.ObjectRecord.LoadData
(System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector
selector, StreamingContext context) [0x00000]
at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result,
System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000]
at System.Runtime.Remoting.RemotingServices.DeserializeCallData
(System.Byte[] array) [0x00000]
at (wrapper xdomain-dispatch) System.AppDomain:SetData
(object,byte[]&,byte[]&,string)
Exception rethrown at [0]:
---> System.Runtime.Serialization.SerializationException: Serialization
will not deserialize delegates to non-public methods.
at System.DelegateSerializationHolder+DelegateEntry.DeserializeDelegate
(System.Runtime.Serialization.SerializationInfo info) [0x00000]
at System.DelegateSerializationHolder..ctor
(System.Runtime.Serialization.SerializationInfo info, StreamingContext ctx)
[0x00000]
at <0x00000> <unknown method>
at (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke (object,object[])
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] --- End of inner
exception stack trace ---
at (wrapper xdomain-invoke) System.AppDomain:SetData (string,object)
at (wrapper remoting-invoke-with-check) System.AppDomain:SetData
(string,object)
at NApf.UnitTests.Runner.TestsRunner.WorkerThread () [0x00000]
----- END SNIPPET
What to do?
Regards,
Matthijs ter Woord
More information about the Mono-devel-list
mailing list