You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Run unit tests with -Xcheck:jni.
What is the expected output? What do you see instead?
Expected: no warnings.
Observed: A bunch of "WARNING in native method: JNI call made with exception
pending" log entries.
What version of the product are you using? On what operating system?
JNLua 1.0.4, Java 1.7.0_55, Windows 8.1.
Please provide any additional information below.
See [1] for a list of methods that may be called with pending exceptions. In
particular, SetLongField (indirectly) called from [2] and NewObject called from
[3] are not in that list. However, they are called in case of exceptions before
the exception is cleared with ExceptionClear [4]. Some reordering of these
calls (ExceptionClear as the first statement in the if branch, setluathread
after it and in the (new) else branch) avoids these warnings.
Note: since they are only warnings I am not quite sure if/how they influence
program logic.
[1] http://developer.android.com/training/articles/perf-jni.html#exceptions
[2]
https://code.google.com/p/jnlua/source/browse/trunk/jnlua/src/main/c/jnlua.c#217
8
[3]
https://code.google.com/p/jnlua/source/browse/trunk/jnlua/src/main/c/jnlua.c#218
7
[4]
https://code.google.com/p/jnlua/source/browse/trunk/jnlua/src/main/c/jnlua.c#219
3
Original issue reported on code.google.com by fnuecke on 20 Aug 2014 at 12:18
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
fnuecke
on 20 Aug 2014 at 12:18The text was updated successfully, but these errors were encountered: