{ "id": "168022", "key": "TIMOB-24756", "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": "19572", "description": "Important fixes for 6.1.0", "name": "Release 6.1.1", "archived": false, "released": true, "releaseDate": "2017-06-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-06-05T22:47:06.000+0000", "created": "2017-05-31T23:09:30.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "merge-6.1.1", "regression" ], "versions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "issuelinks": [ { "id": "55330", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "168742", "key": "TIMOB-24926", "fields": { "summary": "Android: Prevent fireEvent when proxy has been released", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2017-07-03T19:55: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": "I'm getting this exception when running my application on Android with TI SDK 6.1.0. If the images property is set and start has been called, when the window closes you get the below errors. I have attached the controller, view, tss files\r\n\r\n{quote}\r\n[ERROR] : TiApplication: (Thread-926) [5221,5221] Sending event: exception on thread: Thread-926 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object org.appcelerator.titanium.proxy.TiViewProxy.getProperty(java.lang.String)' on a null object reference; Titanium 6.1.0,2017/05/26 15:24,undefined\r\n[ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object org.appcelerator.titanium.proxy.TiViewProxy.getProperty(java.lang.String)' on a null object reference\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIImageView.getDuration(TiUIImageView.java:465)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIImageView$Loader.run(TiUIImageView.java:406)\r\n[ERROR] : TiApplication: \tat java.lang.Thread.run(Thread.java:818)\r\n[DEBUG] : Window: Window is closed normally.\r\n[ERROR] : TiApplication: (Timer-0) [51,5272] Sending event: exception on thread: Timer-0 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object, boolean)' on a null object reference; Titanium 6.1.0,2017/05/26 15:24,undefined\r\n[ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object, boolean)' on a null object reference\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1958)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiUIView.fireEvent(TiUIView.java:1949)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIImageView.fireChange(TiUIImageView.java:503)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIImageView.access$1600(TiUIImageView.java:53)\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIImageView$Animator.run(TiUIImageView.java:553)\r\n[ERROR] : TiApplication: \tat java.util.Timer$TimerImpl.run(Timer.java:284)\r\n[INFO] : Process: Sending signal. PID: 16778 SIG: 9{quote}", "attachment": [ { "id": "62322", "filename": "blue.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-01T14:44:17.000+0000", "size": 341, "mimeType": "image/png" }, { "id": "62321", "filename": "green.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-01T14:44:17.000+0000", "size": 342, "mimeType": "image/png" }, { "id": "62311", "filename": "index.js", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-31T23:07:32.000+0000", "size": 89, "mimeType": "text/javascript" }, { "id": "62310", "filename": "index.tss", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-31T23:07:32.000+0000", "size": 386, "mimeType": "application/octet-stream" }, { "id": "62309", "filename": "index.xml", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-31T23:07:32.000+0000", "size": 115, "mimeType": "text/xml" }, { "id": "62320", "filename": "red.png", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-01T14:44:17.000+0000", "size": 326, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Ti.UI.ImageView with \"images\" property causes crash", "creator": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 6.0\r\nTI SDK 6.1.0", "closedSprints": [ { "id": 903, "state": "closed", "name": "2017 Sprint 12 SDK", "startDate": "2017-06-05T00:15:46.290Z", "endDate": "2017-06-19T00:15:00.000Z", "completeDate": "2017-06-19T16:09:22.870Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "420763", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Some issues that I can see with this test-case:\r\n* You are closing the root-window of the application, I guess the issue itself was happening in a sub-window?\r\n* The images have spaces in their filenames\r\n* Does this only happen on 6.1.0.GA and did it work in 6.0.x?\r\n\r\nIt crashes in [this line|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIImageView.java#L465] and suspects that the proxy is already null when accessing. Here is an isolated test-case that may reproduce the issue (remember to place the referenced images in your resources directory):\r\n{code:js}\r\nvar window = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Open Sub-Window'\r\n});\r\n\r\nbtn.addEventListener('click', function() { \r\n var window2 = Ti.UI.createWindow({\r\n \tbackgroundColor: 'green'\r\n });\r\n \r\n var background = Ti.UI.createView({\r\n \tleft: 0,\r\n \tright: 0,\r\n \ttop: 0,\r\n \tbottom: 0,\r\n \tbackgroundColor: 'black',\r\n \topacity: '.6'\r\n });\r\n\r\n var loading = Ti.UI.createImageView({\r\n \ttop: 140,\r\n \tduration: 70,\r\n \timages: ['apple.png', 'orange.png', 'pinapple.png']\r\n });\r\n\r\n background.add(loading);\r\n window2.add(background);\r\n\r\n loading.start();\r\n\r\n setTimeout(function() {\r\n \twindow2.close();\r\n }, 5000);\r\n \r\n window2.open();\r\n});\r\n\r\nwindow.add(btn);\r\nwindow.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-06-01T13:38:21.000+0000", "updated": "2017-06-01T13:38:57.000+0000" }, { "id": "420770", "author": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hans, to answer your questions:\r\n* In the application where I observed the issue I open a new window and close the previous one which has this type of image view.\r\n* Even if I change the image names, the result is the same\r\n* This only happens with 6.1.0.GA if I change back to 6.0.4 it works fine\r\n\r\nThe test case you posted does recreate the issue.\r\n", "updateAuthor": { "name": "jceaser", "key": "jceaser", "displayName": "Joshua A. Ceaser", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-01T13:57:36.000+0000", "updated": "2017-06-01T13:57:36.000+0000" }, { "id": "420772", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9103", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-01T14:45:55.000+0000", "updated": "2017-06-01T14:45:55.000+0000" }, { "id": "420931", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9109", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-05T20:05:08.000+0000", "updated": "2017-06-05T20:05:08.000+0000" }, { "id": "421095", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fix in SDK version 6.1.1.v20170605155640 and 6.2.0.v20170605134755. Test and other information can be found at:\r\nMaster: https://github.com/appcelerator/titanium_mobile/pull/9103\r\n6_1_X: https://github.com/appcelerator/titanium_mobile/pull/9109 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-06T16:21:04.000+0000", "updated": "2017-06-06T16:21:04.000+0000" }, { "id": "423221", "author": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This has created a regression issue. \r\n\r\nAdding `handleStop()` to the release event is causing a `NullPointerException` with the `org.appcelerator.titanium.proxy.TiViewProxy.fireEvent` being called on a null reference.\r\n\r\nFor example when an `ImageView` is being used in a `ScrollableView`.", "updateAuthor": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-30T00:17:09.000+0000", "updated": "2017-06-30T00:17:09.000+0000" }, { "id": "423254", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dbankier] Could you provide a test case that reproduces the issue?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-06-30T12:25:31.000+0000", "updated": "2017-06-30T12:25:31.000+0000" }, { "id": "423304", "author": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sure:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view1 = Ti.UI.createWindow({ backgroundColor:'#123' });\r\nvar view2 = Ti.UI.createWindow();\r\nvar imageView = Ti.UI.createImageView({ image:'appicon.png' })\r\nview2.add(imageView);\r\nvar view3 = Ti.UI.createWindow({ backgroundColor:'#48b' });\r\nvar view4 = Ti.UI.createWindow();\r\nvar row = Ti.UI.createTableViewRow();\r\nvar image = Ti.UI.createImageView({ image:'appicon.png' })\r\nrow.add(image);\r\nvar table = Ti.UI.createTableView({data: [row]});\r\nview4.add(table)\r\nvar view5 = Ti.UI.createWindow({ backgroundColor:'#48b' });\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n views:[view1,view2,view3,view4, view5],\r\n showPagingControl:true\r\n});\r\n\r\nvar currentPage = 0;\r\nsetInterval(function() {\r\n currentPage++\r\n scrollableView.currentPage = currentPage % 5\r\n},1000)\r\n\r\nwin.add(scrollableView);\r\nwin.open();\r\n{code}\r\n\r\n", "updateAuthor": { "name": "dbankier", "key": "dbankier", "displayName": "David Bankier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-07-03T00:57:46.000+0000", "updated": "2017-07-03T00:57:46.000+0000" }, { "id": "423412", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-07-03T19:55:11.000+0000", "updated": "2017-07-03T19:55:11.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }