java - How to find errors in JNI -
updating legacy code in our software , have had alter of calls through jni. however, after running few time program consistently breaks in same place in c++ access violation error, transfers java variable has been set null, cannot happen within java (there no way set variable null without cleaning class containing it) , jni call breaks not touch portion of code.
each jni call checks exceptions after returns , code full of assert(*someitem* != null);
after retrieving each jclass , methodid , instantiating new java classes, none of them fail , such can assume fault happening somewhere in native code , picked when returning java.
my question is, how can find problem occurring? have used -xcheck:jni shows nothing, -verbose:jni , -verbose:gc suggested similar question, no avail.
sorry no sscce possible due nature of problem
for finds post , has same issue i've fixed it.
as turned out using wrong methodid in call. reusing variable holds methodids , @ time in question holding constructor method valid object calling on, lead no errors or exceptions crucial part of program missed.
hope helps others if have terrible problem.
Comments
Post a Comment