title: how can I read the content of the local reference table in JNI?
body: <p>I am getting a JNI error of the type:</p>
  
  <pre><code>JNI ERROR (app bug): local reference table overflow (max=512)
  </code></pre>
  
  <p>Now, I know the reason why it happens and how to solve it but I am having some trouble finding where (CheckJNI is activated and hasn't helped me much). In order to debug this I would like to print the content of the reference table, in particular it would be quite useful to get the same message I get when the app crashes:</p>
  
  <pre><code>JNI local reference table (0x6456b0e8) dump:
  07-30 11:16:12.275: W/dalvikvm(14277):   Last 10 entries (of 512):
  [...]
  Summary:
  [...]
  </code></pre>
  
  <p>I haven't found a way to solve this, and the only close solution I have seen (<a href="https://stackoverflow.com/questions/13283649/android-jni-local-reference-table-dump-current-state">Android JNI local reference table, dump current state</a>) is useless now, as the class <em>VMDebug</em> is no longer in <code>dalvik.system</code>. Also, <code>android.os.Debug</code> (this class was referred in the old API of <em>VMDebug</em>) has no function to dump this table.</p>
  
  <p>Is there a way to force the error message to appear? Or get something similar?</p>