[TIMOB-8289] Android: Adding too many views with views to a window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-06-04T19:35:45.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Pete Berry |
Assignee | Josh Roesslein |
Created | 2012-03-23T11:20:35.000+0000 |
Updated | 2017-03-22T20:36:41.000+0000 |
Description
The example that follows creates a given number of rows and columns. Each column is a simple view with a label. Each row contains the column views.
When run with V8 the errors "Excessive JNI global references (2001)" followed by "VM aborting" are produced.
This example works with the Rhino runtime. Even changing the RowCount to 150 works with Rhino, albeit slow ;-)
With V8, this example does work if RowCount is set to 30 or less.
var win1 = Ti.UI.createWindow({url:'TheWindow.js'});
win1.open();
var RowCount=35;
var ColCount=25;
var RowHeight=21;
var ColWidth=50;
var TheLabel;
var TheRow;
var TheCol;
for (var Y=1; Y<=RowCount; Y++)
{
TheRow=Ti.UI.createView({top:((Y-1)*RowHeight),
height:RowHeight});
for (var X=1; X<=ColCount; X++)
{
TheCol=Ti.UI.createView({left:((X-1)*ColWidth),
width:ColWidth,
backgroundColor:'white'});
TheLabel=Ti.UI.createLabel({text:Y + '.' + X});
TheCol.add(TheLabel);
TheRow.add(TheCol);
}
Ti.UI.currentWindow.add(TheRow);
}
This appears to be caused by the same bug as TIMOB-9322.
Closing as a duplicate. Should be resolved when the PR for TIMOB-9322 lands.
Confirmed fixed! Thank you, Pete
Closing ticket as duplicate of the ticket that is mentioned above.