[AC-2713] Android, Backbone and Failed adding to JNI local ref table (has 512 entries) error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-04-05T19:28:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Brian OConnor |
Assignee | Mauro Parra-Miranda |
Created | 2013-02-14T16:39:16.000+0000 |
Updated | 2016-03-08T07:41:49.000+0000 |
Description
Some simple backbone code is causing the error "Failed adding to JNI local ref table (has 512 entries) error".
var Note = Backbone.Model.extend({});
var NoteCollection = Backbone.Collection.extend({
model: Note
});
var noteCollection = new NoteCollection();
noteCollection.on('reset', function() {
alert(noteCollection);
});
setTimeout(function() {
noteCollection.reset([{foo: 'bar'}]);
}, 5000);
Error occurs with a regular project including backbone.js and also occurs using Alloy
I have simplified the test case to: var Note = Backbone.Model.extend({}); var NoteCollection = Backbone.Collection.extend({ model: Note }); var noteCollection = new NoteCollection(); noteCollection.add([{foo: 'bar'}]); alert(noteCollection);
Brian, When reporting bugs please make sure that the test case is reproducible. As in it should be able to be simply copy and pasted into an app.js and run. Also be sure to provide important headers with information like: problem, steps to reproduce, expected behavior, actual behavior and of course, the test case. Please refer to: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report on how a correct bug report should be written. Regards, Carter