Android Exception: This thread does not have a read lock.

We are receiving a number of instances of the exception below from our Android app that utilizes PDFViewCtrl. Can you comment on why this would be occurring and what we should be doing to avoid this error.



java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(
... 2 more
Caused by: Exception: 
 Message: This thread does not have a read lock.
 Conditional expression: m_lock_count.get() && m_lock_count->m_read_count
 Filename   : RecursiveSharedMutex.cpp
 Function   : unlock_shared
 Linenumber : 91
 Error code : 0

at pdftron.PDF.PDFViewCtrl.DocUnlockRead(Native Method)
at pdftron.PDF.PDFViewCtrl.docUnlockRead(SourceFile:3462)
at pdftron.PDF.Tools.ToolManager.onSingleTapConfirmed(
at pdftron.PDF.PDFViewCtrl.onSingleTapConfirmed(SourceFile:2389)
at pdftron.PDF.PDFViewCtrl$10.onSingleTapConfirmed(SourceFile:6706)
at android.view.GestureDetector$GestureHandler.handleMessage(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
... 5 more

This is an expected error when DocUnlock[Read] on a thread that never acquired a lock. To avoid the error, only call DocUnlockRead after calling DocLockRead.

The following post provides more info.!topic/pdfnet-sdk/pDZsqrjCEdg