Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Rodrigo Kumpera
Missing constructor crashes that show up only with sgen enabled doesn't mean it's an sgen bug per-se, but only that with the default GC it won't be triggered. Sgen is usually much more aggressive in releasing memory that the default GC. If you have a sample that reliably crashes with sgen (no

Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Dotnet Projects
Thanks for the reply. I am not using SGEN but I am using following linker options --linkskip=mscorlib -aot nimt-trampolines=512 It only happens in release mode (device). Unfortunately I cannot repeat it but I get logs from customer and I get same errors any where I use. myUIVIewControler p =

Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Dotnet Projects
I am getting the error from MonoTouch..DialogViewController too. it might be related to the linker options I am using --linkskip=mscorlib -aot nimt-trampolines=512 at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x0] in filename unknown:0 at

Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Nic Wise
I'm pretty sure this is a known problem - you have let the managed version (C# version) go out of scope, and it's been garbage collected. The Cocoa side wants to use the object, so the runtime trys to make the managed version again - but it can't as it doesn't have an IntPtr constructor. If you

Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Dotnet Projects
I have to keep all Viewcontroller in the memory. Is there anything else I can do? Thanks Art On Mon, Aug 20, 2012 at 3:19 PM, Nic Wise n...@fastchicken.co.nz wrote: I'm pretty sure this is a known problem - you have let the managed version (C# version) go out of scope, and it's been garbage

Re: [MonoTouch] GC'ed --- System.MissingMethodException

2012-08-20 Thread Rodrigo Kumpera
This work-around will make your code work, but will cause your object to surface with no previous managed state, which is very very bad. The solution is trying to keep a reference to it from known live objects. On Mon, Aug 20, 2012 at 5:45 PM, Nic Wise n...@fastchicken.co.nz wrote: Make a