{ "id": "175855", "key": "TIMOB-28272", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "resolution": null, "resolutiondate": null, "created": "2020-12-03T23:49:20.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "accelerometer", "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-12-14T16:15:00.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": "*Summary:*\r\nAfter setting up an \"update\" event listener to {{Ti.Accelerometer}}, the app will spam V8 warning messages to the log after backing out of the app. The warning messages won't stop until you relaunch the app or you remove the event listener.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# Back out of the app.\r\n# Notice the log is spammed with the following warning.\r\n{{[WARN] V8Object: (main) [xx,xx] Runtime disposed, cannot fire event 'update'}}\r\n\r\n{code:javascript}\r\nfunction onAccelerometerUpdate(e) {\r\n\tTi.API.info(`@@@ (x,y,z) = (${e.x},${e.y},${e.z})`);\r\n}\r\nTi.Accelerometer.addEventListener(\"update\", onAccelerometerUpdate);\r\n{code}\r\n\r\n*Work-Around:*\r\nRemove the event listener before the app exits, which you can do via the {{Ti.App}} \"close\" event.\r\n{code:javascript}\r\nfunction onAccelerometerUpdate(e) {\r\n\tTi.API.info(`@@@ (x,y,z) = (${e.x},${e.y},${e.z})`);\r\n}\r\n\r\nTi.Accelerometer.addEventListener(\"update\", onAccelerometerUpdate);\r\n\r\nTi.App.addEventListener(\"close\", () => {\r\n\tTi.Accelerometer.removeEventListener(\"update\", onAccelerometerUpdate);\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Accelerometer spams warning messages when exiting app", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1211, "state": "closed", "name": "2020 Sprint 24", "startDate": "2020-11-23T18:12:00.000Z", "endDate": "2020-12-07T18:12:00.000Z", "completeDate": "2020-12-04T22:07:24.313Z", "originBoardId": 114 }, { "id": 1212, "state": "closed", "name": "2020 Sprint 25", "startDate": "2020-12-07T22:11:00.000Z", "endDate": "2020-12-18T22:11:00.000Z", "completeDate": "2020-12-18T16:35:34.544Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "457791", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/12318", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-12-04T03:12:44.000+0000", "updated": "2020-12-04T03:12:44.000+0000" }, { "id": "457887", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, waiting on Jenkins build.", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-12-14T15:44:43.000+0000", "updated": "2020-12-14T15:44:43.000+0000" }, { "id": "457888", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 10.0.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-12-14T16:15:00.000+0000", "updated": "2020-12-14T16:15:00.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }