{ "id": "119815", "key": "TIMOB-15123", "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": "15703", "description": "2013 Sprint 22", "name": "2013 Sprint 22", "archived": true, "released": true, "releaseDate": "2013-11-01" }, { "id": "15704", "description": "2013 Sprint 22 API", "name": "2013 Sprint 22 API", "archived": true, "released": true, "releaseDate": "2013-11-01" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-10-28T19:49:05.000+0000", "created": "2013-09-12T10:31:43.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "crash", "ti.map" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T22:00: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": "We get \"Out of Memory\" issue in ti.map when getting directions between far places after 2-3 times.\r\n\r\nHere are the error logs:\r\n\r\n{code}\r\n09-12 15:36:02.483: D/libgps(490): proxy_gps_sv_status_cb()\r\n09-12 15:36:02.723: I/dalvikvm-heap(29487): Clamp target GC heap from 71.991MB to 64.000MB\r\n09-12 15:36:02.723: D/dalvikvm(29487): GC_BEFORE_OOM freed <1K, 1% free 65382K/65536K, paused 371ms, total 371ms\r\n09-12 15:36:02.723: E/dalvikvm-heap(29487): Out of memory on a 80-byte allocation.\r\n09-12 15:36:02.723: I/dalvikvm(29487): Can't dump thread 1: threadObj not set\r\n09-12 15:36:02.723: W/dalvikvm(29487): Exception thrown (Ljava/lang/OutOfMemoryError;) while throwing internal exception (Ljava/lang/OutOfMemoryError;)\r\n09-12 15:36:03.073: I/dalvikvm-heap(29487): Clamp target GC heap from 71.991MB to 64.000MB\r\n09-12 15:36:03.073: D/dalvikvm(29487): GC_FOR_ALLOC freed <1K, 1% free 65382K/65536K, paused 347ms, total 347ms\r\n09-12 15:36:03.423: I/dalvikvm-heap(29487): Clamp target GC heap from 71.991MB to 64.000MB\r\n09-12 15:36:03.423: D/dalvikvm(29487): GC_FOR_ALLOC freed 0K, 1% free 65382K/65536K, paused 352ms, total 352ms\r\n09-12 15:36:03.423: I/dalvikvm-heap(29487): Forcing collection of SoftReferences for 36-byte allocation\r\n{code}\r\n\r\n*Steps to reproduce* :\r\n\r\n1. Import the attached project in Titanium Studio.\r\n\r\n2. Run and Launch it in Nexus 7.\r\n\r\n3. Two textfields would be shown. Enter 'Danbury' and 'LosAngeles' in those textfields.\r\n\r\n4. Click on 'Get Directions' button.A map with the appropriate route would be shown.\r\n\r\n5. Repeat step 4 approx 2-3 times. Application crashed due to memory issue.\r\n\r\n*Note:* If the same steps followed to get the directions between nearer places, the crash did not happen.", "attachment": [ { "id": "42421", "filename": "SampleMapV2-2.zip", "author": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-12T10:31:43.000+0000", "size": 2175580, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android : \"Out of Memory\" issue in ti.map when getting directions between far places after 2-3 times", "creator": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpathak", "key": "mpathak", "displayName": "Meenakshi Pathak", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1.2, ti.map-2.1.2, Android 4.2.1, Nexus 7", "comment": { "comments": [ { "id": "275419", "author": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any update on this issue?", "updateAuthor": { "name": "btran", "key": "btran", "displayName": "Betty Tran", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-17T14:13:31.000+0000", "updated": "2013-10-17T14:13:31.000+0000" }, { "id": "277016", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem here is that the sample code keep adding routes but never remove them. The distance between 'Danbury' and 'Los Angeles' results in a route that contain 75k+ points of latitude and longitude. This is 35mb+ of memory PER ROUTE. To prevent this, before adding new routes, one simply need to: \r\n1. Remove the old route from the map.\r\n2. Remove the 'points' property of the route (We need to do this because V8 GC is slow, and we know in this case that 'points' contain well over 75k objects. This is an aggressive approach, and will give us significant memory back while waiting for V8 to clean up the entire proxy.)\r\n3. Set the RouteProxy to null (This will cause V8 to clean up the proxy some time later)\r\n\r\nNote that if you only do step 1 and 3, you'll still get an Out of Memory error on long distance routes.\r\n\r\n{code}\r\nif (route != null) {\r\n mapView.removeRoute(route);\r\n route.points = {};\r\n route = null;\r\n}\r\n{code}", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-28T19:46:23.000+0000", "updated": "2013-10-28T19:49:58.000+0000" }, { "id": "277017", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing issue.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-28T19:48:52.000+0000", "updated": "2013-10-28T19:48:52.000+0000" }, { "id": "408945", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T22:00:21.000+0000", "updated": "2017-03-03T22:00:21.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }