Um... "ReferenceTable overflow (max=512) "

Ok, so I took the Writing Prompts app we've put out for iOS and tried to build it under Android and install it on the emulator.

And then I get....

W/dalvikvm( 414): ReferenceTable overflow (max=512)
W/dalvikvm( 414): Last 10 entries in JNI local reference table:
W/dalvikvm( 414): 502: 0x44f51d90 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 503: 0x44f51db0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 504: 0x44f4f378 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 505: 0x44f4f398 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 506: 0x44f4e4b0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 507: 0x44f4e4d0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 508: 0x44f4d140 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 509: 0x44f4d160 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 510: 0x44f4a838 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): 511: 0x44f4a858 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm( 414): JNI local reference table summary (512 entries):
W/dalvikvm( 414): 3 of Ljava/lang/Class; 164B (3 unique)
W/dalvikvm( 414): 506 of Ljava/lang/String; 28B (506 unique)
W/dalvikvm( 414): 1 of [Ljava/lang/String; 2252B
W/dalvikvm( 414): 2 of [B 227604B (2 unique)
W/dalvikvm( 414): Memory held directly by tracked refs is 472120 bytes
E/dalvikvm( 414): Failed adding to JNI local ref table (has 512 entries)
I/dalvikvm( 414): "GLThread 10" prio=5 tid=9 RUNNABLE
I/dalvikvm( 414): | group="main" sCount=0 dsCount=0 s=N obj=0x44fa9458 self=0x11d888
I/dalvikvm( 414): | sysTid=422 nice=0 sched=0/0 cgrp=default handle=1199752
I/dalvikvm( 414): | schedstat=( 946832109 900508076 764 )
I/dalvikvm( 414): at android.content.res.AssetManager.list(Native Method)
I/dalvikvm( 414): at com.ansca.corona.CoronaBridge.getRawAssetExists((null):-1)
I/dalvikvm( 414): at com.ansca.corona.CoronaBridge.callGetRawAssetExists((null):-1)
I/dalvikvm( 414): at com.ansca.corona.CoronaPortal.nativeResize(Native Method)
I/dalvikvm( 414): at com.ansca.corona.CoronaPortal.resize((null):-1)
I/dalvikvm( 414): at com.ansca.corona.events.ResizeEvent.Send((null):-1)
I/dalvikvm( 414): at com.ansca.corona.events.EventManager.sendEvents((null):-1)
I/dalvikvm( 414): at com.ansca.corona.Controller.onDrawFrame((null):-1)
I/dalvikvm( 414): at com.ansca.corona.CoronaRenderer.onDrawFrame((null):-1)
I/dalvikvm( 414): at android.opengl.derived.SwapGLSurfaceView$GLThread.guardedRun((null):-1)
I/dalvikvm( 414): at android.opengl.derived.SwapGLSurfaceView$GLThread.run((null):-1)
I/dalvikvm( 414):
E/dalvikvm( 414): VM aborting

And I don't have the first clue what that means. ;-)

I had the same issue. I was able to fix it. Three things I did (not sure which one(s) actually fixed it):

Removed subdirectories in the application folder
Removed build files (*.app/*.apk) in the application folder
Made sure I compiled the file to a different folder than the application folder

Hope this helps
-Steven

Hi kennwags,

On Android this problem can happen when you load too many images in the startup phase of the application. Try to delay their loading until you really need to display them (lazy loading). This is how I fixed this problem in game developed previously.

Actually I have currently the same error, but not because of many images loaded, but rather because of parsing a big number of text files during the start of the application. So it appears to be a more general problem. I haven't tested lazy loading for this case yet as I'm focusing on iOS at the moment (which doesn't seem to have this kind of problem at all, even on iPhone 3G).

Hope that helps.

Thomas

Thanks guys. I've got sub directories going on, so I think I'm going to start there. I'm loading pretty lazily as is so hopefully that's the solution. I'm opening it up to play again right now and will post back with results. :-)

views:1672 update:2011/10/9 9:57:41
corona forums © 2003-2011