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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -