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 263 forks source link

Crash [NSException in AutocompleteTextField] #630

Closed AaronMT closed 5 years ago

AaronMT commented 7 years ago

Hit this crash while entering a URL which had autocomplete itself.

iOS 11.0.3 (iPhone 7+)

Build: (d558da56084abddc9c6f19753a3cb67b1833f2cb)

2017-10-25 10:15:26.401310-0400 Firefox Focus[16539:3029195] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFString replaceCharactersInRange:withString:]: Range or index out of bounds'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000105e511cb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000105365f41 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000105ec5b95 +[NSException raise:format:] + 197
    3   CoreFoundation                      0x0000000105e8f265 mutateError + 261
    4   Foundation                          0x0000000104dbefb4 -[NSString stringByReplacingCharactersInRange:withString:] + 142
    5   AutocompleteTextField               0x0000000103e89c45 _T021AutocompleteTextFieldAAC16removeCompletion33_310156973ACAD0C3B3E912ECDEBF4ED9LLyyF + 165
    6   AutocompleteTextField               0x0000000103e88a99 _T021AutocompleteTextFieldAAC13textDidChange33_310156973ACAD0C3B3E912ECDEBF4ED9LLyyF + 25
    7   AutocompleteTextField               0x0000000103e88e87 _T021AutocompleteTextFieldAAC13textDidChange33_310156973ACAD0C3B3E912ECDEBF4ED9LLyyFTo + 23
    8   UIKit                               0x0000000106dacec9 -[UIApplication sendAction:to:from:forEvent:] + 83
    9   UIKit                               0x0000000106f2a1f6 -[UIControl sendAction:to:forEvent:] + 67
    10  UIKit                               0x0000000106f2a513 -[UIControl _sendActionsForEvents:withEvent:] + 450
    11  UIKit                               0x0000000107ad3f3d -[UITextField fieldEditorDidChange:] + 202
    12  UIKit                               0x0000000106f3d79f -[UIFieldEditor textInputDidChange:] + 65
    13  UIKit                               0x0000000107ae4ea6 -[UITextInputController _sendDelegateChangeNotificationsForText:selection:] + 120
    14  UIKit                               0x0000000107ae76d3 -[UITextInputController _insertText:fromKeyboard:] + 879
    15  UIKit                               0x0000000107ae8071 -[UITextInputController insertText:] + 386
    16  UIKit                               0x0000000106f4073b -[UIFieldEditor insertFilteredText:] + 803
    17  UIKit                               0x0000000107ad972c -[UITextField insertFilteredText:] + 102
    18  UIKit                               0x00000001070b7c2e -[UIKeyboardImpl insertText:] + 122
    19  UIKit                               0x00000001070b3608 -[UIKeyboardImpl performKeyboardOutput:] + 696
    20  UIKit                               0x00000001070b2abf __55-[UIKeyboardImpl handleKeyboardInput:executionContext:]_block_invoke_2 + 270
    21  UIKit                               0x0000000107b2d68d -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 374
    22  Foundation                          0x0000000104da7948 __NSThreadPerformPerform + 334
    23  CoreFoundation                      0x0000000105df42b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    24  CoreFoundation                      0x0000000105e93d31 __CFRunLoopDoSource0 + 81
    25  CoreFoundation                      0x0000000105dd8c19 __CFRunLoopDoSources0 + 185
    26  CoreFoundation                      0x0000000105dd81ff __CFRunLoopRun + 1279
    27  CoreFoundation                      0x0000000105dd7a89 CFRunLoopRunSpecific + 409
    28  GraphicsServices                    0x000000010c9b99c6 GSEventRunModal + 62
    29  UIKit                               0x0000000106dab23c UIApplicationMain + 159
    30  Firefox Focus                       0x000000010386d9e7 main + 55
    31  libdyld.dylib                       0x000000010a481d81 start + 1
    32  ???                                 0x0000000000000001 0x0 + 1
)
boek commented 7 years ago

STR

  1. open URLBar
  2. type face
  3. when facebook.com is recommended, press CMD + A to select all and press f
  4. kaboom
boek commented 6 years ago

Oh interesting. Github will close cross-repos.

Sdaswani commented 6 years ago

This is still our most prevalent crash, and is still happening in 4.0.2.

oliviabrown9 commented 5 years ago

I can't seem to reproduce this anymore. Can anyone confirm if we're still seeing it in crash logs?

Sdaswani commented 5 years ago

@sblatz can you check? I feel like closing it just because it's practically geriatric at this point.

sblatz commented 5 years ago

Confirming this is not showing up as a crash in Xcode Organizer (nor can I repro). Closing!