Open VaniKulkarni opened 3 years ago
@charlesw could you please revert if the exception comes on tesseract 3.3.0?
it is a production issue for our clients that are on windows server 2008 ( old machines) and we are unable to reproduce it on any of our environments
Sorry I'm not 100% sure what your asking.
From reading your issue it sounds like you're attempting to upgrade to the latest version the library however it's not working in prod. If so in this case I would be rolling back the change until you can resolve it. However that's very much in your court.
As for the exception you mentioned initialization errors are normally due to not having the correct version of VS runtime installed and that's what I'd check first. Version 4.1 (latest nuget release) is compiled with AVX and other instruction sets turned off so that shouldn't be the issue.
Hope that helps.
On Fri, 13 Aug 2021, 15:47 Vani Kulkarni, @.***> wrote:
@charlesw https://github.com/charlesw could you please revert if the exception comes on tesseract 3.3.0?
it is a production issue for our clients that are on windows server 2008 ( old machines) and we are unable to reproduce it on any of our environments
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/charlesw/tesseract/issues/568#issuecomment-898206870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7HSD4IWFL75OVJHSZJUTT4SWYRANCNFSM5CBKB5OQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Sorry I'm not 100% sure what your asking. From reading your issue it sounds like you're attempting to upgrade to the latest version the library however it's not working in prod. If so in this case I would be rolling back the change until you can resolve it. However that's very much in your court. As for the exception you mentioned initialization errors are normally due to not having the correct version of VS runtime installed and that's what I'd check first. Version 4.1 (latest nuget release) is compiled with AVX and other instruction sets turned off so that shouldn't be the issue. Hope that helps. … On Fri, 13 Aug 2021, 15:47 Vani Kulkarni, @.***> wrote: @charlesw https://github.com/charlesw could you please revert if the exception comes on tesseract 3.3.0? it is a production issue for our clients that are on windows server 2008 ( old machines) and we are unable to reproduce it on any of our environments — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#568 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7HSD4IWFL75OVJHSZJUTT4SWYRANCNFSM5CBKB5OQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
This definitely helps @charlesw We are using tesseract 4.1 latest nuget pkg in .net core 2.1 on windows server 2008 ( old machine but has AVX processors) We have confirmed that the VC++ redistributable package 2015-2019 latest version is installed on the machine Still we get the issue intermittently ( but frequently too) Surprisingly we see from our product log that sometimes OCR runs as expected
Looking at the stack trace , do you think of any other option to check? PS: we are running tesseract OCR for the first time for our client
If it's an intermediate issue then that screams a threading issue to me. Tesseract isn't threadsafe and a single instance can't be used concurrently. I noticed from your stack trace that your using autofac so I'd be checking your container configuration.
If it's an intermediate issue then that screams a threading issue to me. Tesseract isn't threadsafe and a single instance can't be used concurrently. I noticed from your stack trace that your using autofac so I'd be checking your container configuration.
@charlesw as per release notes for tesseract 3.1 Tesseract is now thread-safe (multiple instances can be used in parallel in multiple threads.) we are using it in our load testing with 8 concurrent users and have not seen any problem with that.
however, in this particular scenario, we checked the container settings, it is creating 1 new instance of TesseractEngnine per web API call and using it to do OCR sequentially one image at a time.
Hence threading wont be an issue here, what do you think?
Or it this something that has to do with windows server 2008 OS ?
Your correct in that multiple separate instances of tesseract can be used concurrently. I had a closer look at the library loading code and there may be an issue if multiple instances are created concurrently in that library initialization code isn't protected by a lock. However it's probably not likely. It also doesn't really match the behaviour you've described.
Given that you've stated it has worked occasionally i don't think its a vs runtime problem or AVX instruction problem as I would expect that to fail every time. So I'm a little stumped 🙁
I'll have a closer look at the potential library loading issue when I have more time. However doubt that it'd help here.
On Mon, 16 Aug 2021, 15:56 Vani Kulkarni, @.***> wrote:
If it's an intermediate issue then that screams a threading issue to me. Tesseract isn't threadsafe and a single instance can't be used concurrently. I noticed from your stack trace that your using autofac so I'd be checking your container configuration.
@charlesw https://github.com/charlesw as per release notes for tesseract 3.1 Tesseract is now thread-safe (multiple instances can be used in parallel in multiple threads.) we are using it in our load testing with 8 concurrent users and have not seen any problem with that.
however, in this particular scenario, we checked the container settings, it is creating 1 new instance of TesseractEngnine per web API call and using it to do OCR sequentially one image at a time. Hence threading wont be an issue here, what do you think? Or it this something that has to do with windows server 2008 OS ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/charlesw/tesseract/issues/568#issuecomment-899243318, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB7HSHYVKMXKTLPIUPWGTTT5CSCRANCNFSM5CBKB5OQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
@charlesw
@peters
Any quick help is much appreciated
we get unahndled excpetion on "InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiInit" while instantiating tesseract engine
TesseractEngine.Initialise
The stack trace looks similar to link https://github.com/charlesw/tesseract/issues/497
Was this an issue with old version of tesseract also i.e. tesseract.dll 3.3.0 and liblept1753 We want to go back to this old version for our legacy clients
If I understand correctly, the issue is environment specific and because of CPUs that don't support AVX. The only fix is to use C++ Tesseract.dll compiled without optimizations like C++ Tesseract.dll compiled without optimizations
https://github.com/charlesw/tesseract/pull/499