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
If a C++ call is made to a Java method whose reference is obtained by getMethod with local_ref arguments types, and that call throws an exception, it causes the process to crash. fbjni does not prevent specifying Java methods descriptors arguments in terms of local_ref.
This will only happen in debug builds because the crash is caused by a call to verifyReference in local_ref dtor, that is made inside an assert statement. verifyReference calls GetObjectRefType which is not allowed when there's a pending Java exception.
For release builds there is no issue because the actual JNI call to destroy a reference (DeleteLocalRef) is safe to call when there is a pending Java exception.
Issue description
If a C++ call is made to a Java method whose reference is obtained by getMethod with local_ref arguments types, and that call throws an exception, it causes the process to crash. fbjni does not prevent specifying Java methods descriptors arguments in terms of local_ref.
This will only happen in debug builds because the crash is caused by a call to verifyReference in local_ref dtor, that is made inside an assert statement. verifyReference calls GetObjectRefType which is not allowed when there's a pending Java exception.
For release builds there is no issue because the actual JNI call to destroy a reference (DeleteLocalRef) is safe to call when there is a pending Java exception.
Code example
Now a call such as this will crash:
The text was updated successfully, but these errors were encountered: