[AC-2846] Cannot read property '0' of undefined in events.js
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-02-17T17:03:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | 1.8.2, 2.0.0, android, events |
Reporter | Justin Toth |
Assignee | Mauro Parra-Miranda |
Created | 2012-02-16T08:09:32.000+0000 |
Updated | 2016-03-08T07:47:47.000+0000 |
Description
Ever since upgrading to the latest CI builds in 1.8 and 2.0, I've been running into this error:
E/TiJSError( 800): (main) [7511,46846] ----- Titanium Javascript Runtime Error -----
E/TiJSError( 800): (main) [1,46847] - In ti:/events.js:241,23
E/TiJSError( 800): (main) [0,46847] - Message: Uncaught TypeError: Cannot read property '0' of undefined
E/TiJSError( 800): (main) [1,46848] - Source: if (list.listener[i] === listener ||
E/V8Exception( 800): Exception occurred at ti:/events.js:241: Uncaught TypeError: Cannot read property '0' of undefined
It 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.)
I 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.
[https://github.com/appcelerator/titanium_mobile/pull/1443]
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.
User confirmed that was failing because of the back behavior on light and heavy windows.
Invalid issue.