Bug 365 - App crashes when entering text
Summary: App crashes when entering text
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2011-08-22 21:41 UTC by Matthieu Guyonnet-Duluc
Modified: 2011-08-28 10:41 UTC (History)
2 users (show)

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


Attachments
sample code master-details (13.22 KB, application/zip)
2011-08-22 21:41 UTC, Matthieu Guyonnet-Duluc
Details


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:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Matthieu Guyonnet-Duluc 2011-08-22 21:41:05 UTC
Created attachment 165 [details]
sample code master-details

After entering a text field and typing with the iOS keyboard or the MacBook one the application crashes with this exception (see below). The workaround is to disable all the keyboard options in the settings screen (see http://monotouch.2284126.n4.nabble.com/app-exits-whenever-i-try-to-enter-some-text-td3757809.html)

Version info: MD 2.4.2 / MT 4.0.4.1  (eval downloaded today) / iOS 4.3 / Xcode 3 / OSX Lion 

Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Users/matthieu/Projects/Table/Table/bin/iPhoneSimulator/Debug/Table.exe
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/Mono.Security.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.dll [External]
Stacktrace:

  at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x0009f, 0xffffffff>
  at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Developer/MonoTouch/Source/monotouch/monotouch/UIKit/UIApplication.cs:26
  at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Developer/MonoTouch/Source/monotouch/monotouch/UIKit/UIApplication.cs:31
  at Table.Application.Main (string[]) [0x00000] in /Users/matthieu/Projects/Table/Table/Main.cs:14
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>

Native stacktrace:

	0   Table                               0x000d0de8 mono_handle_native_sigsegv + 343
	1   Table                               0x0000f74c mono_sigsegv_signal_handler + 322
	2   libsystem_c.dylib                   0x940c159b _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   UIKit                               0x02027538 -[UITextChecker _checker] + 82
	5   UIKit                               0x02028de9 -[UITextChecker checkSpellingOfString:startingAt:language:wrap:correction:] + 172
	6   UIKit                               0x02028c45 -[UITextChecker rangeOfMisspelledWordInString:range:startingAt:wrap:language:] + 133
	7   UIKit                               0x01e5bf94 -[UIWebDocumentView checkSpellingOfString:] + 266
	8   CoreFoundation                      0x00e31c7d __invoking___ + 29
	9   CoreFoundation                      0x00e31b51 -[NSInvocation invoke] + 145
	10  CoreFoundation                      0x00e5f858 -[NSInvocation invokeWithTarget:] + 72
	11  CoreFoundation                      0x00e32a04 ___forwarding___ + 1124
	12  CoreFoundation                      0x00e32522 _CF_forwarding_prep_0 + 50
	13  WebKit                              0x04e72202 _ZN15WebEditorClient20checkTextOfParagraphEPKtiyRN3WTF6VectorIN7WebCore18TextCheckingResultELm0EEE + 130
	14  WebCore                             0x051cb6ac _ZN7WebCore6Editor40markAllMisspellingsAndBadGrammarInRangesEbPNS_5RangeEbS2_b + 972
	15  WebCore                             0x051cd73f _ZN7WebCore6Editor29markMisspellingsAndBadGrammarERKNS_16VisibleSelectionEbS3_ + 175
	16  WebCore                             0x05222d94 _ZN7WebCore5Frame25respondToChangedSelectionERKNS_16VisibleSelectionEb + 2932
	17  WebCore                             0x0589080d _ZN7WebCore19SelectionController12setSelectionERKNS_16VisibleSelectionEbbbNS_15TextGranularityE + 1421
	18  WebCore                             0x058916dd _ZN7WebCore19SelectionController5clearEv + 77
	19  WebKit                              0x04ea43d9 -[WebHTMLView resignFirstResponder] + 345
	20  WebCore                             0x059bbb05 -[WAKView _handleResponderCall:] + 53
	21  WebCore                             0x059bbb59 _ZL17responderCallbackP6WKView27WKViewResponderCallbackTypePv + 41
	22  WebCore                             0x059e8fdf WKViewResignFirstResponder + 47
	23  WebCore                             0x059ebadd WKWindowMakeFirstResponder + 61
	24  UIKit                               0x01d7eb5e -[UIFieldEditor becomeFieldEditorForView:] + 268
	25  UIKit                               0x01d6ed9e -[UITextField _resignFirstResponder] + 175
	26  UIKit                               0x01da30d6 -[UIResponder resignFirstResponder] + 455
	27  UIKit                               0x01d6a97f -[UITextField resignFirstResponder] + 79
	28  UIKit                               0x01da3293 -[UIResponder becomeFirstResponder] + 280
	29  UIKit                               0x01f6b961 -[UITextInteractionAssistant setFirstResponderIfNecessary] + 208
	30  UIKit                               0x01f6e5e2 -[UITextInteractionAssistant oneFingerTap:] + 1676
	31  UIKit                               0x01f654f2 -[UIGestureRecognizer _updateGestureWithEvent:] + 730
	32  UIKit                               0x01f614fe -[UIGestureRecognizer _delayedUpdateGesture] + 47
	33  UIKit                               0x01f67afc _UIGestureRecognizerUpdateObserver + 584
	34  UIKit                               0x01f67ce1 _UIGestureRecognizerUpdateGesturesFromSendEvent + 51
	35  UIKit                               0x01cfb32a -[UIWindow _sendGesturesForEvent:] + 1292
	36  UIKit                               0x01cf6ca3 -[UIWindow sendEvent:] + 105
	37  UIKit                               0x01cd9c37 -[UIApplication sendEvent:] + 447
	38  UIKit                               0x01cdef2e _UIApplicationHandleEvent + 7576
	39  GraphicsServices                    0x0404f992 PurpleEventCallback + 1550
	40  CoreFoundation                      0x00ea2944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
	41  CoreFoundation                      0x00e02cf7 __CFRunLoopDoSource1 + 215
	42  CoreFoundation                      0x00dfff83 __CFRunLoopRun + 979
	43  CoreFoundation                      0x00dff840 CFRunLoopRunSpecific + 208
	44  CoreFoundation                      0x00dff761 CFRunLoopRunInMode + 97
	45  GraphicsServices                    0x0404e1c4 GSEventRunModal + 217
	46  GraphicsServices                    0x0404e289 GSEventRun + 115
	47  UIKit                               0x01ce2c93 UIApplicationMain + 1160
	48  ???                                 0x077d7d23 0x0 + 125664547
	49  ???                                 0x077d7af4 0x0 + 125663988
	50  ???                                 0x077d70f4 0x0 + 125661428
	51  ???                                 0x077d6f4c 0x0 + 125661004
	52  ???                                 0x077d709e 0x0 + 125661342
	53  Table                               0x0000f507 mono_jit_runtime_invoke + 1332
	54  Table                               0x001ed259 mono_runtime_invoke + 137
	55  Table                               0x001ef940 mono_runtime_exec_main + 669
	56  Table                               0x001eed2a mono_runtime_run_main + 843
	57  Table                               0x000a3093 mono_jit_exec + 200
	58  Table                               0x002a163d main + 4060
	59  Table                               0x00002819 _start + 208
	60  Table                               0x00002748 start + 40

Debug info from gdb:

dyld: could not load inserted library: /Users/matthieu/Library/Application Support/iPhone Simulator/4.3/Applications/36E8C94B-7275-47F5-900D-10A74BA4ACC0/Table.app/monotouch-fixes.dylib


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Comment 1 Sebastien Pouliot 2011-08-23 08:39:47 UTC
I do not get any crash (using MonoTouch 4.1 on Snow Leopard) when I used my iMac keyboard or the iOS virtual keyboard. It's either fixed in more recent MonoTouch or it only occurs in a specific sequence. 

Can you tell me, step by step, how you get your crash ? (ans I'll try to replay this as accurately as possible). Thanks
Comment 2 Matthieu Guyonnet-Duluc 2011-08-23 08:46:44 UTC
Hello Sebastien,

Yes if you run the app attached, you choose one row in the Table and you enter in the firstname field (normally the focus is already on it) and begin to type a letter. The app crashes.

One question: is it normal that the evaluation version is still at 4.0.4.1 (from the file /Developer/MonoTouch/Version) ? I download it again yesterday to be sure to use the latest binaries.
Comment 3 Sebastien Pouliot 2011-08-23 11:21:33 UTC
This works fine for me (no crash).

Answer: 4.1 is a beta release (that will lead to stable 4.2) and is not available as evaluation. A newer 4.0.x release (w/some fixes) will _likely_ be made (and available as evaluation) before 4.2 release.
Comment 4 Matthieu Guyonnet-Duluc 2011-08-23 11:25:18 UTC
Ok thanks for the answer. I will test it with the next version of the eval package (I'm using MonoTouch only to learn at the moment - witht the book from Mike Bluestein)
Comment 5 Sebastien Pouliot 2011-08-28 10:41:53 UTC
Ok, please re-open the bug if you can still duplicate it using 4.2 (once released). Thanks!