I wonder if I will have more luck with this post than my last JNI one...
I am getting a failure code (-1) from MonitorEnter(). It doesn't happen every time; most of my calls to MonitorEnter() go fine. But one particular call always seems to go wrong. The call in question happens after I have already called Throw() in the same JNI call.
I am wondering if there is something about calling Throw() that makes MonitorEnter() fail. As far as I can see, the JNI docs say nothing about it, but then they don't say much about Throw() at all!
Anyone know anything about this?
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Joined: Oct 30, 2001
Another one where I found the answer myself. Oh well.
FTR here it is...
The JNI spec (but not the documentation for Throw(), unfortunately) says: -
When there is a pending exception, the only JNI functions that are safe to call are ExceptionOccurred(), ExceptionDescribe(), and ExceptionClear().
So I am not allowed to call MonitorEnter() after Throw(). I will have to rework my code.