{ "id": "117198", "key": "TIMOB-14558", "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": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-22T22:45:02.000+0000", "created": "2013-07-15T20:35:47.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "30215", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "inwardIssue": { "id": "114033", "key": "TIMOB-13796", "fields": { "summary": "Android: Implement new window architecture", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "30234", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "116505", "key": "TIMOB-14393", "fields": { "summary": "Android: JS proxies are prematurely cleaned up when dalvik gc is triggered ", "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": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:04.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": "This is a regression caused by [PR#4417|https://github.com/appcelerator/titanium_mobile/pull/4417].\r\nSteps to reproduce:\r\n1. Run the code below.\r\n2. Click \"Open MapModule\".\r\n3. Click \"add anno3\" or \"rm anno3\".\r\nExpected behavior: The anno3 is added or removed.\r\nActual behavior: The app crashes.\r\n\r\n{code}\r\nvar MapModule = require('ti.map');\r\n \r\nvar win = Ti.UI.createWindow({\r\n\tfullscreen: false\r\n});\r\nvar table = Ti.UI.createTableView();\r\nvar tableData = [];\r\n \r\nvar centerTrue = Ti.UI.createTableViewRow({\r\n title : 'Open TiMapView'\r\n});\r\ntableData.push(centerTrue);\r\ncenterTrue.addEventListener('click', function(e) {\r\n openTiMapView();\r\n});\r\n \r\nvar annotationRow = Ti.UI.createTableViewRow({\r\n title : 'Open MapModule'\r\n});\r\ntableData.push(annotationRow);\r\nannotationRow.addEventListener('click', function(e) {\r\n annotationTest();\r\n});\r\n \r\ntable.setData(tableData);\r\nwin.add(table);\r\nwin.open();\r\n \r\nfunction openTiMapView() {\r\n var win = Ti.UI.createWindow({\r\n backgroundColor : '#fff'\r\n });\r\n var map = Ti.Map.createView({\r\n mapType : Ti.Map.STANDARD_TYPE,\r\n regionFit : true\r\n });\r\n var annotation = Ti.Map.createAnnotation({\r\n latitude : 59.93473,\r\n longitude : 10.760797,\r\n title : 'Center TRUE _ Print House AS',\r\n subtitle : 'Sandakerveien 24 C Bygg A2, 0473 Oslo',\r\n animate : true,\r\n pincolor : Ti.Map.ANNOTATION_PURPLE\r\n });\r\n map.addAnnotation(annotation);\r\n map.selectAnnotation({\r\n annotation : annotation,\r\n center : false//either true or false makes no difference\r\n });\r\n map.setLocation({\r\n latitude : 60,\r\n longitude : 10.760797,\r\n latitudeDelta : 0.035,\r\n longitudeDelta : 0.035\r\n });\r\n \r\n win.add(map);\r\n win.open();\r\n \r\n}\r\n \r\nfunction annotationTest() {\r\n var win = Ti.UI.createWindow({\r\n fullscreen : false\r\n });\r\n var anno = MapModule.createAnnotation({\r\n latitude : -33.87365,\r\n image : 'map_pin.png',\r\n longitude : 151.20689,\r\n title : \"Sydney\",\r\n subtitle : \"Sydney is quite chill\",\r\n draggable : true\r\n });\r\n var anno2 = MapModule.createAnnotation({\r\n latitude : -33.86365,\r\n pincolor : MapModule.ANNOTATION_BLUE,\r\n longitude : 151.21689,\r\n title : \"Anno2\",\r\n subtitle : \"This is anno2\",\r\n draggable : true\r\n });\r\n var anno3 = MapModule.createAnnotation({\r\n latitude : -33.85365,\r\n longitude : 151.20689,\r\n title : \"Anno3\",\r\n subtitle : \"This is anno3\",\r\n draggable : false\r\n });\r\n var anno4 = MapModule.createAnnotation({\r\n latitude : -33.86365,\r\n longitude : 151.22689,\r\n title : \"Anno4\",\r\n subtitle : \"This is anno4\",\r\n draggable : true\r\n });\r\n \r\n Ti.API.info(\"Latitude:\" + anno.latitude);\r\n Ti.API.info(\"Title:\" + anno.title);\r\n \r\n var map = MapModule.createView({\r\n userLocation : true,\r\n mapType : MapModule.NORMAL_TYPE,\r\n animate : true,\r\n annotations : [anno, anno2, anno4],\r\n region : {\r\n latitude : -33.87365,\r\n longitude : 151.20689,\r\n latitudeDelta : 0.1,\r\n longitudeDelta : 0.1\r\n }, //Sydney\r\n top : '30%'\r\n });\r\n Ti.API.info(\"userLocation: \" + map.userLocation);\r\n win.add(map);\r\n \r\n map.addEventListener('click', function(e) {\r\n Ti.API.info(\"Latitude: \" + e.latitude);\r\n Ti.API.info(\"Source: \" + e.clicksource);\r\n });\r\n var button = Ti.UI.createButton({\r\n top : 0,\r\n left : 0,\r\n title : \"Go Mt. View\"\r\n });\r\n button.addEventListener('click', function(e) {\r\n map.region = {\r\n latitude : 37.3689,\r\n longitude : -122.0353,\r\n latitudeDelta : 0.1,\r\n longitudeDelta : 0.1\r\n };\r\n //Mountain View\r\n });\r\n \r\n var button2 = Ti.UI.createButton({\r\n top : 0,\r\n right : 0,\r\n title : \"add anno3\"\r\n });\r\n button2.addEventListener('click', function(e) {\r\n Ti.API.info(\"********************* button2 is clicked\");\r\n map.addAnnotation(anno3);\r\n });\r\n \r\n var button3 = Ti.UI.createButton({\r\n top : 0,\r\n title : \"rm anno3\"\r\n });\r\n button3.addEventListener('click', function(e) {\r\n Ti.API.info(\"********************* button3 is clicked\");\r\n map.removeAnnotation(anno3);\r\n });\r\n \r\n var button4 = Ti.UI.createButton({\r\n top : '10%',\r\n title : \"rm all\"\r\n });\r\n button4.addEventListener('click', function(e) {\r\n map.removeAllAnnotations();\r\n });\r\n \r\n var button5 = Ti.UI.createButton({\r\n top : '10%',\r\n left : 0,\r\n title : \"remove annos\"\r\n });\r\n button5.addEventListener('click', function(e) {\r\n Ti.API.info(anno.getTitle());\r\n map.removeAnnotations([\"Sydney\", anno2]);\r\n });\r\n \r\n var button6 = Ti.UI.createButton({\r\n top : '10%',\r\n right : 0,\r\n title : \"select anno2\"\r\n });\r\n button6.addEventListener('click', function(e) {\r\n map.selectAnnotation(anno2);\r\n });\r\n map.selectAnnotation(anno2);\r\n var button7 = Ti.UI.createButton({\r\n top : '20%',\r\n left : 0,\r\n title : \"desel anno2\"\r\n });\r\n button7.addEventListener('click', function(e) {\r\n map.deselectAnnotation(anno2);\r\n });\r\n \r\n var button8 = Ti.UI.createButton({\r\n top : '20%',\r\n right : 0,\r\n title : \"modify anno2\"\r\n });\r\n button8.addEventListener('click', function(e) {\r\n anno2.title = \"Hello\";\r\n anno2.subtitle = \"Hi there.\";\r\n anno2.longitude = 151.27689;\r\n });\r\n \r\n win.add(button);\r\n win.add(button2);\r\n win.add(button3);\r\n win.add(button4);\r\n win.add(button5);\r\n win.add(button6);\r\n win.add(button7);\r\n win.add(button8);\r\n win.open();\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Map V2: addAnnotation crashes", "creator": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "262510", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4466\r\nFor FR, please test the original test case and the test case attached below, and run KS as a sanity check.\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tfullscreen: false\r\n});\r\n\r\nvar v = Ti.UI.createView({\r\n\ttop: 10,\r\n\tbackgroundColor: \"blue\"\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttop: 100,\r\n\ttext: \"label\"\r\n});\r\n\r\nvar button1 = Ti.UI.createButton({\r\n\ttop: 200,\r\n\ttitle: \"add label\"\r\n});\r\n\r\nbutton1.addEventListener(\"click\", function() {\r\n\twin.add(label);\r\n});\r\n\r\nvar button2 = Ti.UI.createButton({\r\n\ttop: 300,\r\n\ttitle: \"remove label\"\r\n});\r\n\r\nbutton2.addEventListener(\"click\", function() {\r\n\twin.remove(label);\r\n});\r\n\r\nwin.add(v);\r\nwin.add(button1);\r\nwin.add(button2);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-19T20:56:40.000+0000", "updated": "2013-07-19T20:57:27.000+0000" }, { "id": "266706", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with QE test code, and two cases attached to this ticket using:\nSDK 3.1.2.v20130814124556\nTitanium Studio: 3.1.2.201308091617\nMap module 2.1.2", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T17:54:17.000+0000", "updated": "2013-08-15T17:54:17.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }