Bug 184 - Crash on Disposing when a textfield was the first responder
Summary: Crash on Disposing when a textfield was the first responder
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-08-04 23:48 UTC by Dean Cleaver
Modified: 2011-09-07 08:53 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Dean Cleaver 2011-08-04 23:48:21 UTC
I believe it is when the text field was the first responder when the view was popped off, and it crashes on disposing:

System.MissingMethodException: No constructor found for MonoTouch.UIKit.UITextField+_UITextFieldDelegate::.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 <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0 
  at MonoTouch.ObjCRuntime.Runtime.ConstructNSObject (IntPtr ptr, IntPtr klass) [0x00000] in <filename unknown>:0 
  at MonoTouch.ObjCRuntime.Runtime.GetNSObject (IntPtr ptr) [0x00000] in <filename unknown>:0 
  at MonoTouch.ObjCRuntime.Runtime.GetNSObjectWrapped (IntPtr ptr) [0x00000] in <filename unknown>:0 
  at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:GetNSObjectWrapped (intptr)
  at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0 
  at KleverLogic.FlashValet.iPhone.Valet.Application.Main (System.String[] args) [0x000ed] in /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/Main.cs:62
Comment 1 Sebastien Pouliot 2011-08-07 12:23:08 UTC
Please provide a small , self contained, test case to duplicate the issue.
Comment 2 Sebastien Pouliot 2011-09-07 08:53:50 UTC
This looks like something was collected by the GC (because there were no more managed reference to the delegate). However we can't be sure without a test case. Please re-open the bug report, with a test case, if you can still duplicate the issue. Thanks.