{ "id": "165091", "key": "TIMOB-24265", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "19333", "description": "Patch release for important items that did not make it into 6.0.3", "name": "Release 6.0.4", "archived": false, "released": true, "releaseDate": "2017-04-27" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-04-11T18:51:01.000+0000", "created": "2016-12-21T13:38:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "android-n", "permissions" ], "versions": [], "issuelinks": [ { "id": "54668", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "155156", "key": "TIMOB-20500", "fields": { "summary": "Android: App relaunches when resumed from background", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55480", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "167807", "key": "TIMOB-24710", "fields": { "summary": "Android: V8 crashes on Android N", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55481", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "168961", "key": "TIMOB-24962", "fields": { "summary": "Android - App Crashes on Resume ", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-26T11:48:49.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When changing the storage permissions to off (after the user already approved in the app), if the app is in background, it can't recover when the user select the app in the overview, it just crash.\r\n\r\nI added a small example with only the permissions part\r\n\r\nSteps:\r\n\r\n* Build and install app in Android N\r\n* Click in the label\r\n* Accept storage permission\r\n* Send app to background\r\n* Open Settings\r\n* Click Apps > Example App > Permissions\r\n* Remove storage permission\r\n* Try to go back to the example app, it will crash or get stuck in the splash screen\r\n* Only way to recover from this is forcing the app to close and re-open it \r\n\r\nLog for reference:\r\n\r\n{code}\r\n Process com.moovel.storagepermissions.example created for activity com.moovel.storagepermissions.example/.StoragepermissionsActivity\r\n PID: 4421 UID: GIDs:\r\n\r\n TiApplication I (main) [0,0] checkpoint, app created.\r\n I (main) [24,24] Titanium 5.5.1 (2016/09/27 05:39 b18727f)\r\n V8Object W (main) [131,155] Runtime disposed, cannot set property 'userAgent'\r\n TiApplication I (main) [12,167] Titanium Javascript runtime: v8\r\n TiRootActivity I (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n Module D Loading module: alloy -> Resources/alloy.js\r\n D Loading module: alloy/underscore -> Resources/alloy/underscore.js\r\n D Loading module: alloy/backbone -> Resources/alloy/backbone.js\r\n D Loading module: alloy/constants -> Resources/alloy/constants.js\r\n D Loading module: alloy/CFG -> Resources/alloy/CFG.js\r\n art I Background sticky concurrent mark sweep GC freed 19063(1306KB) AllocSpace objects, 13(480KB) LOS objects, 0% free, 15MB/15MB, paused 610us total 100.631ms\r\n Module D Loading module: alloy/controllers/index -> Resources/alloy/controllers/index.js\r\n D Loading module: alloy/controllers/BaseController -> Resources/alloy/controllers/BaseController.js\r\n D Loading module: permissions -> Resources/permissions.js\r\n TiRootActivity I (main) [0,0] checkpoint, on root activity resume. activity = com.moovel.storagepermissions.example.StoragepermissionsActivity@309f52e\r\n art I Background partial concurrent mark sweep GC freed 4555(336KB) AllocSpace objects, 13(360KB) LOS objects, 20% free, 15MB/19MB, paused 7.148ms total 97.169ms\r\n D HostConnection::get() New Host Connection established 0xdc579e80, tid 4444\r\n W Process pipe failed\r\n OpenGLRenderer I Initialized EGL, version 1.4\r\n D Swap behavior 1\r\n EGL_emulation E tid 4444: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)\r\n OpenGLRenderer W Failed to set EGL_SWAP_BEHAVIOR on surface 0xe734f360, error=EGL_BAD_MATCH\r\n Window D Checkpoint: postWindowCreated()\r\n EGL_emulation E tid 4444: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)\r\n OpenGLRenderer W Failed to set EGL_SWAP_BEHAVIOR on surface 0xe7350780, error=EGL_BAD_MATCH\r\n TiAPI I [androidPermissions] - verifyStoragePermissions\r\n AppCompatDelegate I The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's\r\n EGL_emulation E tid 4444: eglSurfaceAttrib(1174): error 0x3009 (EGL_BAD_MATCH)\r\n OpenGLRenderer W Failed to set EGL_SWAP_BEHAVIOR on surface 0xe73506e0, error=EGL_BAD_MATCH\r\n D endAllActiveAnimators on 0xcb05cc80 (RippleDrawable) with handle 0xc9b1b200\r\n\r\n Process com.moovel.storagepermissions.example (PID: 4421) ended\r\n\r\n\r\n Process com.moovel.storagepermissions.example created for activity com.moovel.storagepermissions.example/org.appcelerator.titanium.TiActivity\r\n PID: 4498 UID: GIDs:\r\n\r\n art W Unexpected CPU variant for X86 using defaults: x86\r\n TiApplication I (main) [0,0] checkpoint, app created.\r\n I (main) [18,18] Titanium 5.5.1 (2016/09/27 05:39 b18727f)\r\n V8Object W (main) [68,86] Runtime disposed, cannot set property 'userAgent'\r\n TiApplication I (main) [13,99] Titanium Javascript runtime: v8\r\n TiBaseActivity W (main) [18,117] Runtime has been disposed or app has been killed. Finishing.\r\n TiApplication W (main) [8,125] Scheduling application restart\r\n AndroidRuntime D Shutting down VM\r\n TiApplication E (main) [2385,2510] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to destroy activity {com.moovel.storagepermissions.example/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke vir\r\n tual method 'void android.view.OrientationEventListener.disable()' on a null object reference; Titanium 5.5.1,2016/09/27 05:39,b18727f\r\n E java.lang.RuntimeException: Unable to destroy activity {com.moovel.storagepermissions.example/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable(\r\n )' on a null object reference\r\n E at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4203)\r\n E at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4221)\r\n E at android.app.ActivityThread.-wrap6(ActivityThread.java)\r\n E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538)\r\n E at android.os.Handler.dispatchMessage(Handler.java:102)\r\n E at android.os.Looper.loop(Looper.java:154)\r\n E at android.app.ActivityThread.main(ActivityThread.java:6119)\r\n E at java.lang.reflect.Method.invoke(Native Method)\r\n E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)\r\n E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)\r\n E Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.OrientationEventListener.disable()' on a null object reference\r\n E at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1523)\r\n E at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:29)\r\n E at android.app.Activity.performDestroy(Activity.java:6881)\r\n E at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1153)\r\n E at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4190)\r\n E ... 9 more\r\n art I Starting a blocking GC HeapTrim\r\n I Starting a blocking GC HomogeneousSpaceCompact\r\n\r\n Process com.moovel.storagepermissions.example (PID: 4498) ended\r\n{code}\r\n", "attachment": [ { "id": "61123", "filename": "StoragePermissions.zip", "author": { "name": "reymundolopez", "key": "reymundolopez", "displayName": "Reymundo López", "active": true, "timeZone": "America/Mexico_City" }, "created": "2016-12-21T13:31:33.000+0000", "size": 2202527, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Application can't recover from storage permission change", "creator": { "name": "reymundolopez", "key": "reymundolopez", "displayName": "Reymundo López", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "reymundolopez", "key": "reymundolopez", "displayName": "Reymundo López", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Ti SDK 5.5.1/6.0.0\r\nAppc CLI 5.5.1\r\nMac OS X 10.11.6\r\nAndroid: Nexus 6P API 24/25 (Android N)", "closedSprints": [ { "id": 839, "state": "closed", "name": "2017 Sprint 04 SDK", "startDate": "2017-02-12T23:36:00.961Z", "endDate": "2017-02-26T23:36:00.000Z", "completeDate": "2017-02-26T17:38:54.172Z", "originBoardId": 114 }, { "id": 871, "state": "closed", "name": "2017 Sprint 08 SDK", "startDate": "2017-04-10T15:40:31.217Z", "endDate": "2017-04-24T15:40:00.000Z", "completeDate": "2017-04-23T21:46:37.098Z", "originBoardId": 114 }, { "id": 796, "state": "closed", "name": "2017 Sprint 02 SDK", "startDate": "2017-01-15T00:00:41.845Z", "endDate": "2017-01-29T00:00:00.000Z", "completeDate": "2017-01-30T21:10:44.640Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "403734", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I have tested your issue in Android 6.0.1 device. I wasn't able to regenerate the issue exactly you described. After Removing storage permission, I try opening the app which is already in background, I see the app opens from the start with splash screen. But it never crashes or any crash log generated in the console. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-12-21T15:21:55.000+0000", "updated": "2016-12-21T15:21:55.000+0000" }, { "id": "403747", "author": { "name": "reymundolopez", "key": "reymundolopez", "displayName": "Reymundo López", "active": true, "timeZone": "America/Mexico_City" }, "body": "Yes, it works as expected in an Android 6 Device, the problem we are seeing is with Android 7.", "updateAuthor": { "name": "reymundolopez", "key": "reymundolopez", "displayName": "Reymundo López", "active": true, "timeZone": "America/Mexico_City" }, "created": "2016-12-21T17:29:46.000+0000", "updated": "2016-12-21T17:29:46.000+0000" }, { "id": "407429", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8843", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-20T14:50:09.000+0000", "updated": "2017-02-20T14:50:09.000+0000" }, { "id": "407433", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-20T16:36:36.000+0000", "updated": "2017-02-20T16:36:36.000+0000" }, { "id": "407439", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael] Yes, I didn't want to cause any potential regressions on < 23", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-20T17:36:10.000+0000", "updated": "2017-02-20T17:36:10.000+0000" }, { "id": "416834", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8926", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-05T12:13:43.000+0000", "updated": "2017-04-05T12:13:43.000+0000" }, { "id": "417204", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Merged above PR waiting for CI build to close.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-11T18:50:52.000+0000", "updated": "2017-04-11T18:50:52.000+0000" }, { "id": "417850", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in 6.0.4.v20170420100617.\r\nClosing.\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-21T18:10:27.000+0000", "updated": "2017-04-21T18:10:27.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }