{ "id": "172046", "key": "MOD-2452", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20242", "name": "Ti.Map Android 4.3.1", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-08-20T20:44:57.000+0000", "created": "2018-08-12T12:12:06.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-20T20:44:57.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13700", "name": "Map" } ], "description": "When closing a window with a map view on Android, the following error occurs if the closing-process was done before the map finished loading:\r\n{code}\r\n[ERROR] TiApplication: (main) [308,10619] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.appcelerator.titanium.proxy.TiViewProxy.fireEvent(java.lang.String, java.lang.Object)' on a null object reference; Titanium 7.2.0,2018/06/07 05:21,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)' on a null object reference\r\n[ERROR] TiApplication: \tat ti.map.TiUIMapView.onMapLoaded(TiUIMapView.java:1088)\r\n[ERROR] TiApplication: \tat com.google.android.gms.maps.zzj.onMapLoaded(Unknown Source:2)\r\n[ERROR] TiApplication: \tat com.google.android.gms.maps.internal.zzam.onTransact(Unknown Source:10)\r\n[ERROR] TiApplication: \tat android.os.Binder.transact(Binder.java:604)\r\n[ERROR] TiApplication: \tat fb.b(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):20)\r\n[ERROR] TiApplication: \tat com.google.android.gms.maps.internal.bc.a(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):4)\r\n[ERROR] TiApplication: \tat com.google.maps.api.android.lib6.impl.cr.run(:com.google.android.gms.dynamite_mapsdynamite@12874026@12.8.74 (040700-204998136):34)\r\n[ERROR] TiApplication: \tat android.os.Handler.handleCallback(Handler.java:789)\r\n[ERROR] TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:98)\r\n[ERROR] TiApplication: \tat android.os.Looper.loop(Looper.java:164)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:6541)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiApplication: \tat com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)\r\n{code}\r\n\r\nIt seems like the map listeners are not cleaned up on window-close, so it tried to fire the \"complete\" event on a proxy that was destroyed already. A proper fix should remove the listener and clean up the map-view instance. A hacky fix could guard if the proxy is null and do not fire the event is so. ", "attachment": [], "flagged": false, "summary": "Ti.Map: Android - Error when closing a window with a map-view", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": "SDK 7.2.0.GA\r\nAndroid 8.1", "comment": { "comments": [ { "id": "440863", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator-modules/ti.map/pull/242", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-17T23:19:09.000+0000", "updated": "2018-08-17T23:19:09.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }