-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] PaymentSheet card scanner crashes w/ [Deallocation of non-allocated memory] #1916
Comments
Hello, thanks for filing, and I'm sorry that you're experiencing this crash! I'm having trouble reproducing this locally, and I'm not seeing similar crashes in the Stripe app's crash reports. Could you share a little more information about your build environment?
The stack trace looks to be within CoreML/Vision, so we may need to file an issue with Apple. |
Should I just turn address sanitizer generally off? Now that I'm looking at it it seems like sth I may not actually want in my release config anyway? Or maybe this gets compiled out anyway via the bitcode recompilation? |
Thanks for the info! I'll try to enable those settings and check it again — I wasn't testing on a Release build, so that may have been the issue. There's a pretty large performance impact to enabling the Address Sanitizer, and I don't think it would do anything useful for a customer, so I wouldn't recommend leaving it on when submitting to the App Store. (I'm surprised App Store Connect doesn't catch this!) |
I suppose since it doesn't crash in the Test Flight build the bitcode re-compilation disables it again? Seems like it's not that much of a pressing issue anymore if it's not affecting builds without it on. I'd still assume that there might be a legit bug-ish thing hidden here if address crashes the app. |
Running in Release mode was the trick. I also managed to reproduce the same issue in Apple's BreakfastFinder example app, so I think this is a bug in Vision. I'll file a report with Apple.
Agreed, that is concerning! We haven't received any reports of scanning-related crashes outside of this ASan-enabled-in-Release-mode configuration, but I'll keep an eye out. Thanks again for filing this! |
Good to hear. And thanks so much for looking into it this quickly! Appreciated. |
Closing this one since it's a bug with Apple. Thanks! |
Summary
PaymentSheet's built-in "Scan Card" feature crashes in
STPCardScanner:271
(try handler?.perform([textRequest].compactMap { $0 })
) withThread 26: Deallocation of non-allocated memory
when card is scanned.[Edit]: correction: it already crashes when the card scanner is merely opened.
Code to reproduce
Normal usage of
PaymentSheet
, ie along these linesiOS version
15.2
Installation method
SPM
SDK version
21.11.0
Other information
Stack trace / address sanitizer output from crash:
The text was updated successfully, but these errors were encountered: