title: E/dalvikvm: JNI ERROR (app bug): local reference table overflow (max=512)
body: <p>I made an app that simply read data with NFC and writes back the data after modification. After tapping card for about 100 times, the newIntent is not being registered and I'm getting this in logcat</p>
  <pre><code>01-01 05:43:46.990 6347-6376/? E/dalvikvm: JNI ERROR (app bug): local reference table overflow (max=512)
  01-01 05:43:46.990 6347-6376/? E/dalvikvm: Failed adding to JNI local ref table (has 512 entries)
  01-01 05:43:46.990 6347-6376/? E/dalvikvm: VM aborting
  01-01 05:43:46.990 6347-6376/? A/libc: Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 6376 (message)
  01-01 05:43:48.010 9950-9950/com.android.nfc E/Trace: error opening trace file: No such file or directory (2)
  01-01 05:43:49.930 9950-9971/com.android.nfc E/NFC-HCI: Could not open /system/vendor/firmware/libpn544_fw.so
  </code></pre>
  <p>Is it something related to dalvikvm? Because I'm not getting this error in my new Phone which is running android 9.1. The issue is seen only in the device running 4.2 so far.</p>
  <p>I'm using the default NFC library and there is no native code. Previously I was using the same code in a project with native code and I got the same error. Many answers here in Stack overflow suggest that it might be due to native code where we are not clearing local reference, so I tried only the NFC operation in a separate project without any other code. Still getting the same error.</p>