card-io / card.io-iOS-SDK

card.io provides fast, easy credit card scanning in mobile apps
Other
2.29k stars 553 forks source link

Lots of crashes reported when CardIOViewController is put onscreen #178

Closed emaloney closed 8 years ago

emaloney commented 8 years ago

Hello,

We've integrated Card.IO into our application, and we've seen a significant number of crashes (almost 8,000 so far) occurring inside [CardIOLocalizer localizeString:adaptedForCountry:].

The crash is due to an NSRangeException with the message Range {0, 7} out of bounds; string length 6. (See stack trace below)

We've disabled Card.IO in production for now until this gets sorted out. Would you mind notifying me when the bug is fixed? We'll take a look at adding back Card.IO at that time.

Thanks a lot, E.

Thread : Fatal Exception: NSRangeException
0  CoreFoundation                 0x181cad900 __exceptionPreprocess
1  libobjc.A.dylib                0x18131bf80 objc_exception_throw
2  CoreFoundation                 0x181cad848 -[NSException initWithCoder:]
3  CoreFoundation                 0x181c94e88 -[NSTaggedPointerString getCharacters:range:]
4  CoreFoundation                 0x181b9f994 CFStringCompareWithOptionsAndLocale
5  CoreFoundation                 0x181c95634 -[NSTaggedPointerString compare:options:range:locale:]
6  Gilt                           0x100255474 __52-[CardIOLocalizer localizeString:adaptedForCountry:]_block_invoke
7  CoreFoundation                 0x181be5a04 -[NSArray indexOfObject:inSortedRange:options:usingComparator:]
8  Gilt                           0x1002551c0 -[CardIOLocalizer localizeString:adaptedForCountry:]
9  Gilt                           0x100255d14 CardIOLocalizedStringWithAlert
10 Gilt                           0x100255ec0 CardIOLocalizedString
11 Gilt                           0x10022c23c -[CardIOViewController viewDidLoad]
12 UIKit                          0x1869a00c0 -[UIViewController loadViewIfRequired]
13 UIKit                          0x18699fcc4 -[UIViewController view]
14 UIKit                          0x186d40930 -[UINavigationController preferredContentSize]
15 UIKit                          0x186cfd930 -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:]
16 UIKit                          0x186cfa340 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke
17 UIKit                          0x186c50b70 _runAfterCACommitDeferredBlocks
18 UIKit                          0x186c5e030 _cleanUpAfterCAFlushAndRunDeferredBlocks
19 UIKit                          0x186991c24 _afterCACommitHandler
20 CoreFoundation                 0x181c64588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
21 CoreFoundation                 0x181c6232c __CFRunLoopDoObservers
22 CoreFoundation                 0x181c6275c __CFRunLoopRun
23 CoreFoundation                 0x181b91680 CFRunLoopRunSpecific
24 GraphicsServices               0x1830a0088 GSEventRunModal
25 UIKit                          0x186a08d90 UIApplicationMain
26 Gilt                           0x1000c4a64 main (main.m:15)
27 libdyld.dylib                  0x1817328b8 (Missing)
bluk commented 8 years ago

Which version of card.io are you using? Also, can you give the iOS version numbers and the iOS hardware that you are using?

This was fixed in version 5.1.0 with issue #120 . Several have reported it works for them with that version (and later) and at least one other person needed version 5.3.0 to get it to work (we're on version 5.3.1 right now). You can try printing out the library version if needed.

bluk commented 8 years ago

Closing due to inactivity. If you still have this issue with the latest version of card.io, please leave a comment. Thanks.