[ 
https://issues.apache.org/jira/browse/CB-5132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rich Trott updated CB-5132:
---------------------------

    Description: 
I created a repo with more-or-less minimal code to demonstrate the issue:
https://github.com/Trott/s4-angular-phonegap-crash

The app in the repo exits (in a "oh, hey, I crashed, I'm outta here!" kind of 
way) when run on a Galaxy S4 running Android 4.2.2. It runs fine on every other 
device I've tested it on. For example, there is no problem on a Galaxy Note II 
running Android 4.1.2. 

The www directory stuff also works fine in browsers, including browsers on the 
S4/Android 4.2.2 device.

So the bug only seems to happen when this code is:

* Run as a Cordova app
* On a Galaxy S4 running Android 4.2.2

Steps to duplicate the behavior (which are also listed in the repo's README) 
are:

1. Clone the 
2. Create the Android executable using Cordova. With `cordova` command line 
tool and Android SDK installed: 
  - `cordova platform add android`
  - `cordova build`

3. Take the resulting APK and install it on a Galaxy S4 running Android 4.2.2. 
If you don't own one, you can test with one for free at 
http://developer.samsung.com/remotetestlab.
4. Launch the app.
5. Touch the text on the app's main screen.
6. Wait a few seconds and the app will exit.

On everything else I've tested, it loads the color list content, which is the 
expected behavior.

## Logs

This shows up in the Android logs, at least when using 
http://developer.samsung.com/remotetestlab:

    ERROR|10-19 03:39:49.448|6938|6938||CallbackProxy|UPDATE_URL
    ASSERT|10-19 03:39:49.493|6938|6953||libc|Fatal signal 11 (SIGSEGV) at 
0x00000000 (code=1), thread 6953 (WebViewCoreThre)

I put this information in a question on StackOverflow 
(http://stackoverflow.com/q/19459111/436641). It has attracted some helpful 
comments from one individual, but so far that's it.



  was:
I created a repo with more-or-less minimal code to demonstrate the issue:
https://github.com/Trott/s4-angular-phonegap-crash

The app in the repo exits (in a "oh, hey, I crashed, I'm outta here!" kind of 
way) when run on a Galaxy S4 running Android 4.2.2. It runs fine on every other 
device I've tested it on. For example, there is no problem on a Galaxy Note II 
running Android 4.1.2. 

The www directory stuff also works fine in browsers, including browsers on the 
S4/Android 4.2.2 device.

So the bug only seems to happen when this code is:

* Run as a Cordova app
* On a Galaxy S4 running Android 4.2.2

Steps to duplicate the behavior (which are also listed in the repo's README) 
are:

1. Clone the 
2. Create the Android executable using Cordova. With `cordova` command line 
tool and Android SDK installed: 
  - `cordova platform add android`
  - `cordova build`
3. Take the resulting APK and install it on a Galaxy S4 running Android 4.2.2. 
If you don't own one, you can test with one for free at 
http://developer.samsung.com/remotetestlab.
4. Launch the app.
5. Touch the text on the app's main screen.
6. Wait a few seconds and the app will exit.

On everything else I've tested, it loads the color list content, which is the 
expected behavior.

## Relevant code

These files are all in the repo, but if you don't want to click, here you go:

### index.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Galaxy S4 + Android 4.2.2 + Cordova Crash</title>
    
        <meta name="viewport" 
content="width=device-width,initial-scale=1,maximum-scale=1">
    </head>
    <body>
        <div id="ng-app" data-ng-app="main">
    
            <!-- Begin Templates -->
            <script type="text/ng-template" id="main">
                <a ng-click="showList()">On Galaxy S4, touch here, wait a few 
seconds, and the app will crash.</a>
            </script>
    
            <script type="text/ng-template" id="list">
            <progress data-ng-show="loading"></progress>
            <ol data-ng-hide="loading">
                <li data-ng-repeat="color in colors">
                    {{color.name}}
                </li>
            </ol>
            </script>
            <!-- End Templates -->
    
            <div data-ng-view=""></div>
        </div>
        <script src="js/angular.js"></script>
        <script src="js/angular-mobile.js"></script>
        <script src="js/modules/main.js"></script>
        <script src="js/modules/list.js"></script>
    </body>
    </html>

###main.js

    (function () {
        'use strict';
        angular.module('main', ['ngMobile','list'])
        .config(['$routeProvider', function ($routeProvider) {
            $routeProvider
            .when('/', {templateUrl: 'main', controller: 'mainController'})
            .otherwise({redirectTo: '/'});
        }]).
        controller('mainController', ['$scope', '$location', function ($scope, 
$location) {
            $scope.showList = function () {
                $location.path('/list');
            };
        }]);
    }());

### list.js

    (function () {
        'use strict';
        angular.module('list', [])
        .config(['$routeProvider', function ($routeProvider) {
            $routeProvider
            .when('/list', {templateUrl: 'list', controller: 'listController'});
        }])
        .controller(
            'listController',
            ['$scope', '$timeout', function ($scope, $timeout) {
                $scope.loading = true;
    
                var callback = function () {
                    $scope.loading = false;
                    $scope.colors = [
                        {name: 'Almost Blue'},
                        {name: 'Kind Of Blue'},
                        {name: 'Totally Not Blue'}
                    ];
                };
    
                // Using $timeout to sort of fake an XHR just to rule out XHR 
as a cause
                $timeout(callback, 500);
            }]
        );
    }());

## Logs

This shows up in the Android logs, at least when using 
http://developer.samsung.com/remotetestlab:

    ERROR|10-19 03:39:49.448|6938|6938||CallbackProxy|UPDATE_URL
    ASSERT|10-19 03:39:49.493|6938|6953||libc|Fatal signal 11 (SIGSEGV) at 
0x00000000 (code=1), thread 6953 (WebViewCoreThre)

I put this information in a question on StackOverflow 
(http://stackoverflow.com/q/19459111/436641). It has attracted some helpful 
comments from one individual, but so far that's it.




> Certain Types Of Async Activity + ClickBusting + Cordova + Android Galaxy S4 
> = unexpected exit
> ----------------------------------------------------------------------------------------------
>
>                 Key: CB-5132
>                 URL: https://issues.apache.org/jira/browse/CB-5132
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.1.0
>         Environment: Galaxy S4 running Android 4.2.2. I've been unable to 
> replicate the bug on emulators. The bug only shows up on actual devices. 
> Fortunately, Samsung makes them available via 
> http://developer.samsung.com/remotetestlab
>            Reporter: Rich Trott
>
> I created a repo with more-or-less minimal code to demonstrate the issue:
> https://github.com/Trott/s4-angular-phonegap-crash
> The app in the repo exits (in a "oh, hey, I crashed, I'm outta here!" kind of 
> way) when run on a Galaxy S4 running Android 4.2.2. It runs fine on every 
> other device I've tested it on. For example, there is no problem on a Galaxy 
> Note II running Android 4.1.2. 
> The www directory stuff also works fine in browsers, including browsers on 
> the S4/Android 4.2.2 device.
> So the bug only seems to happen when this code is:
> * Run as a Cordova app
> * On a Galaxy S4 running Android 4.2.2
> Steps to duplicate the behavior (which are also listed in the repo's README) 
> are:
> 1. Clone the 
> 2. Create the Android executable using Cordova. With `cordova` command line 
> tool and Android SDK installed: 
>   - `cordova platform add android`
>   - `cordova build`
> 3. Take the resulting APK and install it on a Galaxy S4 running Android 
> 4.2.2. If you don't own one, you can test with one for free at 
> http://developer.samsung.com/remotetestlab.
> 4. Launch the app.
> 5. Touch the text on the app's main screen.
> 6. Wait a few seconds and the app will exit.
> On everything else I've tested, it loads the color list content, which is the 
> expected behavior.
> ## Logs
> This shows up in the Android logs, at least when using 
> http://developer.samsung.com/remotetestlab:
>     ERROR|10-19 03:39:49.448|6938|6938||CallbackProxy|UPDATE_URL
>     ASSERT|10-19 03:39:49.493|6938|6953||libc|Fatal signal 11 (SIGSEGV) at 
> 0x00000000 (code=1), thread 6953 (WebViewCoreThre)
> I put this information in a question on StackOverflow 
> (http://stackoverflow.com/q/19459111/436641). It has attracted some helpful 
> comments from one individual, but so far that's it.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to