0

I am experiencing a JNI ERROR (app bug) local reference table overflow (max=512) after a couple of minutes of running my android app built with rhomobile.

The output last 10 entries of that table are all Json rpc strings:

java.lang.String "{"jsonrpc": "2.0... (43 chars)

or sometimes 47 chars.

I have no clue were this error is coming from, so a good start would be to see the whole string objects (so the ... part).

Can this be achieved and if yes, how?

Edit:

before the overflow I am getting the following message at intervals

art Attempt to remove local handle scope entry from IRT, ignoring

How can I find out which local handle was not removed?

Heribert
  • 613
  • 1
  • 9
  • 27
  • search for "local reference table overflow" or "DeleteLocalRef". I remember I posted http://stackoverflow.com/questions/12088207/jni-table-overflow-even-after-deletelocalref/14021142#14021142 and http://stackoverflow.com/a/14872927/755804 These posts will provide some clues to fighting that bug, but you probably do not control the code that needs be fixed. (But if it's open source...) – 18446744073709551615 Sep 02 '15 at 08:37
  • Thanks, but I already read those. As you said, it comes from code that I do not control. My thought is that if I can see what's inside these strings I can see what is causing this overflow. So is there a way to expand those "..."? – Heribert Sep 02 '15 at 11:02
  • 1
    PushLocalFrame() / PopLocalFrame() ? – 18446744073709551615 Sep 02 '15 at 12:15
  • Does your code call a Java function that runs for minutes? If yes, you will probably have to refactor it and let Java call Java. It is possible to keep native structures between native calls. – 18446744073709551615 Sep 02 '15 at 12:18
  • At least not that I know of. Possibly rhodes does that in the background. Even if I exclude my Java native extension (so only use js), the error occurs :( I am really lost on this bug. Anyways thank you for your ideas – Heribert Sep 02 '15 at 12:35

1 Answers1

0

Turns out that the error occured from rhomobiles API for querying the battery status, enabling barcode scanning and capturing key events.

I solved the problems on my Android 4.0.4 device by upgrading to rhodes 5.2.2. However, the upgrade did not help on my other device running Android 5. As an answer to my post in the motorola rhodes discussions, I was told that they are working on the problem for the 5.3 rhodes release, so I hope it will be fixed in the future.

Heribert
  • 613
  • 1
  • 9
  • 27