mozilla-mobile / focus-ios

⚠️ Firefox Focus (iOS) has moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-ios
Mozilla Public License 2.0
1.26k stars 262 forks source link

Crash in AutocompleteTextField.removeCompletion() #1968

Closed st3fan closed 2 years ago

st3fan commented 3 years ago

This is not a new crash .. it has been in the product for a long time. It is the top crasher for the previous release.

Last Exception Backtrace:
0   CoreFoundation                  0x1926099d8 __exceptionPreprocess + 216 (NSException.m:199)
1   libobjc.A.dylib                 0x1a698cb54 objc_exception_throw + 56 (objc-exception.mm:565)
2   CoreFoundation                  0x192673d98 _CFThrowFormattedException + 112 (CFObject.m:1994)
3   CoreFoundation                  0x1925724e0 mutateError + 200 (CFObject.m:0)
4   CoreFoundation                  0x1925058a0 -[__NSCFString replaceCharactersInRange:withString:] + 68 (CFObject.m:411)
5   Foundation                      0x1937f1fd8 -[NSString stringByReplacingCharactersInRange:withString:] + 76 (NSString.m:783)
6   AutocompleteTextField           0x10250c2a0 AutocompleteTextField.removeCompletion() + 80 (AutocompleteTextField.swift:138)
7   AutocompleteTextField           0x10250c2a0 AutocompleteTextField.deleteBackward() + 264 (AutocompleteTextField.swift:73)
8   AutocompleteTextField           0x10250c360 @objc AutocompleteTextField.deleteBackward() + 28 (<compiler-generated>:0)
9   UIKitCore                       0x194c71d94 -[UIKeyboardImpl deleteBackwardAndNotify:] + 380 (UIKeyboardImpl.m:0)
10  UIKitCore                       0x194c6abf8 -[UIKeyboardImpl _performKeyboardOutput:shouldCheckDelegate:] + 660 (UIKeyboardImpl.m:9568)
11  UIKitCore                       0x194c6a91c -[UIKeyboardImpl performKeyboardOutput:] + 28 (UIKeyboardImpl.m:9513)
12  UIKitCore                       0x194c69948 __55-[UIKeyboardImpl handleKeyboardInput:executionContext:]_block_invoke_2 + 412 (UIKeyboardImpl.m:9227)
13  UIKitCore                       0x194c9c574 -[UIKeyboardTaskEntry execute:] + 180 (UIKeyboardTaskQueue.m:737)
14  UIKitCore                       0x194c9b158 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 316 (UIKeyboardTaskQueue.m:305)
15  Foundation                      0x1938ff614 __NSThreadPerformPerform + 184 (NSThread.m:807)
16  CoreFoundation                  0x192589bf0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 (CFRunLoop.c:1967)
17  CoreFoundation                  0x192589af0 __CFRunLoopDoSource0 + 204 (CFRunLoop.c:2011)
18  CoreFoundation                  0x192588e38 __CFRunLoopDoSources0 + 256 (CFRunLoop.c:2048)
19  CoreFoundation                  0x1925833e0 __CFRunLoopRun + 776 (CFRunLoop.c:2925)
20  CoreFoundation                  0x192582ba0 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242)
21  GraphicsServices                0x1a92e8598 GSEventRunModal + 160 (GSEvent.c:2259)
22  UIKitCore                       0x194e742f4 -[UIApplication _run] + 1052 (UIApplication.m:3253)
23  UIKitCore                       0x194e79874 UIApplicationMain + 164 (UIApplication.m:4707)
24  Firefox Focus                   0x1022d7d40 main + 68 (AppDelegate.swift:16)
25  libdyld.dylib                   0x192261568 start + 4
st3fan commented 2 years ago

Fixed with https://github.com/mozilla-mobile/focus-ios/pull/2533