Strange Crash in EKEventEditViewController

DavidCarawayDavidCaraway USBeta ✭✭
edited October 16 in Xamarin.iOS

I have a calendar app used by several thousand users that displays an EKEventEditViewController. The code to display it is fairly standard and has been in use for several years. Since iOS 12 a small number of users are seeing crashes when they try to enter text into the Title text field. Again, it's only a small number of users. One user sent me a video showing how certain letters would trigger the crash and others would not. Interestingly enough if he went down and entered something in notes first he could go back and enter anything in the title without it crashing. Looking at the stack trace it would appear as if the crash is occurring in CoreSuggestions. Frankly, it looks like an iOS bug. When you bring up the EKEventEditViewController it's iOS code running. It seems as if iOS is trying to suggest event names similar to what is does in the stock iOS Calendar app. I am unable to find any unique setting on the devices of those experiencing this crash. Has anyone else experienced this?

This is how I am presenting the EKEventEditViewController:

        EKEventEditViewController eventController = new EKEventEditViewController ();
        eventController.EventStore = App.Current.EventStore;
        var eventControllerDelegate = new CreateEventEditViewDelegate (eventController); // Just a delegate to handle finish, cancel, etc.
                    eventController.EditViewDelegate = eventControllerDelegate;
                    EKEvent evt = eventController.Event;
                    evt.StartDate = DateTime.Now.DateTimeToNSDate ();
                    evt.EndDate = DateTime.Now.AddHours (1).DateTimeToNSDate ();
                    PresentViewController (eventController, true, null);

This is the iOS crash Report:

Last Exception Backtrace:
0 CoreFoundation 0x1b39a9c30 __exceptionPreprocess + 224 (NSException.m:199)
1 libobjc.A.dylib 0x1b36c40c8 objc_exception_throw + 60 (
2 CoreFoundation 0x1b38a675c +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3 Foundation 0x1b3ce7960 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231)
4 CoreSuggestions 0x1c6d1607c -[SGSuggestionsService logEventInteractionForEventWithUniqueKey:interface:actionType:] + 292 (SGSuggestionsService.m:1883)
5 EventKitUI 0x1c1b22e88 -[EKEventEditor _setAutocompleteResultsVisible:] + 796 (EKEventEditor.m:934)
6 EventKitUI 0x1c1b22ae8 -[EKEventEditor autocompleteResultsEditItemDidShowResults:] + 36 (EKEventEditor.m:881)
7 EventKitUI 0x1c1a1f83c -[EKEventAutocompleteResultsEditItem setResults:] + 848 (EKEventAutocompleteResultsEditItem.m:104)
8 EventKitUI 0x1c1b217cc __42-[EKEventEditor _beginAutocompleteSearch:]_block_invoke_3 + 136 (EKEventEditor.m:719)
9 libdispatch.dylib 0x1b364fbb0 _dispatch_call_block_and_release + 32 (init.c:1408)

Anyone have any ideas what might be causing this or why only a handful of users experience it?

Sign In or Register to comment.