{ "id": "171915", "key": "TIMOB-26204", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-24T01:25:57.000+0000", "created": "2018-07-11T15:21:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android" ], "versions": [ { "id": "20099", "name": "Release 7.2.0", "archived": false, "released": true, "releaseDate": "2018-06-14" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-24T01:26:11.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": "{code:java}\r\n[ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.proxy.TiViewProxy.handlePendingAnimation(boolean)' on a null object reference\r\n[ERROR] TiApplication: at org.appcelerator.titanium.view.TiUIView$1$1.callAsync(TiUIView.java:549)\r\n[ERROR] TiApplication: at org.appcelerator.titanium.util.TiAnimationBuilder$AnimatorListener.onAnimationEnd(TiAnimationBuilder.java:1371)\r\n[ERROR] TiApplication: at com.nineoldandroids.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:756)\r\n[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.endAnimation(ValueAnimator.java:1034)\r\n[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.access$11(ValueAnimator.java:1024)\r\n[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:669)\r\n[ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135)\r\n[ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221)\r\n[ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)\r\n[ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)\r\n{code}\r\nhttps://github.com/appcelerator/titanium_mobile/blob/0a7dce77bb4fbdd21370512800a61542670e6006/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L549", "attachment": [], "flagged": false, "summary": "Android: TransformAfterLayout NullPointerException in Ti.Animation", "creator": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "subtasks": [], "reporter": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "environment": null, "closedSprints": [ { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "439125", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "Fix:\r\n{code:java}\r\n--- a/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java\r\n+++ b/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java\r\n@@ -546,7 +546,7 @@ public abstract class TiUIView\r\n \t\t\t\t\tpublic void callAsync(KrollObject krollObject, HashMap args) {}\r\n \t\t\t\t\tpublic void callAsync(KrollObject krollObject, Object[] args) {\r\n \t\t\t\t\t\tbTransformPending.set(false);\r\n-\t\t\t\t\t\tproxy.handlePendingAnimation(true);\r\n+\t\t\t\t\t\tp.handlePendingAnimation(true);\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\t\tanimBuilder.start(p, v);\r\n{code}\r\n", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2018-07-11T15:43:21.000+0000", "updated": "2018-07-11T15:43:21.000+0000" }, { "id": "439154", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~s.volkov], Thanks for the ticket. Our engineering will look into it.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-07-12T10:05:06.000+0000", "updated": "2018-07-12T10:05:06.000+0000" }, { "id": "439172", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~s.volkov] Can you let us know in which situations this error occurs? A minimal test case would be lit!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-12T15:13:30.000+0000", "updated": "2018-07-12T15:13:30.000+0000" }, { "id": "439176", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "It happens after closing window with views on which were periodically applied transformation like this\r\n{code:java}\r\n$.indicator.transform = Ti.UI.create2DMatrix().rotate(angle)\r\n{code}\r\nI think it will be hard to intentionally reproduce this, crash is happening in callback, by the time view was already released and proxy became `null`.\r\n", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2018-07-12T17:01:46.000+0000", "updated": "2018-07-12T17:01:46.000+0000" }, { "id": "439189", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "{code:javascript}\r\nvar matrix = Ti.UI.create2DMatrix();\r\n\r\nfunction open() {\r\n var closed = false;\r\n function rotate(view, angle) {\r\n if (closed) {\r\n return;\r\n }\r\n console.log('Rotate');\r\n angle += 45;\r\n if (angle >= 360) {\r\n angle -= 360;\r\n }\r\n view.transform = matrix.rotate(angle);\r\n setTimeout(function() {\r\n rotate(view, angle)\r\n }, 150)\r\n }\r\n\r\n var window = Ti.UI.createWindow({\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.FILL,\r\n backgroundColor: 'white',\r\n layout: 'horizontal'\r\n });\r\n\r\n var view = Ti.UI.createImageView({\r\n width: 50,\r\n height: 50,\r\n image: 'assets/images/tab2.png'\r\n });\r\n\r\n rotate(view, 0);\r\n\r\n window.addEventListener('close', function onClose() {\r\n window.removeEventListener('close', onClose);\r\n console.log('CLOSE');\r\n closed = true;\r\n });\r\n window.add(view);\r\n window.open();\r\n}\r\n\r\nvar win = Ti.UI.createWindow({title: 'TIMOB-26204'});\r\nvar btn = Ti.UI.createButton({title: 'Open window'});\r\nbtn.addEventListener('click', open);\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\n1. tap \"Open window\" button\r\n2. wait for spinning image\r\n3. press back button.\r\n", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2018-07-13T09:59:56.000+0000", "updated": "2018-07-13T09:59:56.000+0000" }, { "id": "439440", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (community): https://github.com/appcelerator/titanium_mobile/pull/10202", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-07-24T15:05:07.000+0000", "updated": "2018-07-24T15:05:07.000+0000" }, { "id": "439513", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, Verified fix in SDK Version: {{7.4.0.v20180726102127}}\r\n\r\n*FR Passed (Test Steps):*\r\n# Created a titanium application with the test case mentioned above \r\n# Ran the App\r\n# Pressed the \"Open window\" button\r\n# Waited for the spinning image\r\n# pressed the back button\r\n# Repeated the above steps various times to ensure no error was shown or the application did not crash like previously \r\n\r\n*Test Environment*\r\n{code:java}\r\nAPPC Studio: 5.0.0.201712081732\r\nAPPC CLI: 7.0.4\r\nNexus 6p Emulator (7.1)\r\nOperating System Name: Mac OS High Sierra\r\nOperating System Version: 10.13\r\nNode.js Version: 8.9.1\r\nXcode 9.2\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-07-26T19:25:57.000+0000", "updated": "2018-07-26T19:25:57.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }