[TIMOB-1794] Android: Mixed type arrays assigned to proxies throw ClassCast exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M06 |
Components | Android |
Labels | android, defect, release-1.6.0, rplist |
Reporter | Don Thorp |
Assignee | Bill Dawson |
Created | 2011-04-15T03:02:35.000+0000 |
Updated | 2011-04-17T01:57:11.000+0000 |
Description
See http://developer.appcelerator.com/helpdesk/view/42511">Helpdesk 42511
var win = Titanium.UI.createWindow();
var foo = ["foo", "bar",999];
// uncommenting this fixes it, because its no longer mixed type
// foo = ["foo", "bar","999"];
// this also works
// foo = [111,222,3333];
// exception doesnt happen until the array is assigned to a proxy object
win.foo = foo;
alert(win.foo);
win.open();
Wondering if this was a blocked issue until proxy assignment was completed.
As discussed with Don, the following code also produces an exception in 1.4.3 (21Nov) but not in 1.5.X (17Dec).
The exception output can be found https://gist.github.com/751731">here
Not sure why this is still open if it's in 1.5.1 please test and close if not valid.
(from [9e588f2c63514f614a78c32f37c14071a2a2d1a4]) the kroll invocation scope needs to pull from the current thread's ti context top level scope instead of the "start" which is essentially the
same as the "thisObject". added a kroll test, this fixes "constructor"
for Array and other types [#1794 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/9e588f2c63514f614a78c32f37c14071a2a2d1a4"> https://github.com/appcelerator/titanium_mobile/commit/9e588f2c6351...
Verified crash is no longer occurring with test case from Hal.