[Mono-bugs] [Bug 79310][Maj] New - Executing domains in different threads
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Sep 6 18:20:01 EDT 2006
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 joe at otee.dk.
http://bugzilla.ximian.com/show_bug.cgi?id=79310
--- shadow/79310 2006-09-06 18:20:01.000000000 -0400
+++ shadow/79310.tmp.26373 2006-09-06 18:20:01.000000000 -0400
@@ -0,0 +1,110 @@
+Bug#: 79310
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: joe at otee.dk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Executing domains in different threads
+
+When creating domains from different threads, either an assert is hit or unhandled null
+exceptions are thrown. This happens on osx ppc machines as well as osx intel machines. (I
+haven't tested other platforms, but i presume it will behave the same)
+
+
+
+** ERROR **: file assembly.c: line 1400 (mono_assembly_load_from_full): assertion failed:
+(image->assembly == NULL)
+
+or
+
+Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of
+an object
+in <0x0006c> System.Runtime.Serialization.Formatters.Binary.ObjectReader:RegisterObject
+(Int64 objectId, System.Object objectInstance, System.Runtime.Serialization.SerializationInfo info,
+Int64 parentObjectId, System.Reflection.MemberInfo parentObjectMemeber, System.Int32[]
+indices)
+in <0x000fc> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadNextObject
+(System.IO.BinaryReader reader)
+in <0x000ec> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObjectGraph
+(System.IO.BinaryReader reader, Boolean readHeaders, System.Object result,
+System.Runtime.Remoting.Messaging.Header[] headers)
+in <0x001b0>
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:NoCheckDeserialize
+(System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler
+handler)
+in <0x00020> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deserialize
+(System.IO.Stream serializationStream)
+in <0x00080> System.Runtime.Remoting.Channels.CADSerializer:DeserializeObject
+(System.IO.MemoryStream mem)
+in <0x0012c> System.Runtime.Remoting.RemotingServices:GetDomainProxy
+(System.AppDomain domain)
+in <0x000cc> System.AppDomain:CreateDomain (System.String friendlyName,
+System.Security.Policy.Evidence securityInfo, System.Ap
+
+
+A test case can be downloaded here:
+www.otee.dk/joe/thread_domain.zip
+1. cd into the extracted folder
+2. mono RunThis.exe
+
+
+
+Just in case c# sample is here:
+
+----- RunThis.cs
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Threading;
+class UnityDomainLoad
+{
+ static int gDomainCounter = 0;
+
+ public static void ThreadProc()
+ {
+ System.Console.WriteLine("Starting Thread proc");
+
+ System.AppDomain m_Domain = null;
+
+ m_Domain = System.AppDomain.CreateDomain("UnityRuntime " + gDomainCounter+
++);
+
+ System.Console.WriteLine("Done create domain");
+
+ m_Domain.ExecuteAssembly("ExecuteAssembly.exe");
+
+ System.Console.WriteLine("End Thread proc");
+ }
+
+ public static void Main ()
+ {
+ for (int i=0;i<10;i++)
+ {
+ Thread t = new Thread(new ThreadStart(ThreadProc));
+ t.Start();
+ }
+ }
+}
+-------
+
+--- ExecuteAssembly.cs
+public class ExecuteAssembly
+{
+ public static void Main ()
+ {
+ System.Console.WriteLine("***Executing domain code");
+ }
+}
+
+----
More information about the mono-bugs
mailing list