Hi Charles,
For couple of days I'm trying to find out why I'm getting the unhandled exeception when calling tesseract using your wrapper (a couple of months I compiled and created nuget from your branch 321-tesseract-4 or the current develop 4.1.0-beta1) on Windows Server 2019 in my application compiled using x86 platform.
On my developper Windows 10 machine I have no issue.
On server the MVCPP 2015-2019 are installed for x86 and x64.
I can reproduce the problem using your console sample application (and targeting net 4.7.2 for example [
Exception non gérée : System.Runtime.InteropServices.SEHException: Un composant externe a levé une exception.
à InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiRecognize(HandleRef handle, HandleRef monitor)
à Tesseract.Page.Recognize()
à Tesseract.Page.GetText()
à Tesseract.ConsoleDemo.Program.Main(String[] args) dans C:\Users\ak\OneDrive\Dev\GitHub\tesseract-samples\src\Tesseract.ConsoleDemo\Program.cs:ligne 24
Remote debugging shows the following error:
Do you have any ideas what is causing it?
Looks like the native tesseract lib is raising an exception.
Maybe try running tesseract.exe, bundled alongside the DLL, on the machine
works. If it fails to then that would indicate that the problem's on
tesseract's side or how I compiled it. The hresult property of the
exception may also indicate where the issue is.
Either way I'm not to sure what I can do without being able to reproduce it
☹️
On Sat., 23 Nov. 2019, 05:19 Soruk, notifications@github.com wrote:
Hi Charles,
For couple of days I'm trying to find out why I'm getting the unhandled
exeception when calling tesseract using your wrapper (a couple of months I
compiled and created nuget from your branch 321-tesseract-4 or the
current develop 4.1.0-beta1) on Windows Server 2019 in my application
compiled using x86 platform.On my developper Windows 10 machine I have no issue.
On server the MVCPP 2015-2019 are installed for x86 and x64.I can reproduce the problem using your console sample application (and
targeting net 4.7.2 for example [net45;net472;netcoreapp3.0] and using Any
CPU or x86 platform):
Exception non gérée : System.Runtime.InteropServices.SEHException: Un
composant externe a levé une exception. à
InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiRecognize(HandleRef
handle, HandleRef monitor) à Tesseract.Page.Recognize() à
Tesseract.Page.GetText() à Tesseract.ConsoleDemo.Program.Main(String[]
args) dans
C:UsersakOneDriveDevGitHubtesseract-samplessrcTesseract.ConsoleDemoProgram.cs:ligne
24Remote debugging shows the following error:
[image: image]
https://user-images.githubusercontent.com/4480284/69450147-c9ae0a00-0d5c-11ea-9e27-ca5a7b42eef0.pngDo you have any ideas what is causing it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/497?email_source=notifications&email_token=AAB7HSFCE5USSXML3P6IUT3QVAPD5A5CNFSM4JQUJNK2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H3OUGPA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAB7HSDBBGJJ4PZAK3OOOQTQVAPD5ANCNFSM4JQUJNKQ
.
Hi,
Thanks for your reply.
On Monday I will check-up it with the tesseract.exe bundled in nuget package and I will keep you updated.
For your information, the tesseract.exe from UB Mannheim, especially the older versions works with no error on that Windows Server 2019.
Hi Charles,
I tested with the tessract.exe that is archived in your repository.
On my Windows 10 machine, the following command
tesseract.exe phototest.tif phototest.tif --tessdata-dir [path-tessdata]
The output is:
Tesseract Open Source OCR Engine v4.1.0 with Leptonica
Page 1
The resulting output file have the following values:
This is a lot of 12 point text to test the
ocr code and see if it works on all types
of file format.The quick brown dog jumped over the
lazy fox. The quick brown dog jumped
over the lazy fox. The quick brown dog
jumped over the lazy fox. The quick
brown dog jumped over the lazy fox.
But on my Windows Server 2019, the executable does not fail, it gaves the same output, but the resulting file with recognition data is empty.
I will check up also whether other versions of windows server are causing the same symptom.
I will try to investigate the hresult
The hresult is generic one
-2147467259 in decimal is 80004005 in hexadecimal (usually rendered as 0x80004005). That's "E_FAIL (Unspecified error)" in Win32.
Okay seems like something failing during the recognise stage in my build on
windows 2019.
Maybe double check that the latest vs C++ 2019 runtime is installed. I
doubt that's it but appear to be at least partially environment related
given it works on win 10 but not windows server 2019.
On Mon., 25 Nov. 2019, 18:59 Soruk, notifications@github.com wrote:
The hresult is generic one
-2147467259 in decimal is 80004005 in hexadecimal (usually rendered as
0x80004005). That's "E_FAIL (Unspecified error)" in Win32.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/497?email_source=notifications&email_token=AAB7HSDSTG5BJMPYETIWA43QVOAU3A5CNFSM4JQUJNK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFBPMZY#issuecomment-558036583,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAB7HSCCOZH4423REJAOUGTQVOAU3ANCNFSM4JQUJNKQ
.
Hi,
The latest VS2015-2019 are installed correctly.
I'm trying to recompile leptonica on the master branch (because of this: 450) to find if it can fix the problem.
But it take time to setup the environment.
Okay, let me know how it goes.
Also be sure to check out
https://github.com/charlesw/tesseract/blob/develop/docs/Compling%20tesseract%20and%20leptonica.md
If you haven't already done so. The same info is available on the wiki.
On Mon., 25 Nov. 2019, 21:16 Soruk, notifications@github.com wrote:
Hi,
The latest VS2015-2019 are installed correctly.
I'm trying to recompile leptonica on the master branch (because of this:
450 https://github.com/DanBloomberg/leptonica/issues/450) to find if it
can fix the problem.
But it take time to setup the environment.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/497?email_source=notifications&email_token=AAB7HSFCDYFUBSOUVLCLKL3QVOQZLA5CNFSM4JQUJNK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFB3TUI#issuecomment-558086609,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAB7HSBGE6BMVJ4KOVAHUTTQVOQZLANCNFSM4JQUJNKQ
.
I'm using your Wiki about compiling leptonica and tesseract.
I have some troubles with leptonica and gpg:
`
PS D:temp> vcpkg install giflib:x86-windows-static icu:x86-windows-static libjpeg-turbo:x86-windows-static liblzma:x86-
windows-static libpng:x86-windows-static tiff:x86-windows-static zlib:x86-windows-static
The following packages are already installed:
liblzma[core]:x86-windows-static
The following packages will be built and installed:
giflib[core]:x86-windows-static
icu[core]:x86-windows-static
libjpeg-turbo[core]:x86-windows-static
libpng[core]:x86-windows-static
tiff[core]:x86-windows-static
zlib[core]:x86-windows-static
Starting package 1/7: liblzma:x86-windows-static
Package liblzma:x86-windows-static is already installed
Elapsed time for package liblzma:x86-windows-static: 2.768 ms
Starting package 2/7: icu:x86-windows-static
Building package icu[core]:x86-windows-static...
-- Using cached D:/Temp/vcpkg/downloads/icu4c-61_1-src.tgz
-- Using source at D:/Temp/vcpkg/buildtrees/icu/src/c-61_1-src-b2757af884
-- Acquiring MSYS2...
-- Using cached D:/Temp/vcpkg/downloads/msys2-base-x86_64-20181211.tar.xz
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be started.
gpg: migration aborted
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be started.
gpg: migration aborted
gpg: Generating pacman keyring master key...
gpg: can't connect to the agent: IPC connect call failed
gpg: agent_genkey failed: No agent running
gpg: key generation failed: No agent running
gpg: Done
==> Updating trust database...
gpg: no need for a trustdb check
==> Appending keys from msys2.gpg...
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be started.
gpg: migration aborted
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
==> Locally signing trusted keys in keyring...
-> Locally signing key D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A...
==> ERROR: D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A could not be locally signed.
-> Locally signing key 123D4D51A1793859C2BE916BBBE514E53E0D0813...
==> ERROR: 123D4D51A1793859C2BE916BBBE514E53E0D0813 could not be locally signed.
-> Locally signing key B91BCF3303284BF90CC043CA9F418C233E652008...
==> ERROR: B91BCF3303284BF90CC043CA9F418C233E652008 could not be locally signed.
-> Locally signing key 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C...
==> ERROR: 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C could not be locally signed.
error: mingw32: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is unknown trust
error: mingw64: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is unknown trust
error: msys: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is unknown trust
:: Synchronizing package databases...
-- Acquiring MSYS2... OK
-- Acquiring MSYS Packages...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message):
Command failed: D:/Temp/vcpkg/downloads/tools/msys2/msys64/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noco
nfirm --needed make automake1.15"
Working Directory: D:/Temp/vcpkg/downloads/tools/msys2
Error code: 1
See logs for more information:
D:Tempvcpkgbuildtreesicumsys-pacman-x86-windows-static-out.log
D:Tempvcpkgbuildtreesicumsys-pacman-x86-windows-static-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_acquire_msys.cmake:106 (vcpkg_execute_required_process)
ports/icu/portfile.cmake:76 (vcpkg_acquire_msys)
scripts/ports.cmake:94 (include)
Error: Building package icu:x86-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update
, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: icu:x86-windows-static
Vcpkg version: 2019.09.12-nohash
Additionally, attach any relevant sections from the log files above.
PS D:temp>
`
Hi Charles,
FYI, the same problem exists on Windows Server 2012 R2 machine.
I had trouble with ICU as well, as it's only required for training tools I
just slipped it.
On Mon., 25 Nov. 2019, 21:35 Soruk, notifications@github.com wrote:
I'm using your Wiki about compiling leptonica and tesseract.
I have some troubles with leptonica and gpg:
`
PS D:temp> vcpkg install giflib:x86-windows-static icu:x86-windows-static
libjpeg-turbo:x86-windows-static liblzma:x86-
windows-static libpng:x86-windows-static tiff:x86-windows-static
zlib:x86-windows-static
The following packages are already installed:
liblzma[core]:x86-windows-static
The following packages will be built and installed:
giflib[core]:x86-windows-static
icu[core]:x86-windows-static
libjpeg-turbo[core]:x86-windows-static
libpng[core]:x86-windows-static
tiff[core]:x86-windows-static
zlib[core]:x86-windows-static
Starting package 1/7: liblzma:x86-windows-static
Package liblzma:x86-windows-static is already installed
Elapsed time for package liblzma:x86-windows-static: 2.768 ms
Starting package 2/7: icu:x86-windows-static
Building package icu[core]:x86-windows-static...
-- Using cached D:/Temp/vcpkg/downloads/icu4c-61_1-src.tgz
-- Using source at D:/Temp/vcpkg/buildtrees/icu/src/c-61_1-src-b2757af884
-- Acquiring MSYS2...
-- Using cached D:/Temp/vcpkg/downloads/msys2-base-x86_64-20181211.tar.xz
gpg: /etc/pacman.d/gnupg/trustdb.gpg: trustdb created
gpg: no ultimately trusted keys found
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be
started.
gpg: migration aborted
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be
started.
gpg: migration aborted
gpg: Generating pacman keyring master key...
gpg: can't connect to the agent: IPC connect call failed
gpg: agent_genkey failed: No agent running
gpg: key generation failed: No agent running
gpg: Done
==> Updating trust database...
gpg: no need for a trustdb check
==> Appending keys from msys2.gpg...
gpg: starting migration from earlier GnuPG versions
gpg: can't connect to the agent: IPC connect call failed
gpg: error: GnuPG agent unusable. Please check that a GnuPG agent can be
started.
gpg: migration aborted
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
gpg: can't connect to the agent: IPC connect call failed
==> Locally signing trusted keys in keyring...
-> Locally signing key D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A...
==> ERROR: D55E7A6D7CE9BA1587C0ACACF40D263ECA25678A could not be locally
signed.
-> Locally signing key 123D4D51A1793859C2BE916BBBE514E53E0D0813...
==> ERROR: 123D4D51A1793859C2BE916BBBE514E53E0D0813 could not be locally
signed.
-> Locally signing key B91BCF3303284BF90CC043CA9F418C233E652008...
==> ERROR: B91BCF3303284BF90CC043CA9F418C233E652008 could not be locally
signed.
-> Locally signing key 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C...
==> ERROR: 9DD0D4217D75A33B896159E6DA7EF2ABAEEA755C could not be locally
signed.
error: mingw32: signature from "Alexey Pavlov (Alexpux) [email protected]"
is unknown trust
error: mingw64: signature from "Alexey Pavlov (Alexpux) [email protected]"
is unknown trust
error: msys: signature from "Alexey Pavlov (Alexpux) [email protected]"
is unknown trust
:: Synchronizing package databases...
-- Acquiring MSYS2... OK
-- Acquiring MSYS Packages...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72
(message):
Command failed:
D:/Temp/vcpkg/downloads/tools/msys2/msys64/usr/bin/bash.exe --noprofile
--norc -c "pacman -Sy --noco
nfirm --needed make automake1.15"
Working Directory: D:/Temp/vcpkg/downloads/tools/msys2
Error code: 1
See logs for more information:
D:Tempvcpkgbuildtreesicumsys-pacman-x86-windows-static-out.log
D:Tempvcpkgbuildtreesicumsys-pacman-x86-windows-static-err.logCall Stack (most recent call first):
scripts/cmake/vcpkg_acquire_msys.cmake:106 (vcpkg_execute_required_process)
ports/icu/portfile.cmake:76 (vcpkg_acquire_msys)
scripts/ports.cmake:94 (include)Error: Building package icu:x86-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: icu:x86-windows-static
Vcpkg version: 2019.09.12-nohashAdditionally, attach any relevant sections from the log files above.
PS D:temp>
`—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/497?email_source=notifications&email_token=AAB7HSHVQCRIDJZXSU4HW4LQVOTA3A5CNFSM4JQUJNK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFB5SSY#issuecomment-558094667,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAB7HSGQCOYKM5WRLCXVYQ3QVOTA3ANCNFSM4JQUJNKQ
.
The compilation of the branch 1.78.0 succeeds but the problem persists on Windows Server machines.
I'm not able to compile the master branch 466.
Just disable SW_BUILD (i.e. add -DSW_BUILD=OFF
to the cmake command line).
I've made a note of this on the wikipage for future reference.
Thanks for the tip.
The recompiled version of leptonica still fails on these OS.
I'm continue to investigate (trying to generate debug version of DLL and debug). I will keep you updated
Hi,
I found out that it works on some OS (the same family) and on other no.
Maybe it is cause by some of the CPU instruction, but which one?
Here are the output from CoreInfo of the VMs with the same OS but on different materiel.
CoreInfoWorking.txt
CoreInfoNotWorking.txt
Maybe it is linked with this issue 1348
Hi,
I compiled the latest version of tesseract from 4.1 branch and tested it, but the error persists, even though I specified the SSE2 for "Enable Enhanced Instruction Set".
With WinDBG I have the following fist chance exception:
WinDBG.NotWorking.txt
For the comparison, on my Win 10, the output is like that:
WinDDB.Working.txt
I think you might be on the money with 1348, unfortunately if that's the case then the only real solution, untill that issue is fixed, would be to disable AVX instructions from being generated by tesseract. Hopefully tesseract have a macro that can be defined to accomplish this. I'm out ATM but will have a look later today (my timezone's AEDT).
Actually one other thing to check would be that the dependencies (libjpeg, etc) weren't compiled with avx instructions enabled as that would obviously fail if that was the case. So to summarize:
BTW just to be clear are you running this on a VM? If so that may explain why some of the dynamic instruction checks appear to be failing as I'm pretty sure windows server 2019 support AVX2.
Yes, the tesseract fails on VM running on Windows Sever 2019 hosted on ESX server with processor form 2010. The same issue I can reproduce on VM Windows Server 2012 R2 hosted on the same ESX.
Great news,
Firstly with the -v
option on tesseract.exe
, I found out that there were some optimizations enabled:
PS D:tempbuildx86bin> .tesseract.exe -v
tesseract 4.1.1-rc2-17-g6343f
leptonica-1.79.0 (Nov 29 2019, 17:09:28) [MSC v.1923 LIB Release x86]
libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 2.0.3) : libpng 1.6.37 : libtiff 4.0.10 : zlib 1.2.11
Found AVX2
Found AVX
Found FMA
Found SSE
Then, as you suggested (thanks), I found the AUTO_OPTIMIZE
option the Configure.cmake
file.
Therefore the generation of the solution the 4.1 branch of tesseract-ocr by cmake
should have now the following options -DSW_BUILD=OFF -DAUTO_OPTIMIZE=OFF
.
Tomorrow (CET timezone) I will clean my code and do some tests with leptonica 1.79 and tesseract 4.1.1 (from the branch).
Great, sounds promising 🙂
On Mon., 2 Dec. 2019, 04:26 Soruk, notifications@github.com wrote:
Great news,
Firstly with the -v option on tesseract.exe, I found out that there were
some optimizations enabled:PS D:tempbuildx86bin> .tesseract.exe -v
tesseract 4.1.1-rc2-17-g6343f
leptonica-1.79.0 (Nov 29 2019, 17:09:28) [MSC v.1923 LIB Release x86]
libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 2.0.3) : libpng 1.6.37 : libtiff
4.0.10 : zlib 1.2.11
Found AVX2
Found AVX
Found FMA
Found SSE
Then, as you suggested (thanks), I found the AUTO_OPTIMIZE option the
Configure.cmake file.
Therefore the generation of the solution the 4.1 branch of tesseract-ocr
https://github.com/tesseract-ocr/tesseract/tree/4.1 by cmake should
have now the following options -DSW_BUILD=OFF -DAUTO_OPTIMIZE=OFF.
Tomorrow (CET timezone) I will clean my code and do some tests with
leptonica 1.79 and tesseract 4.1.1 (from the branch).—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/charlesw/tesseract/issues/497?email_source=notifications&email_token=AAB7HSDDZLUCNZ5IFDWAFTDQWPXUPA5CNFSM4JQUJNK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFRPP3I#issuecomment-560134125,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAB7HSD3PHZR2PMQ2NUGLHLQWPXUPANCNFSM4JQUJNKQ
.
Hi,
I created the pull request 499 into your branch with updated tesseract and leptonica.
Hi,
@Soruk Thanks for your compiled DLLs that are without optimizations.
I encountered the same issue running my app (built with VS 2019 / VB .NET / .NET Framework 4.6) on two computers with different OS (_Win 10_ and _Win 7_) with CPUs that don't support AVX, it crashed on both of them.
I wasn't very sure the issue was because of AVX, so I created on my computer (that supports AVX) a VM running a Win Vista (since it doesn't support AVX), and I faced the same problem.
I thought the AVX was disabled in the given DLLs by default, but it seems the optimizations cause errors as well on non AVX computers?
I then tried your _tesseract.exe_ with _leptonica-1.79.0.dll_ and _tesseract41.dll_ that are compiled without optimizations, used few examples on it and it worked!
So the next thing I had to do was replace the _leptonica-1.78.0.dll_ and _tesseract41.dll_ that my app uses with those new ones, but after I did that my app gave me a new exception error, I figured out the issue would be in _Tesseract.dll_, so I debugged it and found out that it mentions "leptonica-1.78.0" in a couple of lines, replaced them all with "leptonica-1.79.0", recompiled the DLL... and it was fixed, my app works fine now in these 2 computers.
@KudoAmine your welcome.
hello all,
I have this only one computer ( Win 10, AMD II X4 965, Radeon HD 6570 ) where I got the same exception as the OP. All other computers where I testes my project it works just fine.
At first the app just closed without any error, only after adding the... ( I dont know what is called ) tag things before the method, the try catch start catching this exception...
[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions, System.Security.SecurityCritical] // Without this SEHException cannot be caught by try-catch
public static string ParseText( ... )
{
try
{
...
using (TesseractEngine engine = new TesseractEngine(@"./tessdata", lang, EngineMode.Default)) {
...
}
catch (System.Runtime.InteropServices.SEHException ex)
{
...
}
}
Exception name : System.Runtime.InteropServices.SEHException
Message : Componente externo acionou uma exceção.
StackTrace :
em InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiRecognize(HandleRef handle, HandleRef monitor)
em Tesseract.Page.Recognize()
em Tesseract.Page.GetText()
em Utils.ImgProc.UImgTesseractOCR.ParseText(Bitmap haystack, PageSegMode pageSegMode, String lang, String charWhilelist, Int32 bitmapMagnifyMultiplier)
My NuGet package is 4.1.0-beta1. I'm new to C++, this is my first project and my first time working with tesseract... Any guidance wold be appreciated.
Thanks!
Run the tesseract.exe and see what it reports for architecture. The team recently fixed a problem with machines that didnt have AVX2.On Nov 2, 2020 6:47 PM, seltix5 notifications@github.com wrote:[External email: Use caution! Do not open attachments or click on links from unknown senders or unexpected emails.]
hello all,
I have this only one computer ( Win 10, AMD II X4 965, Radeon HD 6570 ) where I got the same exception as the OP. All other computers where I testes my project it works just fine.
At first the app just closed without any error, only after adding the... ( I dont know what is called ) tag things before the method, the try catch start catching this exception...
[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions, System.Security.SecurityCritical] // Without this SEHException cannot be caught by try-catch
public static string ParseText( ... )
{
try
{
...
using (TesseractEngine engine = new TesseractEngine(@"./tessdata", lang, EngineMode.Default)) {
...
}
catch (System.Runtime.InteropServices.SEHException ex)
{
...
}
}
Exception name : System.Runtime.InteropServices.SEHException
Message : Componente externo acionou uma exceção.
StackTrace :
em InteropRuntimeImplementer.TessApiSignaturesInstance.TessApiSignaturesImplementation.BaseApiRecognize(HandleRef handle, HandleRef monitor)
em Tesseract.Page.Recognize()
em Tesseract.Page.GetText()
em Utils.ImgProc.UImgTesseractOCR.ParseText(Bitmap haystack, PageSegMode pageSegMode, String lang, String charWhilelist, Int32 bitmapMagnifyMultiplier)
My NuGet package is 4.1.0-beta1. I'm new to C++, this is my first project and my first time working with tesseract... Any guidance wold be appreciated.
Thanks!
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
hi,
I used this code to test AVX support ( https://stackoverflow.com/questions/35096660/check-avx-instruction-set-support ) and apparently this CPU does NOT have support.
Yet using tesseract.exe 4.1.0 with lectpmoca-1.78.0 it does not give any error when I execute
tesseract.exe image.png out.txt
I'm using this tesseract.exe : https://github.com/charlesw/tesseract/tree/feature/321-Tesseract-4/src/Tesseract/x64
I think you need a newer version.
And how can I get a newer version? I already have the latest NuGet package 4.1.0-beta1
Thanks for the help!
Start by asking the Tesseract issues list on github (this list is not that) how current the nugget package is.
I only ask here because this is the source repository of the NuGet : https://www.nuget.org/packages/Tesseract/4.1.0-beta1
If the tesseract.exe dos not throw any error isn't this problem related with this repository and not the tesseract one?
Ah, right. The Tesseract bundled by this NuGet package is the problem. I can't help with that.
Then where should I ask for help? Or what alternativa do I have? I try to download this repository and include the project in my C# solution but when I call tesseract engine I get error -1 which is strange since the same code works fine the the NuGet version
Hi,
I resolved by building the wrapper (in my fork branch) and creating the corresponding nuget package that I store at our company's repository.
Hi,
I resolved by building the wrapper (in my fork branch) and creating the corresponding nuget package that I store at our company's repository.
Thank you!!
It works =D
I just download your repository, added the project to my solution and added the reference to my project and thats it =D
I did not create any NuGet package, I do not even know how to do that but I suppose its not really necessary right? Is there any advantage?
What did you do in your fork exactly? You just update the lectpmoca DLL?
No, it is not necessary to build nuget.
I updated the DLLs and references to it and make some changes in order to build package (with Visual Studio 2019 there is an option on contextual menu to generate package)
FYI I've just released a new version 4.1.1 with the dlls built with AVX support disabled which should resolve theses issues. Sorry for the delay and thanks again @Soruk for identifying and sorting out this issue :)
Most helpful comment
FYI I've just released a new version 4.1.1 with the dlls built with AVX support disabled which should resolve theses issues. Sorry for the delay and thanks again @Soruk for identifying and sorting out this issue :)