Open apismensky opened 1 year ago
The exception appears to have happened deep down in Tesseract native code. Is your application running in single thread or multi-thread? Have you tried using Tesseract1
class?
The app is running in multi-thread. I haven't tried Tesseract1 class, but I will and update here.
After switching to Tesseract1 the application was able to serve around 50 requests, and then crashed the JVM with the following:
libc++abi: terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
You may want to dispose of and start a new instance after so many OCR operations because of memory leaks in native code.
A SImple springboot app with tess4j (5.4.0). One controller method to upload the image for OCR It processes 3 images successfully and crashes on the 4th with the threaddump:
App error: