Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Further iOS 9 crashes #139

Closed
symbolboxer opened this issue Sep 17, 2015 · 4 comments
Closed

Further iOS 9 crashes #139

symbolboxer opened this issue Sep 17, 2015 · 4 comments

Comments

@symbolboxer
Copy link

Experiencing a problem like #120. We are using the vkeepe Cordova plugin, but the problem seems so similar to #120 that I thought it would be most appropriate here (apologies if I'm wrong).

Our app runs this native code from the plugin:

- (void)scan:(CDVInvokedUrlCommand *)command {
    self.scanCallbackId = command.callbackId;
    NSDictionary* options = [command.arguments objectAtIndex:0];

    CardIOPaymentViewController *paymentViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self];

    NSNumber *collectCVV = [options objectForKey:@"cvv"];
    if(collectCVV) {
        paymentViewController.collectCVV = [collectCVV boolValue];
    }

    NSNumber *collectZip = [options objectForKey:@"zip"];
    if(collectZip) {
        paymentViewController.collectPostalCode = [collectZip boolValue];
    }

    NSNumber *collectExpiry = [options objectForKey:@"expiry"];
    if(collectExpiry) {
        paymentViewController.collectExpiry = [collectExpiry boolValue];
    }

    NSNumber *disableManualEntryButtons = [options objectForKey:@"supressManual"];
    if(disableManualEntryButtons) {
        paymentViewController.disableManualEntryButtons = [disableManualEntryButtons boolValue];
    }

    NSNumber *suppressConfirm = [options objectForKey:@"suppressConfirm"];
    if(suppressConfirm) {
        paymentViewController.suppressScanConfirmation = [suppressConfirm boolValue];
    }

    NSNumber *hideLogo = [options objectForKey:@"hideLogo"];
    if(hideLogo) {
        paymentViewController.hideCardIOLogo = [hideLogo boolValue];
    }

    // if it is nil, its ok.
    NSString *languageOrLocale = [[[NSLocale alloc] initWithLocaleIdentifier:[options objectForKey:@"languageOrLocale"]] localeIdentifier];
    if (languageOrLocale) {
        paymentViewController.languageOrLocale = languageOrLocale;
    }

    [self.viewController presentViewController:paymentViewController animated:YES completion:nil];

It crashes when it gets to the last line and we get this error:

2015-09-17 12:17:40.695 Skurt Dev[2008:387176] UXCam: Crash handler closing session. Caught exception: -[NSTaggedPointerString getCharacters:range:]: Range {0, 7} out of bounds; string length 6. 
libc++abi.dylib: terminate_handler unexpectedly threw an exception

Unfortunately, we have another library that swallows the error, so I don't get the full stacktrace.
This happens on our iOS 9 device, but not our iOS 8 device. Is it possible that there is another localization bug like the one that caused #120? Thanks in advance for your help.

@josharian
Copy link
Member

Just to confirm, does this still happen with the latest (5.2.0) release? Can you temporarily remove the other library that swallows the error, so that we could get a full stack trace?

@symbolboxer
Copy link
Author

We have to focus on some other issues for the moment, but as soon as I have the chance to update and try it out, I'll update you. Thanks for checking in!

@HimaniM
Copy link

HimaniM commented Nov 5, 2015

I am also having same issue. Can you update me either it has been resolved or not.
Thanks in advance !!

@symbolboxer
Copy link
Author

Latest build fixes our issue. Thanks!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants