Hello, Can you try using the latest release of Monobjc (2.0.404) ? A related issue has been fixed in this release (see bug#000180 http://tracker.monobjc.net/view.php?id=180).
Regards, Laurent Etiemble. 2009/8/17 Kenny Clement <[email protected]>: > Hi, > > Monobjc version: 1.0.324.0. I'm using the 1.0 assemblies, because I need > Tiger support. > Haven't tried in the new version of Monobjc yet. > > mono -V: > Mono JIT compiler version 2.4 (tarball Fri Mar 13 09:25:35 MDT 2009) > > It's reproducable in any Monobjc app with 1 single line: > > AppDomain.CreateDomain("name"); > > I've put this line in the SimpleCocoaApp Sample > SimpleCocoaApp/HelloController.cs > Just put this line in the awakeFromNib function and the app will crash at > startup. > > Regards, > > > Kenny Clement > > > Laurent Etiemble wrote: >> >> Hello, >> >> Can you indicate the version of Mono and Monobjc ? Also, can you post >> a small sample code to demonstrate the problem ? >> >> Regards, Laurent Etiemble. >> >> 2009/8/13 Kenny Clement<[email protected]>: >> >>> >>> Hi, >>> >>> I have a problem. >>> I've noticed that when you use >>> >>> AppDomain.CreateDomain("name"); >>> >>> and somewhere in your app, there is a reference to the MonobjC assembly, >>> it >>> throws an exception. >>> In other words, it's not possible to create a second AppDomain. >>> Is there any way to get around this? >>> In the second AppDomain, I don't even need Monobjc... >>> >>> The exception can be found below. >>> >>> Thanks, >>> >>> - Kenny >>> >>> >>> Exception: >>> TypeInitializationException >>> An exception was thrown by the type initializer for >>> System.Runtime.Serialization.Formatters.Binary.CodeGenerator >>> at >>> >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.CreateMemberTypeMetadata >>> (System.Type type) [0x00000] >>> at >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.GetObjectData >>> (System.Object obj, >>> System.Runtime.Serialization.Formatters.Binary.TypeMetadata& metadata, >>> System.Object& data) [0x00000] >>> at >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObject >>> (System.IO.BinaryWriter writer, Int64 id, System.Object obj) [0x00000] >>> at >>> >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectInstance >>> (System.IO.BinaryWriter writer, System.Object obj, Boolean isValueObject) >>> [0x00000] >>> at >>> >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteQueuedObjects >>> (System.IO.BinaryWriter writer) [0x00000] >>> at >>> >>> System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteObjectGraph >>> (System.IO.BinaryWriter writer, System.Object obj, >>> System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] >>> at >>> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize >>> (System.IO.Stream serializationStream, System.Object graph, >>> System.Runtime.Remoting.Messaging.Header[] headers) [0x00000] >>> at >>> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize >>> (System.IO.Stream serializationStream, System.Object graph) [0x00000] >>> at System.Runtime.Remoting.Channels.CADSerializer.SerializeObject >>> (System.Object obj) [0x00000] >>> at System.Runtime.Remoting.Messaging.CADMethodCallMessage..ctor >>> (IMethodCallMessage callMsg) [0x00000] >>> at System.Runtime.Remoting.Messaging.CADMethodCallMessage.Create >>> (IMessage >>> callMsg) [0x00000] >>> at >>> System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage >>> (IMessage msgRequest) [0x00000] >>> >>> InnerException: NotSupportedException >>> The invoked member is not supported in a dynamic module. >>> at System.Reflection.Emit.AssemblyBuilder.GetExportedTypes () [0x00000] >>> at Monobjc.ObjectiveCRuntime.ScanAssembly (System.Reflection.Assembly >>> assembly) [0x00000] >>> at Monobjc.ObjectiveCRuntime.CurrentDomain_AssemblyLoad (System.Object >>> sender, System.AssemblyLoadEventArgs args) [0x00000] >>> at System.AppDomain.DoAssemblyLoad (System.Reflection.Assembly assembly) >>> [0x00000] >>> at (wrapper managed-to-native) >>> System.Reflection.Emit.AssemblyBuilder:basic_init >>> (System.Reflection.Emit.AssemblyBuilder) >>> at System.Reflection.Emit.AssemblyBuilder..ctor >>> (System.Reflection.AssemblyName n, System.String directory, >>> AssemblyBuilderAccess access, Boolean corlib_internal) [0x00000] >>> at System.AppDomain.DefineInternalDynamicAssembly >>> (System.Reflection.AssemblyName name, AssemblyBuilderAccess access) >>> [0x00000] >>> at (wrapper remoting-invoke-with-check) >>> System.AppDomain:DefineInternalDynamicAssembly >>> >>> (System.Reflection.AssemblyName,System.Reflection.Emit.AssemblyBuilderAccess) >>> at System.Runtime.Serialization.Formatters.Binary.CodeGenerator..cctor >>> () >>> [0x00000] >>> >>> >>> >

