Selector invoked from objective-c on a managed object has been GC'ed

We currently have to face several severe crash due to garbage collector behavior on IOS environment.
application carsh says:
"Selector invoked from objective-c on a managed object has been GC'ed ".
Did you experience such trouble ?
Is there any available workaround ?

Posts

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Can you create a test case I can look at for this error?

    We've recently made some changes that should resolve most of these errors, so I'd like to know why it's still happening.

  • Unfortunately these issues are completely random and very difficult to reproduce.
    So far, only the users of our application managed to reproduce these crash.

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    Can you at least get crash reports?

  • OlivierWALLUTOlivierWALLUT FRMember
    edited March 2013

    Here are crash reports with several components we developed : GridView, PickerView, PageList

    FATAL NomadVantage.OpenPharmaiOS.Application [(null)] - System.Exception: Selector invoked from objective-c on a managed object of type NomadVantage.OpenPharmaiOS.GridViewController (0x29022D20) that has been GC'ed ---> System.MissingMethodException: No constructor found for NomadVantage.OpenPharmaiOS.GridViewController::.ctor(System.IntPtr)
    at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0
    at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in :0

    FATAL NomadVantage.OpenPharmaiOS.Application [(null)] - System.Exception: Selector invoked from objective-c on a managed object of type NomadVantage.OpenPharmaiOS.PickerViewController (0x21C6ABD0) that has been GC'ed ---> System.MissingMethodException: No constructor found for NomadVantage.OpenPharmaiOS.PickerViewController::.ctor(System.IntPtr)
    at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0
    at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in :0

    FATAL NomadVantage.OpenPharmaiOS.Application [(null)] - System.Exception: Selector invoked from objective-c on a managed object of type NomadVantage.OpenPharmaiOS.PageListControl (0x48D870B0) that has been GC'ed ---> System.MissingMethodException: No constructor found for NomadVantage.OpenPharmaiOS.PageListControl::.ctor(System.IntPtr)
    at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in :0
    at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in :0
    at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in :0

  • RolfBjarneKvingeRolfBjarneKvinge USXamarin Team Xamurai

    This unfortunately does not reveal much new information. Finding a way to make it at least somewhat reproducible would be the only way to track it down.

    Have you tried simulating memory warnings in the simulator? That might reveal something more.

Sign In or Register to comment.