PDFWorkerError related to exclusive lock in RecursiveSharedMutex.cpp on Emscripten platform

Product: Apryse Webviewer

Product Version: 10.9.0

Please give a brief summary of your issue:
PDFWorkerError related to exclusive lock in RecursiveSharedMutex.cpp on Emscripten platform

Please describe your issue and provide steps to reproduce it:
I am encountering a PDFWorkerError in my React application when calling applyRedactions function using annotationManager(Refer attached images), which involves an exclusive lock issue in the unlock function of RecursiveSharedMutex.cpp . The error message is:
{
“message”: “Exception: \n\t Message: This thread does not have an exclusive lock.\n\t Conditional expression: m_lock_count.get() && m_lock_count->m_write_count\n\t Version : 10.9.0-ef7a5d39db\n\t Platform : Emscripten\n\t Architecture : Emscripten\n\t Filename : RecursiveSharedMutex.cpp\n\t Function : unlock\n\t Linenumber : 77\n”,
“type”: “PDFWorkerError”
}


1 Like

Thanks for connecting today to resolve this issue.

We were able to change the backend type to WASM and resolve this.

WebViewer({
  // ...
  disableObjectURLBlobs: true,
  backendType: WebViewer.BackendTypes.WASM,
  // ...
}

The issue was it worked locally but when deployed to an IIS server then there is some configuration of the server that prevents the wasm threads from working as expected.

1 Like