Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42FD7D59A for ; Wed, 25 Jul 2012 19:57:35 +0000 (UTC) Received: (qmail 86343 invoked by uid 500); 25 Jul 2012 19:57:34 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 86325 invoked by uid 500); 25 Jul 2012 19:57:34 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 86313 invoked by uid 99); 25 Jul 2012 19:57:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2012 19:57:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 5548E140B94 for ; Wed, 25 Jul 2012 19:57:34 +0000 (UTC) Date: Wed, 25 Jul 2012 19:57:33 +0000 (UTC) From: "Joe Bowser (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1424010423.102687.1343246254352.JavaMail.jiratomcat@issues-vm> In-Reply-To: <313341283.102580.1343244155177.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CB-1128) crash while running the Accelerometer documentation example on a 2.3.5 device 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-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422553#comment-13422553 ] Joe Bowser commented on CB-1128: -------------------------------- Right, I've added the visibility check, and moved parts of code into a runnable where appropriate, but I can't confirm this fix, since I don't have a Samsung Galaxy S running 2.3.5. > crash while running the Accelerometer documentation example on a 2.3.5 device > ----------------------------------------------------------------------------- > > Key: CB-1128 > URL: https://issues.apache.org/jira/browse/CB-1128 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.0.0 > Environment: eclipse sdk 4.2 on win32, android sdk r20.0.1 win, adt 20.0.2, cordova-2.0.0, the device is a samsung galaxy s gt-i9000 running android 2.3.5 gingerbread xxjvt > Reporter: Alexandru Nicau > Assignee: Simon MacDonald > Priority: Minor > Labels: android, crash > Attachments: index.html, logcat.txt > > > Have implemented the Accelerometer full example (from the documentation) and after a few seconds of correct execution it crashes. The situation can be duplicated easily and happens every time. > The Java code is: > public class MainActivity extends DroidGap { > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > super.setStringProperty("loadingDialog", "Title,Message"); > super.setStringProperty("errorUrl", "file:///android_asset/www/error.html"); > super.init(); > super.appView.clearCache(true); > super.setBooleanProperty("keepRunning", false); > super.loadUrl("file:///android_asset/www/index.html"); > } > } > The HTML code is a copy-paste from the example at http://docs.phonegap.com/en/2.0.0/cordova_accelerometer_accelerometer.md.html#Accelerometer , accelerometer.watchAcceleration section, the full code sample. That's where a watch is added on the accelerometer, executing the onSuccess() every 3 seconds, which updates some div. > Running the application updates the div but only for a variable number of times (maybe one to three updates). The errors we're seeing bellow are at a point when a spinner dialog is about to be shown, but its view cannot be added to the view manager (or the view manager cannot instantiate a new view, don't know code details). Both, IMHO are side effects of the real reasons. If I remove the "loadingDialog" property, the application keeps on crashing, but more quietly than we may see bellow. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira