{ "id": "89288", "key": "TIMOB-8460", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-09T17:00:56.000+0000", "created": "2012-03-30T14:45:37.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "qe-and031912" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-09T17:00:56.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": "Module events such as Geolocation heading are not removed on app close.\r\n\r\nThis is not a regression, but the behavior has changed since 1.8.2.\r\n\r\nIn 1.8.2 this resulted in a crash.\r\n\r\nIn 2.0.0 this results in runtime disposed log messages fired after app close.\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code on device with geolocation support.\r\n2. Press phone 'back' to close app.\r\n\r\n{code:title=app.js}\r\nvar _window = Ti.UI.createWindow({\r\n\tbackgroundColor:'green'\r\n});\r\n\r\nTi.Geolocation.preferredProvider = \"gps\";\r\n\r\n\r\nif(Titanium.Geolocation.locationServicesEnabled === false) {\r\n\tTitanium.UI.createAlertDialog({\r\n\t\ttitle : 'Kitchen Sink',\r\n\t\tmessage : 'Your device has geo turned off - turn it on.'\r\n\t}).show();\r\n} else {\r\n\tif(Titanium.Platform.name != 'android') {\r\n\t\tvar authorization = Titanium.Geolocation.locationServicesAuthorization;\r\n\t\t\r\n\t\tif(authorization == Titanium.Geolocation.AUTHORIZATION_DENIED) {\r\n\t\t\tTi.UI.createAlertDialog({\r\n\t\t\t\ttitle : 'TIMOB_3077',\r\n\t\t\t\tmessage : 'You need to allow geolaction for this test.'\r\n\t\t\t}).show();\r\n\t\t} \r\n\t}\r\n\r\n\t//\r\n\t// IF WE HAVE COMPASS GET THE HEADING\r\n\t//\r\n\tif(Titanium.Geolocation.hasCompass) {\r\n\t\t//\r\n\t\t// TURN OFF ANNOYING COMPASS INTERFERENCE MESSAGE\r\n\t\t//\r\n\t\tTitanium.Geolocation.showCalibration = false;\r\n\r\n\t\t//\r\n\t\t// SET THE HEADING FILTER (THIS IS IN DEGREES OF ANGLE CHANGE)\r\n\t\t// EVENT WON'T FIRE UNLESS ANGLE CHANGE EXCEEDS THIS VALUE\r\n\t\tTitanium.Geolocation.headingFilter = 1;\r\n\r\n\t\t//\r\n\t\t// EVENT LISTENER FOR COMPASS EVENTS - THIS WILL FIRE REPEATEDLY (BASED ON HEADING FILTER)\r\n\t\t//\r\n\t\tvar headingCallback = function(e) {\r\n\r\n\t\t\tvar x = e.heading.x;\r\n\t\t\tvar y = e.heading.y;\r\n\t\t\tvar z = e.heading.z;\r\n\t\t\tvar magneticHeading = e.heading.magneticHeading;\r\n\t\t\tvar accuracy = e.heading.accuracy;\r\n\t\t\tvar trueHeading = e.heading.trueHeading;\r\n\t\t\tvar timestamp = e.heading.timestamp;\r\n\t\t\t\r\n\t\t\tTi.API.debug('True heading should be less than 360 and is:' + e.heading.trueHeading);\r\n\t\t\t\r\n\t\t\tif(e.heading.trueheading >= 360) {\r\n\t\t\t\talert('True heading should be less than 360 and is:' + e.heading.trueHeading);\r\n\t\t\t}\r\n\t\t};\r\n\t\tTitanium.Geolocation.addEventListener('heading', headingCallback);\r\n\t\theadingAdded = true;\r\n\t} else {\r\n\t\tTitanium.API.info(\"No Compass on device\");\r\n\t}\r\n\r\n\t//\r\n\t// SET ACCURACY - THE FOLLOWING VALUES ARE SUPPORTED\r\n\t//\r\n\tTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\n\r\n\t//\r\n\t// SET DISTANCE FILTER. THIS DICTATES HOW OFTEN AN EVENT FIRES BASED ON THE DISTANCE THE DEVICE MOVES\r\n\t// THIS VALUE IS IN METERS\r\n\t//\r\n\tTitanium.Geolocation.distanceFilter = 10;\r\n\r\n\t//\r\n\t// GET CURRENT POSITION - THIS FIRES ONCE\r\n\t//\r\n\tTitanium.Geolocation.getCurrentPosition(function(e) {});\r\n\t//\r\n\t// EVENT LISTENER FOR GEO EVENTS - THIS WILL FIRE REPEATEDLY (BASED ON DISTANCE FILTER)\r\n\t//\r\n\tvar locationCallback = function(e) {};\r\n\tTitanium.Geolocation.addEventListener('location', locationCallback);\r\n\tlocationAdded = true;\r\n}\r\n\r\n_window.open();\r\n{code}\r\n\r\nExpected Result:\r\n\r\nNo runtime disposed console logs.\r\n\r\nActual Result:\r\n\r\nConstant stream of runtime disposed console logs.", "attachment": [ { "id": "26745", "filename": "1.8.2 sigsegv_log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-30T14:45:37.000+0000", "size": 26742, "mimeType": "text/plain" }, { "id": "26746", "filename": "2.0.0 runtime-disposed_log.txt", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-30T14:45:37.000+0000", "size": 35950, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: module events not removed on app close i.e., Geolocation heading", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK: 1.8.2, 2.0.0.v20120330103228\r\nAndroid: V8, Rhino\r\nStudio: 2.0.0.201203291340\r\nOS: Snow Leopard\r\nDevices Tested: Nexus S 2.3.6, Galaxy Tab 10.1 3.2", "comment": { "comments": [ { "id": "421650", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed, any problems please open a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-09T17:00:56.000+0000", "updated": "2017-06-09T17:00:56.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }