{ "id": "119254", "key": "AC-2217", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-01-17T07:24:49.000+0000", "created": "2013-08-29T15:30:06.000+0000", "labels": [ "android", "map", "mapview" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:12.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Sometimes when I open a MapView with Annotation I get this Random Crash.\r\nSeveral Beta Testers using several different devices have reported the same error and I have received the reports through Google Play of this crash related to the new ti.map android API (GMaps v2)\r\n\r\n\r\n{code}\r\n08-29 12:21:11.839: D/AndroidRuntime(28397): Shutting down VM\r\n08-29 12:21:11.839: W/dalvikvm(28397): threadid=1: thread exiting with uncaught exception (group=0x414f0700)\r\n08-29 12:21:11.839: E/TiApplication(28397): (main) [82734,82863] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.2,2013/08/14 12:46,5ceaff8\r\n08-29 12:21:11.839: E/TiApplication(28397): java.lang.NullPointerException\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.view.ViewConfiguration.get(ViewConfiguration.java:318)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.view.View.(View.java:3264)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.view.View.(View.java:3315)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.widget.TextView.(TextView.java:619)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.widget.TextView.(TextView.java:614)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.widget.TextView.(TextView.java:610)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.modules.titanium.ui.widget.TiUILabel$1.(TiUILabel.java:40)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.modules.titanium.ui.widget.TiUILabel.(TiUILabel.java:39)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.modules.titanium.ui.LabelProxy.createView(LabelProxy.java:55)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:452)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:438)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.map.TiMapInfoWindow.setLeftOrRightPane(TiMapInfoWindow.java:179)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:162)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:268)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.map.TiUIMapView.processPreloadAnnotations(TiUIMapView.java:71)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat ti.map.TiUIMapView.onViewCreated(TiUIMapView.java:87)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat org.appcelerator.titanium.view.TiUIFragment.handleMessage(TiUIFragment.java:58)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.os.Looper.loop(Looper.java:137)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat android.app.ActivityThread.main(ActivityThread.java:5103)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat java.lang.reflect.Method.invoke(Method.java:525)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\n08-29 12:21:11.839: E/TiApplication(28397): \tat dalvik.system.NativeStart.main(Native Method)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): FATAL EXCEPTION: main\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): java.lang.NullPointerException\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.view.ViewConfiguration.get(ViewConfiguration.java:318)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.view.View.(View.java:3264)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.view.View.(View.java:3315)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.widget.TextView.(TextView.java:619)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.widget.TextView.(TextView.java:614)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.widget.TextView.(TextView.java:610)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.modules.titanium.ui.widget.TiUILabel$1.(TiUILabel.java:40)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.modules.titanium.ui.widget.TiUILabel.(TiUILabel.java:39)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.modules.titanium.ui.LabelProxy.createView(LabelProxy.java:55)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:452)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:438)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.map.TiMapInfoWindow.setLeftOrRightPane(TiMapInfoWindow.java:179)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:162)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:268)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.map.TiUIMapView.processPreloadAnnotations(TiUIMapView.java:71)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat ti.map.TiUIMapView.onViewCreated(TiUIMapView.java:87)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat org.appcelerator.titanium.view.TiUIFragment.handleMessage(TiUIFragment.java:58)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.os.Looper.loop(Looper.java:137)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat android.app.ActivityThread.main(ActivityThread.java:5103)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat java.lang.reflect.Method.invoke(Method.java:525)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)\r\n08-29 12:21:11.839: E/AndroidRuntime(28397): \tat dalvik.system.NativeStart.main(Native Method)\r\n{code}\r\n\r\n\r\nIt seems to be related to the annotations on the multiple pins inside the mapView.\r\n\r\nThe mapView code in question is very simple (follows the code of the window that causes this crash):\r\n\r\nPS: ui. is my global mapping of Ti.UI with predefined UI widgets.\r\n map. is the Maps v2 Module (require(\"ti.map\"))\r\n\r\n{code}\r\nWindow = function() {\r\n\r\n\r\n var w = ui.window({\r\n backgroundColor: \"#777\",\r\n opacity: 1,\r\n orientationModes: [Ti.UI.PORTRAIT],\r\n navBarHidden: true,\r\n fullscreen: false,\r\n titleLabel: \"Mapa\",\r\n noSets: true\r\n });\r\n\r\n\r\n var m = map.createView({\r\n maptype: map.NORMAL_TYPE,\r\n region: {\r\n latitude: -23.584038,\r\n longitude: -46.679044,\r\n latitudeDelta: 0.01,\r\n longitudeDelta: 0.01\r\n },\r\n animate: true,\r\n userLocation: true,\r\n height: Ti.UI.FILL,\r\n width: Ti.UI.FILL,\r\n top: 46,\r\n left: 0\r\n });\r\n\r\n w.add(m);\r\n\r\n Ti.App.addEventListener(\"missionspop\", function() {\r\n\r\n api.missions.near.forEach(function(mi) {\r\n var pinPay = ui.label({\r\n text: \"R$ \" + Number(mi.pay).toFixed(2).replace(\".\", \",\"),\r\n color: \"#000\",\r\n height: 40,\r\n width: 40,\r\n touchEnabled: false\r\n });\r\n\r\n var pin = map.createAnnotation({\r\n pincolor: map.ANNOTATION_AZURE,\r\n latitude: mi.location[0],\r\n longitude: mi.location[1],\r\n title: mi.title,\r\n subtitle: mi.address,\r\n leftView: pinPay,\r\n animate: false,\r\n mission: mi\r\n });\r\n\r\n m.addAnnotation(pin);\r\n });\r\n });\r\n \r\n m.addEventListener(\"click\", function(e) {\r\n \r\n if (e.clicksource && e.clicksource != \"pin\") {\r\n var missionview = require(\"mission\")(e.annotation.mission);\r\n missionview.open();\r\n }\r\n });\r\n\r\n\r\n return w;\r\n}\r\n\r\nmodule.exports = Window;\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Random Crashes on Google Maps v2 API", "creator": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "subtasks": [], "reporter": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "environment": "Tested on more than 10 different devices.\r\nAll devices running Android 4.0 or superior.\r\nTi SDK 3.1.2.GA (also happens on 3.1.1.GA)", "comment": { "comments": [ { "id": "271677", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi Ygor Lemos,\r\n\r\nIt seems to me that something wrong in your code, because i have tested this several device it works, you can follow [this link|http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Map] properly. As far as i know you will get help and mind it you must registered API key from Google otherwise it will not works.\r\n\r\nThanks ", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-18T06:20:26.000+0000", "updated": "2013-09-18T06:36:21.000+0000" }, { "id": "273053", "author": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "body": "I have an app in production running for over 20k users on the App Store.\nThe vast majority has no problems at all with the map.\nA few users still experience this error. I don't believe it is related to the implementation code at all.", "updateAuthor": { "name": "ygbr", "key": "ygbr", "displayName": "Ygor Lemos", "active": true, "timeZone": "America/Sao_Paulo" }, "created": "2013-09-26T21:48:04.000+0000", "updated": "2013-09-26T21:48:04.000+0000" }, { "id": "275837", "author": { "name": "peaceofmind7", "key": "peaceofmind7", "displayName": "john adamis", "active": true, "timeZone": "Europe/Helsinki" }, "body": "I managed to reproduce this issue with 2 different devices. This happened in an alloy project if i openeded a new window containing the map then closing this with back button and quickly opening the map window again. This might not always happend the first time but after a couple of tries always occurs. Note that this only occurs in 3.1.2 and above. No crash if running in 3.1.0 or 3.1.1", "updateAuthor": { "name": "peaceofmind7", "key": "peaceofmind7", "displayName": "john adamis", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2013-10-19T06:42:17.000+0000", "updated": "2013-10-19T06:42:17.000+0000" }, { "id": "284361", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "We tried to reproduce this issue in-house but were not able to reproduce with the sample test case with Titanium SDK 3.1.3.GA. Please verify with the sample provided and let us know if the issue persists. \r\n\r\nh5. Testing Environment:\r\nAndroid SDK: 4.2.2\r\nTitanium SDK: 3.1.3\r\nTitanium CLI Version: 3.1.2\r\n\r\n h5. Test Code\r\n\r\n{code}\r\nvar Map = require('ti.map');\r\n\tvar win = Titanium.UI.createWindow();\r\n \r\n\tvar pinView = Titanium.Map.createAnnotation({\r\n\t\tlatitude : -23.584038,\r\n\t\tlongitude : -46.679044,\r\n\t\ttitle : \"Pin Test\",\r\n\t\tsubtitle : 'Pin',\r\n\t\tpincolor : Titanium.Map.ANNOTATION_RED,\r\n\t\tanimate : true,\r\n\t\tleftButton : '../images/small.png',\r\n\t\tmyid : 1 // Custom property to uniquely identify this annotation.\r\n\t});\r\n \r\n\tvar mapview = Titanium.Map.createView({\r\n\t\tmapType : Titanium.Map.STANDARD_TYPE,\r\n\t\tregion: {\r\n latitude: -23.584038,\r\n longitude: -46.679044,\r\n latitudeDelta: 0.01,\r\n longitudeDelta: 0.01\r\n },\r\n\t\tanimate : true,\r\n\t\tregionFit : true,\r\n\t\tuserLocation : true,\r\n\t\tannotations : [pinView]\r\n\t});\r\n \r\n\twin.add(mapview);\r\n\t// Handle click events on any annotations on this map.\r\n\tmapview.addEventListener('click', function(evt) {\r\n \r\n\t\tTi.API.info(\"Annotation \" + evt.title + \" clicked, id: \" + evt.annotation.myid);\r\n \r\n\t});\r\n \r\n\twin.open();\r\n{code}\r\n\r\ntiapp.xml \r\n{code}\r\n~~~~~~\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n~~~~~~\r\n{code}\r\n\r\n\r\nh5. Step to test \r\n# Create a sample Project.\r\n# Paste this code in app.js file.\r\n# Add the ti.map module in tiapp.xml file \r\n# Paste the xml file in tiapp.xml file and update the AppId and API KEY to this.\r\n# Run this code with testing environment.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-15T14:13:37.000+0000", "updated": "2014-01-15T23:23:25.000+0000" }, { "id": "288591", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ygbr][~peaceofmind7] There were quite a few issues (crashes and memory leaks) with native Android Maps feature that have been resolved in last few months. We have also fixed a number of maps crashes in 3.2.0 release. We would suggest you to upgrade to the latest SDK and Maps module and let us know if you can reproduce this problem. We would be happy to diagnose this issue with you if you can reproduce it even after the upgrade.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-17T07:24:24.000+0000", "updated": "2014-01-17T07:24:24.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }