{ "id": "86569", "key": "AC-2846", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-02-17T17:03:32.000+0000", "created": "2012-02-16T08:09:32.000+0000", "labels": [ "1.8.2", "2.0.0", "android", "events" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:47:47.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": "Ever since upgrading to the latest CI builds in 1.8 and 2.0, I've been running into this error:\r\n\r\n{code}\r\nE/TiJSError( 800): (main) [7511,46846] ----- Titanium Javascript Runtime Error -----\r\nE/TiJSError( 800): (main) [1,46847] - In ti:/events.js:241,23\r\nE/TiJSError( 800): (main) [0,46847] - Message: Uncaught TypeError: Cannot read property '0' of undefined\r\nE/TiJSError( 800): (main) [1,46848] - Source: \t\t\t\t\tif (list.listener[i] === listener ||\r\nE/V8Exception( 800): Exception occurred at ti:/events.js:241: Uncaught TypeError: Cannot read property '0' of undefined\r\n{code}\r\n\r\nIt has been difficult to reproduce it since it doesn't happen very often so I can't give reproduction code, but it seems to be related to either closing a window or removing an event listener (probably the latter.)\r\n\r\nI created a pull request to add a null check around this code, which should prevent the issue. Forgive me if I did it wrong, it was my first pull request to Titanium.\r\n\r\n[https://github.com/appcelerator/titanium_mobile/pull/1443]", "attachment": [], "flagged": false, "summary": "Cannot read property '0' of undefined in events.js", "creator": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Ti 1.8.2.v20120215170143, 2.0.0.v20120215111634\r\nAndroid 2.2, 3.2", "comment": { "comments": [ { "id": "183678", "author": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "body": "This can be closed, the issue was with my management of windows, as I wasn't aware that android:back doesn't fire for non-heavyweight windows.", "updateAuthor": { "name": "jtoth", "key": "jtoth", "displayName": "Justin Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-17T14:18:57.000+0000", "updated": "2012-02-17T14:18:57.000+0000" }, { "id": "183712", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "User confirmed that was failing because of the back behavior on light and heavy windows. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-02-17T17:03:32.000+0000", "updated": "2012-02-17T17:03:32.000+0000" }, { "id": "280989", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:18:33.000+0000", "updated": "2013-11-24T22:18:33.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }