Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37001105CD for ; Fri, 17 Oct 2014 01:42:34 +0000 (UTC) Received: (qmail 16689 invoked by uid 500); 17 Oct 2014 01:42:34 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 16663 invoked by uid 500); 17 Oct 2014 01:42:34 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 16640 invoked by uid 99); 17 Oct 2014 01:42:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Oct 2014 01:42:34 +0000 Date: Fri, 17 Oct 2014 01:42:33 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-7643) sendPluginResult is not thread safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-7643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14174620#comment-14174620 ] ASF subversion and git services commented on CB-7643: ----------------------------------------------------- Commit 9a3b1085f22956d463d9a5732f3316214a4a1005 in cordova-ios's branch refs/heads/master from [~samedi] [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=9a3b108 ] CB-7643 - made isValidCallbackId threadsafe _callbackIdPattern was being changed on multiple threads which caused bad access errors Signed-off-by: Shazron Abdullah > 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 > Affects Versions: 3.5.0 > Reporter: Richard Hermanson > Assignee: Shazron Abdullah > Fix For: 3.7.0 > > Original Estimate: 1h > Remaining Estimate: 1h > > If _callbackIdPattern in CVDCommandDelegateImpl.m is set at the same time as it is used (in different threads) then there's an error thrown (EXC_BAD_ACCESS). > More precisely when this line is 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])]) { > The method is: - (BOOL)isValidCallbackId:(NSString *)callbackId > 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) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org