Closed dulfe closed 6 years ago
In Tesseract’s LibraryLoaderTraces.cs, line 12, I change this to “true” and run in a console command.
const bool printToConsole = false;
@tdhintz Seems like that file was deleted in this branch... after reviewing the git history I found the code and applied it to this branch... with that I able to see the error messages:
...<removing successful messages>
Checking executing application domain location 'D:\OpenSource\dulfe\test' for 'libtesseract400.dll' on platform x64.
Trying to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll"...
Failed to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll".
Check windows event log.
Checking current application domain location 'D:\OpenSource\dulfe\test\' for 'libtesseract400.dll' on platform x64.
Trying to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll"...
Failed to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll".
Check windows event log.
No bin directory exists under the current application domain's location, skipping.
Checking working directory 'D:\OpenSource\dulfe\test' for 'libtesseract400.dll' on platform x64.
Trying to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll"...
Failed to load native library "D:\OpenSource\dulfe\test\x64\libtesseract400.dll".
Check windows event log.
Then I checked the event log and I found this:
Faulting application name: ConsoleApp1.exe, version: 1.0.0.0, time stamp: 0x5ad55553
Faulting module name: KERNELBASE.dll, version: 6.1.7601.23915, time stamp: 0x59b94f2a
Exception code: 0xe0434352
Fault offset: 0x000000000001a06d
Faulting process id: 0x8a0
Faulting application start time: 0x01d3d5f206890000
Faulting application path: D:\OpenSource\dulfe\test\ConsoleApp1.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 47fe5a80-41e5-11e8-ae2d-00012e331ae2
I did some Google Search and nothing really help... I will try to create a VM and see if it fails there.
Any ideas would be appreciate it :)
Thank you.
Procmon says it finds the 2015 C++ Redistributable, but my recollection is that the 4.0 libs were built using the 2017 version.
@tdhintz I tried installing 2017 and that did not work either.
I was able to create a VM with 2008 R2 and it worked... so something is wrong with the main server. I also used WinDbg to try and see what was wrong and seems like KernelBase.dll is just "the last one reporting the error" and not who is causing it.
WinDbg catches an "Illegal instruction"
ModLoad: 000007fe`e1740000 000007fe`e1745000 C:\Windows\system32\api-ms-win-crt-multibyte-l1-1-0.dll
(83c.88c): Illegal instruction - code c000001d (first chance)
ModLoad: 000007fe`dc7b0000 000007fe`dccc6000 D:\OpenSource\dulfe\TesseractTest01\x64\libtesseract400.dll
Well... I will reinstall that server (not many things in it)... that is quicker than trying to debug all dependencies.
Thank you!
Are the VMs on the same kind of processor? The builds likely target OpenMP and might take advantage of AVX2 or similar.
@tdhintz No, they are not. They are both Intel but not the same family.
I just checked my builds. They have AXV2 specified for certain. That likely isn’t good for some processors.
That is good to know!... that server is pretty old (that is why it is using Windows 2008 R2!), I will try and find out if it supports those extensions.
I was wrong, that box uses AMD and as far as I know AVX2 is Intel. Do you think that is the cause?
I was able to make it work.... after @tdhintz good point about AVX2, I decided to compile Tesseract directly from source (following their compilation instructions) making sure those extensions were disabled (which their are by default) and the program worked on that server (after fixing some file naming issues).
So... the Moral of the story is: If this lib fails, make sure your processor supports AVX2!
Thank you @tdhintz!
Thanks for pointing that out @tdhintz. I'm thinking it'd probably be safest to distribute the native DLLs with these optimisations turned off. If in specific cases people want to use them they can provide their own DLLs.
Any thoughts?
On Fri., 20 Apr. 2018, 04:07 Daniel Ulfe, notifications@github.com wrote:
I was able to make it work.... after @tdhintz https://github.com/tdhintz good point about AVX2, I decided to compile Tesseract directly from source (following their compilation instructions) making sure those extensions were disabled (which their are by default) and the program worked on that server (after fixing some file naming issues).
So... the Moral of the story is: If this lib fails, make sure your processor supports AVX2!
Thank you @tdhintz https://github.com/tdhintz!
— 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/405#issuecomment-382829405, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPzyPN-aN_R17AKF7-lC4Y9bA4OByL2ks5tqNJpgaJpZM4TXVgL .
Absolutely. People ask me for copies of the builds on a regular basis and I just uploaded what I had at the time for their convenience. I may have even disclosed the build settings in the Wiki, but I haven’t checked. I’m not inclined to worry about it until a decision is made to post a Nuget beta of 4.0. When that happens all new builds are needed anyway for both x86 and x64.
Hello,
I am trying to run a program using the branch Tesseract-4... it works fine in Dev but in the target machine it fails. (Dev: Win 10 Pro x64 / Prod: Win 2008 R2 x64)
System.DllNotFoundException: Failed to find library "libtesseract400.dll" for platform x86
Full Output
I read the ERROR 2 Wiki entry and all the other DllNotFound issues and I tried all these:
Compile it using "Any CPU" making sure "Force 32-bits" is disabled.
Compile it using "x86"
Compile it using "x64"
Installed VC++ 2005 Update 3 Redistributable x86 and x64 (Version 14.0.24215.1)
Used Dependency Walker and Dependencies to make sure everything is there... all OK
Captured failed binding logs using Fusion - No binding errors found.
Captured logs using Process Monitor - No bind errors found. Just in case someone wants to see it: ProcMon-Logfile.xlsx
Added Tracing to the App.config file and it does not show any messages (not even in the Dev machine). Just in case, I manually created an entry and the tracing file gets created but Tesseract does not output anything:
The program is very basic:
So, Right now I am out of ideas... Am I forgetting anything?
Thank you. Daniel.