Skip to content

CardField crash the app with EXC_BAD_ACCESS on iOS 13.* #391

Closed
@aganov

Description

Describe the bug
<CardField /> cause a crash if field is not completed when focused previously and got unmounted later on. Happens only on iOS 12

To Reproduce
Steps to reproduce the behavior:

  1. Create navigation stack with react-navigation
  2. Add <CardField /> component
  3. Focus on CardField without enter anything
  4. Go back navigation.goBack
  5. Navigate to the screen with CardField again
  6. Try to focus CardField
  7. App crashes with EXC_BAD_ACCESS

I'm expecting this to crash too if got unmounted and mounted again on the same screen, but have not tried it yet.

Expected behavior
App not crashing

Smartphone (please complete the following information):

  • Device: iPhone 8 (sim), iPad mini 2 (real device)
  • OS: iOS 12.4
  • Stripe iOS SDK: 21.6.0
  • Stripe React Native SDK: 0.14

Additional context

Exception Type:     EXC_BAD_ACCESS 
Exception Subtype:  KERN_INVALID_ADDRESS


EXC_BAD_ACCESS: Attempted to dereference garbage pointer 0x3ff0000000000008.

0  QuartzCore       _CALayerGetSuperlayer
1  UIKitCore        -[UIView(UIKitManual) superview]
2  UIKitCore        -[UITextSelectionView removeFromSuperview]
3  UIKitCore        -[UITextSelectionView invalidate]
4  UIKitCore        -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) dealloc]
5  UIKitCore        -[UITextField dealloc]
6  CoreFoundation   -[__NSDictionaryM removeAllObjects]
7  UIKitCore        -[UIKBAutofillController clearAutofillGroup]
8  UIKitCore        -[UIKBAutofillController _needAutofillCandidate:delegateAsResponder:]
9  UIKitCore        -[UIKBAutofillController needAutofillCandidate:delegateAsResponder:keyboardState:]
10 UIKitCore        -[UIKeyboardImpl needAutofillCandidate:]
11 UIKitCore        -[UIKeyboardImpl setDelegate:force:]
12 UIKitCore        -[UIPeripheralHost(UIKitInternal) _reloadInputViewsForResponder:]
13 UIKitCore        -[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
14 UIKitCore        -[UIResponder becomeFirstResponder]
15 UIKitCore        -[UIView(Hierarchy) becomeFirstResponder]
16 UIKitCore        -[UITextField becomeFirstResponder]
17 UIKitCore        -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary]
18 UIKitCore        -[UITextSelectionInteraction oneFingerTap:]
19 UIKitCore        -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:]
20 UIKitCore        __UIGestureRecognizerSendTargetActions
21 UIKitCore        __UIGestureRecognizerSendActions
22 UIKitCore        -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
23 UIKitCore        __UIGestureEnvironmentUpdate
24 UIKitCore        -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:]
25 UIKitCore        -[UIGestureEnvironment _updateForEvent:window:]
26 UIKitCore        -[UIWindow sendEvent:]
27 UIKitCore        -[UIApplication sendEvent:]
28 UIKitCore        ___dispatchPreprocessedEventFromEventQueue
29 UIKitCore        ___handleEventQueueInternal
30 UIKitCore        ___handleHIDEventFetcherDrain
31 CoreFoundation   ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
32 CoreFoundation   ___CFRunLoopDoSource0
33 CoreFoundation   ___CFRunLoopDoSources0
34 CoreFoundation   ___CFRunLoopRun
35 CoreFoundation   _CFRunLoopRunSpecific
36 GraphicsServices _GSEventRunModal
37 UIKitCore        _UIApplicationMain
38 ExampleApp      _mh_execute_header (ExampleApp)
39 libdyld.dylib    _start

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions