LiquidCore: JNI ERROR (app bug): global reference table overflow (max=51200)

My team is currently trying to develop Android App with nonWebView JS execution. We’ve decided to try out your library and all seems fine, aside one frequent error, that crush our app. Our project require of existing multiple JSContext’s for a long period of time, so we hold it by executing simple JS: setInterval(function() {}, 1000); Here is stack trace for the crush:

art/runtime/indirect_reference_table.cc:128] JNI ERROR (app bug): global reference table overflow (max=51200)
art/runtime/indirect_reference_table.cc:128] global reference table dump:
art/runtime/indirect_reference_table.cc:128]   Last 10 entries (of 51200):
art/runtime/indirect_reference_table.cc:128]     51199: 0x1447d0f0 org.liquidplayer.javascript.JSValue$19
art/runtime/indirect_reference_table.cc:128]     51198: 0x12f9c060 org.liquidplayer.node.Process$ProcessContext
art/runtime/indirect_reference_table.cc:128]     51197: 0x1447d0b0 org.liquidplayer.javascript.JSValue$19
art/runtime/indirect_reference_table.cc:128]     51196: 0x12f9c060 org.liquidplayer.node.Process$ProcessContext
art/runtime/indirect_reference_table.cc:128]     51195: 0x1447d0a0 org.liquidplayer.javascript.JSValue$19
art/runtime/indirect_reference_table.cc:128]     51194: 0x131d7fb0 org.liquidplayer.node.Process$ProcessContext
art/runtime/indirect_reference_table.cc:128]     51193: 0x1447d060 org.liquidplayer.javascript.JSValue$19
art/runtime/indirect_reference_table.cc:128]     51192: 0x12c29510 org.liquidplayer.node.Process$ProcessContext
art/runtime/indirect_reference_table.cc:128]     51191: 0x1447d050 org.liquidplayer.javascript.JSValue$19
art/runtime/indirect_reference_table.cc:128]     51190: 0x12f9c060 org.liquidplayer.node.Process$ProcessContext
art/runtime/indirect_reference_table.cc:128]   Summary:
art/runtime/indirect_reference_table.cc:128]     25212 of org.liquidplayer.javascript.JSValue$19 (25212 unique instances)
art/runtime/indirect_reference_table.cc:128]     25215 of org.liquidplayer.node.Process$ProcessContext (3 unique instances)

Obviously, the proble is with the amount of JSValues and the fact that each JSValue contains a reference of JSContext, 3 other JSContext references is we create and hold with our code. Can you point us in the direction of the problem and how to solve it? Is there a way to gc this objects?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments