Richard Hermanson created CB-7643:
-------------------------------------

             Summary: sendPluginResult is not thread safe
                 Key: CB-7643
                 URL: https://issues.apache.org/jira/browse/CB-7643
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
            Reporter: Richard Hermanson


If _callbackIdPattern in CVDCommandDelegateImpl.m is set at the same time as it 
is used (in different threads) then there's a error thrown (EXC_BAD_ACCESS).

More precisely when this line in run in one thread:
_callbackIdPattern = [NSRegularExpression 
regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err];

and this in another:
    if (([callbackId length] > 100) || [_callbackIdPattern 
firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId 
length])]) {

This happens about every 10th time I start my application. I could surely solve 
this by not calling too quickly and repeatedly but this is still a bug and 
easily fixed.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to