Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FEBD10B8C for ; Mon, 29 Jul 2013 17:59:04 +0000 (UTC) Received: (qmail 18206 invoked by uid 500); 29 Jul 2013 17:59:04 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 18186 invoked by uid 500); 29 Jul 2013 17:59:04 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 18177 invoked by uid 99); 29 Jul 2013 17:59:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 17:59:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of drkemp@google.com designates 209.85.219.52 as permitted sender) Received: from [209.85.219.52] (HELO mail-oa0-f52.google.com) (209.85.219.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 17:58:57 +0000 Received: by mail-oa0-f52.google.com with SMTP id g12so13420944oah.25 for ; Mon, 29 Jul 2013 10:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=MgP9fY0dViTvomPeKPcR32U8sUeJIPxXfz0IXAsL/Yg=; b=nrgV8u+zIoci7FaCZDsc17tQ/hkDQhTQpidnReXsBb7Qq4mgT6zhTpnFsIw1ccst47 QDVNRKrAPNMQUZ+RMAr0waSM310NJu9UIijLBcOqHyB+f5c+YytQioKtOfaj4OI7rHfj O4/Dga7I+UyvCkoY22JfdQUf8GjI3Be16ytX2YWd9le1NfILxiZ9iFKtfbofx6C3Ffr7 UpCJw0+RJeoPxCcyYtnYMV0Xm2pfubMEzoR3Jw4wR0navtOkVyrHtlWILpdx8B/cfpvb nawD1XTcC3KPNVK2s2Y1Xb4mwYFuvcaBVrcd/gPhkvWJAlK1upzjWWF8hrOSb1c+V2Ya VKfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=MgP9fY0dViTvomPeKPcR32U8sUeJIPxXfz0IXAsL/Yg=; b=eKg1GHAgRFzWQXWYYgaP5TDgRy2t3SMmgychP6CM8eUUUuC965iYGsAixWxyOdSjfQ 9KCBQpicVdb9r/Scv4Btq/r5XkKL1fAN6ePgQffH8dTgDpOha1y1KUUuSigejg6fvWTJ 7fsPiqAiKqjfexVXYOFKAGQ67YUVJV+JSe2G848/xKFBuZGMZ3Sehm9xTp4o7pkFVyPS Aec5Uz7JZHm3qxmoT3UEPpFkcTIgjHCVCooO6t+mB7y/n4RaDpJ9PwwPSJHmJFnKCQjD rbszvCVODDkQFZioyjjotwhgjrduO9za2kqwkouIJgdCSXsiGye2W4dL1nKXlOb9uWvo YWow== MIME-Version: 1.0 X-Received: by 10.60.70.4 with SMTP id i4mr58818351oeu.11.1375120716101; Mon, 29 Jul 2013 10:58:36 -0700 (PDT) Received: by 10.182.243.232 with HTTP; Mon, 29 Jul 2013 10:58:36 -0700 (PDT) Date: Mon, 29 Jul 2013 13:58:36 -0400 Message-ID: Subject: Android Bridge -processMessage error From: David Kemp To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=001a1133050cce955b04e2aa3de9 X-Gm-Message-State: ALoCoQmYjtSl/pjVX1ffLBmT/ZMKRa69igwKwCw+HRgXKD6Vlk7z+gFmtftAIPpIpXrxxMaygq2GXaVwWJa/anKeOJeT4D33jY+23VWbD2cAFO/rOgw/4BbvBHG1uZZ/Rf/xWjbC/O8Az+McJQtQVGdIhMrDyf4/Ba0NFrf2+kwYgjQ6GNOCCavevX2MOPwHOUAxw9aQkZAH X-Virus-Checked: Checked by ClamAV on apache.org --001a1133050cce955b04e2aa3de9 Content-Type: text/plain; charset=ISO-8859-1 I have encountered a problem twice where the bridge throws an error on the JS side and continues to attempt to process the message forever. It generates 10s of thousands of log message that say : processMessage failed: Error: .... CB-4005 may also be reporting the same issue, but in that case I suspect it was a mismatch of js version/native. I do not have a reliable real-world test case that makes this happen. While I was working on instrumenting the bridge for some profiling, i created the same issue. In my case it was because the message length contained in the message was one byte shorter than the actual message (my bad). The result of that is that the offending message is tossed, but the last character remains in the message buffer. on the next message cycle, that last character causes a null message to be obtained, and leaves the offending character in the message queue.(cycle continues forever...) I will post a pull request to fix part of the problem. It easy to detect the message corruption and prevent the infinite message loop. that may at least make it easier to find out what the original message error is. The proposed change will not fix the actual issue that makes the message length wrong, just makes it easier to find. --001a1133050cce955b04e2aa3de9--