{ "id": "127303", "key": "TIMOB-16562", "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": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" }, { "id": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-10-27T18:55:46.000+0000", "created": "2014-03-06T10:18:03.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "module_androidmapv2", "qe-manualtest", "qe-testadded", "supportTeam" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-21T18:49:21.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": "h5. Problem Description \r\n\r\nException is thrown when passing objects with null/undefined values for expected keys values on Android. Ti.map.TiUIMapView passes this null value to TiConvert.toDouble which causes then throws a NullPointerException.\r\n\r\nHere is an example piece of code when setting a map region. This works fine on iOS:\r\n{code}\r\nfunction setup(event) {\r\n\r\n $.map.region = {\r\n latitude: 36,\r\n longitude: -78,\r\n latitudeDelta: null,\r\n longitudeDelta: null\r\n };\r\n}\r\n{code}\r\nHere is the exception on Android:\r\n{code}\r\n[ERROR] : TiApplication: (main) [1830,1830] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.2.0,2013/12/20 10:57,d9182d6\r\n[ERROR] : TiApplication: java.lang.NullPointerException\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:527)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toDouble(TiConvert.java:540)\r\n[ERROR] : TiApplication: at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:247)\r\n[ERROR] : TiApplication: at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:171)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21)\r\n[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1059)\r\n[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:329)\r\n[ERROR] : TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:150)\r\n[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:158)\r\n[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5789)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)\r\n[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:525)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)\r\n[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:843)\r\n[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)\r\n\r\n{code}\r\n\r\nThis the kroll bridge should either ignore null/undefined values or have each\r\nhave maps module defensively check for null values.\r\n\r\nI've attached a project showcases the error.\r\n", "attachment": [ { "id": "50636", "filename": "ErrorScreenShot.png", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-08-21T17:45:03.000+0000", "size": 91776, "mimeType": "image/png" }, { "id": "46422", "filename": "krollBridge.zip", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2014-03-06T10:25:45.000+0000", "size": 757617, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: Kroll bridge passing null/undefined values can throw exceptions when passed to TiConvert methods", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "Mac OS X 10.9.2 \r\nTi SDK 3.2.1.GA\r\nTi CLI 3.2.1\r\nAlloy 1.3.1", "closedSprints": [ { "id": 149, "state": "closed", "name": "2014 Sprint 14 SDK", "startDate": "2014-07-07T21:48:52.340Z", "endDate": "2014-07-19T00:00:00.000Z", "completeDate": "2014-07-21T15:58:32.928Z", "originBoardId": 114 }, { "id": 175, "state": "closed", "name": "2014 Sprint 17 SDK", "startDate": "2014-08-21T22:07:00.000Z", "endDate": "2014-08-30T00:00:00.000Z", "completeDate": "2014-09-02T19:56:25.517Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "296349", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This I believe will be fixed in the maps module, however, the fix will be that we are more defensive of Null values. Instead, they should use a default value of 0 for lat/long instead of null.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-10T19:11:44.000+0000", "updated": "2014-03-10T19:11:44.000+0000" }, { "id": "303179", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Since the fix is in the maps module, it does not need to go out with 3.3.0", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-01T17:16:22.000+0000", "updated": "2014-05-01T17:16:22.000+0000" }, { "id": "314854", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR for TIMOB: https://github.com/appcelerator/titanium_mobile/pull/5917\r\nti.map PR: https://github.com/appcelerator-modules/ti.map/pull/45\r\n\r\nTest steps:\r\n\r\n1. Create a project and use the example code from the ti.map module (You will need to copy all the relevant code and resources from the examples dir of the map module.)\r\n2. Inside the annotations.js file, change all the values of latitude, longitude, latitudeDelta, longitudeDelta values to null\r\n3. Run the example code, and verify that the annotations section does not crash", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-18T18:51:28.000+0000", "updated": "2014-07-18T19:52:03.000+0000" }, { "id": "319734", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "The problems still exists on:\r\n\r\nMac OSX 10.9.4\r\nAppcelerator Studio, build: 3.4.0.201408201526 \r\nTitanium SDK build: 3.4.0.v20140820125714\r\nTitanium CLI, build: 3.4.0-dev\r\nAlloy: 1.5.0-dev\r\n\r\nUsing the ti.Map 2.1.4 module example code, I changed all latitude, longitude, latitudeDelta, longitudeDelta values to null and obtained the error shown in the attached screenshot.\r\n\r\nReopening the issue.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-08-21T17:44:44.000+0000", "updated": "2014-08-21T17:44:44.000+0000" }, { "id": "320597", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving into 3.5.0 as this relies on updating the map as well. Does [~eharris] need to test with ti.map 2.1.6+?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-27T16:53:17.000+0000", "updated": "2014-08-27T16:53:17.000+0000" }, { "id": "321066", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, this needs to be tested with 2.1.6+ for ti.map", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-29T17:28:21.000+0000", "updated": "2014-08-29T17:28:21.000+0000" }, { "id": "321069", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is a link to ti.map 2.2.0 (just click on \"Raw\" to download): https://github.com/appcelerator-modules/ti.map/blob/master/android/dist/ti.map-android-2.2.0.zip", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-29T17:40:07.000+0000", "updated": "2014-08-29T17:40:07.000+0000" }, { "id": "321125", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.9.4\r\nAppcelerator Studio, build: 3.4.0.201408291421\r\nTitanium SDK build: 3.4.0.v20140829104912 \r\nTitanium CLI, build: 3.4.0-dev\r\nAlloy: 1.5.0-dev\r\nti.map 2.2.0\r\nAndroid Emulator 4.4.2\r\nAndroid Device S4 (4.0.4)\r\n\r\nUsing ti.map 2.2.0 took the code from the example folder changed all latitude, longitude, latitudeDelta, longitudeDelta values to null and opened the annotations section. The app does not crash.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-08-29T23:11:41.000+0000", "updated": "2014-08-29T23:11:41.000+0000" }, { "id": "329209", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We _might_ be fixing this in 3.4.1 with an updated map module. Adding to 3.4.1 to confirm.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-23T19:14:50.000+0000", "updated": "2014-10-23T19:14:50.000+0000" }, { "id": "329636", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\n\r\nMac OSX 10.10\r\nAppcelerator Studio, build: 3.4.1.201410191611\r\nTitanium SDK build: 3.4.1.v20141024151719\r\nTitanium CLI, build: 3.4.1-dev\r\nAlloy: 1.5.1\r\nti.map 2.2.1\r\nAndroid Device S5 (4.4.2)\r\n\r\nUsing ti.map 2.2.1 took the example code and change the latitude, longitude, latitudeDelta, longitudeDelta to null and opened the annotations section, the app does not crash.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2014-10-27T22:46:13.000+0000", "updated": "2014-10-27T22:46:13.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }