JNI ERROR (app bug): local reference table overflow (max=512)

You must Login before you can answer or comment on any questions.

Does anyone had this error on launching their app on android emulator and/or does anyone know how to fix this?

Thank you.

[ERROR][dalvikvm( 1746)] JNI ERROR (app bug): local reference table overflow (max=512)
[WARN][dalvikvm( 1746)] JNI local reference table (0x2a29b350) dump:
[WARN][dalvikvm( 1746)]   Last 10 entries (of 512):
[WARN][dalvikvm( 1746)]       511: 0x417b3d20 org.appcelerator.kroll.KrollDict
[WARN][dalvikvm( 1746)]       510: 0x4178e4f0 org.appcelerator.titanium.proxy.ActivityProxy
[WARN][dalvikvm( 1746)]       509: 0x417c3960 ti.modules.titanium.ui.TabGroupProxy
[WARN][dalvikvm( 1746)]       508: 0x41ab9f40 org.appcelerator.titanium.proxy.ActionBarProxy
[WARN][dalvikvm( 1746)]       507: 0x417a7820 ti.modules.titanium.ui.TabProxy
[WARN][dalvikvm( 1746)]       506: 0x4178e4f0 org.appcelerator.titanium.proxy.ActivityProxy
[WARN][dalvikvm( 1746)]       505: 0x417c3960 ti.modules.titanium.ui.TabGroupProxy
[WARN][dalvikvm( 1746)]       504: 0x41ab9f40 org.appcelerator.titanium.proxy.ActionBarProxy
[WARN][dalvikvm( 1746)]       503: 0x417a7820 ti.modules.titanium.ui.TabProxy
[WARN][dalvikvm( 1746)]       502: 0x4178e4f0 org.appcelerator.titanium.proxy.ActivityProxy
[WARN][dalvikvm( 1746)]   Summary:
[WARN][dalvikvm( 1746)]         1 of java.lang.String
[WARN][dalvikvm( 1746)]         1 of java.util.HashMap$KeySet
[WARN][dalvikvm( 1746)]       127 of ti.modules.titanium.ui.TabGroupProxy (1 unique instances)
[WARN][dalvikvm( 1746)]         2 of org.appcelerator.kroll.KrollDict (2 unique instances)
[WARN][dalvikvm( 1746)]       127 of org.appcelerator.titanium.proxy.ActivityProxy (1 unique instances)
[WARN][dalvikvm( 1746)]       127 of ti.modules.titanium.ui.TabProxy (1 unique instances)
[WARN][dalvikvm( 1746)]         2 of org.appcelerator.kroll.runtime.v8.V8Object (2 unique instances)
[WARN][dalvikvm( 1746)]       125 of org.appcelerator.titanium.proxy.ActionBarProxy (1 unique instances)
[ERROR][dalvikvm( 1746)] Failed adding to JNI local ref table (has 512 entries)
[INFO][dalvikvm( 1746)] "KrollRuntimeThread" prio=5 tid=12 RUNNABLE
[INFO][dalvikvm( 1746)]   | group="main" sCount=0 dsCount=0 obj=0x417dd180 self=0x2a054000
[INFO][dalvikvm( 1746)]   | sysTid=1768 nice=0 sched=0/0 cgrp=apps handle=704993600
[INFO][dalvikvm( 1746)]   | state=R schedstat=( 3694042358 1815126192 5037 ) utm=337 stm=32 core=0
[INFO][dalvikvm( 1746)]   at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[INFO][dalvikvm( 1746)]   at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(
[INFO][dalvikvm( 1746)]   at org.appcelerator.kroll.KrollProxy.doFireEvent(
[INFO][dalvikvm( 1746)]   at org.appcelerator.kroll.KrollProxy.handleMessage(
[INFO][dalvikvm( 1746)]   at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(
[INFO][dalvikvm( 1746)]   at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(
[INFO][dalvikvm( 1746)]   at ti.modules.titanium.ui.TabGroupProxy.handleMessage(
[INFO][dalvikvm( 1746)]   at android.os.Handler.dispatchMessage(
[INFO][dalvikvm( 1746)]   at android.os.Looper.loop(
[INFO][dalvikvm( 1746)]   at org.appcelerator.kroll.KrollRuntime$
[INFO][dalvikvm( 1746)] 
[ERROR][dalvikvm( 1746)] VM aborting
F/libc    ( 1746): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 1768 (KrollRuntimeThr)

Application type: mobile Titanium SDK version: 3.1.1 (06/15/13 16:09 f7592c1) Platform & version: Android 4.3 and 2.3.3 Device: Android emulator Host Operating System: OSX 10.8.4 Mountain Lion Titanium Studio: build:

— asked 2 years ago by Mihai Marginean
1 Comment
  • Hello Mihai,

    I'm sure you'll agree, that your question doesn't give us much to work with. I strongly suggest you have a look at the guidelines to follow when asking a question.

    Also, please include some code detailing what you are trying to achieve. This will give everyone a better understanding of the problem you are facing.

    — commented 2 years ago by Christian Brousseau

2 Answers

Although your question is 12 months old, I found this page because of the same error, and I figured it out.

I got the same error because I was sending too much information to the console.log() function. (same as the .info() function). It couldn't handle the data.


I solved this problem. In my case the problem was generated by improper cleaning of tableView data. I had 19 TI.UI.TableViewRow created with a code like this:

function createData(){
var data = [];
    var row = Ti.UI.createTableViewRow({
        selectedBackgroundColor : '#5E5959',
        height : '60dp',
        className : 'datarow',
        clickName : 'Park - Group',
        selectedColor : '#fff',
        backgroundColor : bgcolor,
    var photo = Ti.UI.createView({
        backgroundImage : 'icons/park.png',
        left: '10dp',
        width: '40dp',
        height: '40dp',
    var user = Ti.UI.createLabel({
        font: {
            fontSize: '20dp',
        left: '85dp',
        top: '9dp',
        height: '40dp',
        right: '10dp',
        text:'Park - Group'
    //repeat that 19 times for different rows
    return data;
than i had a tableView created like this:
var tableView = Titanium.UI.createTableView({
and I tried to clean tableView data like this:
then I changed the cleaning of the tableView to look like this:
for (var i =[0].rows.length-1; i >= 0; i--) {
Problem solved.

PS. The error I received at first looked like the one in my first post but in the logs there was also something like this:

[ERROR][dalvikvm(18879)] JNI ERROR (app bug): local reference table overflow (max=512)
[WARN][dalvikvm(18879)] JNI local reference table (0x2a262df8) dump:
[WARN][dalvikvm(18879)]   Last 10 entries (of 512):
[WARN][dalvikvm(18879)]       511: 0x41e68748 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       510: 0x41e652e8 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       509: 0x41e61ef0 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       508: 0x41e5eb00 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       507: 0x41e5b708 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       506: 0x41e58318 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       505: 0x41e54f10 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       504: 0x41e51b08 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       503: 0x41e4e6d0 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]       502: 0x41e4b2d0 ti.modules.titanium.ui.TableViewRowProxy
[WARN][dalvikvm(18879)]   Summary:
[WARN][dalvikvm(18879)]         1 of java.lang.Object[]
[WARN][dalvikvm(18879)]         1 of ti.modules.titanium.ui.TableViewRowProxy[] (19 elements)
[WARN][dalvikvm(18879)]         8 of ti.modules.titanium.ui.LabelProxy (8 unique instances)
[WARN][dalvikvm(18879)]         1 of org.appcelerator.kroll.runtime.v8.V8Function
[WARN][dalvikvm(18879)]       493 of ti.modules.titanium.ui.TableViewRowProxy (19 unique instances)
[WARN][dalvikvm(18879)]         8 of ti.modules.titanium.ui.ViewProxy (8 unique instances)
[ERROR][dalvikvm(18879)] Failed adding to JNI local ref table (has 512 entries)

Your Answer

Think you can help? Login to answer this question!