Open JohnVLinton opened 7 years ago
Start walking through #304.
Commonly this means something those libraries depend on is missing from the environment.
I recently encountered this issue and was initially unable to solve it using any of the normal suggestions in the threads related to Error 2 / #304. Eventually I traced the problem to an invalid version of vcruntime140.dll. Check that the versions of this dll in system32 and syswow64 are correct by comparing the file version with the version reported in Add/Remove programs. In my case they did not match. By re-installing the correct versions I got things working.
Thanks Sir.
Somehow I rebuilt things several times, reloaded Studio, and the annoying error simply disappeared -- which is both comforting and worrisome.
Best,
John Linton
On Wed, Oct 4, 2017 at 2:52 PM, ilochray notifications@github.com wrote:
I recently encountered this issue and was initially unable to solve it using any of the normal suggestions in the threads related to Error 2 /
304 https://github.com/charlesw/tesseract/issues/304. Eventually I
traced the problem to an invalid version of vcruntime140.dll. Check that the versions of this dll in system32 and syswow64 are correct by comparing the file version with the version reported in Add/Remove programs. In my case they did not match. By re-installing the correct versions I got things working.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/charlesw/tesseract/issues/372#issuecomment-334254665, or mute the thread https://github.com/notifications/unsubscribe-auth/AXng6E6URuylb-UA4s9Jkk0rnvTqv74rks5so9P6gaJpZM4PnwMp .
Egad. The issue came back; not sure why. I'm trying to get the Tesseract logging to work per the config file update but that isn't writing either... To be clear, the log file is created where I want it on the error occurring but it is "writing blank", with no content on open.
I see a lot of chatter about the below error but have still no working solution.
Whether I copy the two .dlls (liblept172.dll and libtesseract304.dll) into x64 and x86 -- or configure the build to auto-copy them, I keep getting the library load error no matter what. Whether I put them in the main solution folder, x64 and x86 inside that, inside the bin folders, they're never found.
I'm running Windows 10 and in either Visual Studio 2015 or 2017, I keep having this problem. I don't really know why there's not a simple fix.
I'm using Tesseract 3.02, I heard 3.01 didn't have the issue, but that didn't work either.
System.DllNotFoundException: Failed to find library "liblept172.dll" for platform x86. at InteropDotNet.LibraryLoader.LoadLibrary(String fileName, String platformName) at InteropRuntimeImplementer.LeptonicaApiSignaturesInstance.LeptonicaApiSignaturesImplementation..ctor(LibraryLoader loader) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at InteropDotNet.InteropRuntimeImplementer.CreateInstance[T]() at Tesseract.Interop.LeptonicaApi.Initialize() at Tesseract.Interop.TessApi.Initialize() at Tesseract.Interop.TessApi.get_Native() at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerableb39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultb 3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>cDisplayClass46.b 3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass33.b 32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultb1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.b__1e(IAsyncResult asyncResult)
1 configFiles, IDictionary
2 initialOptions, Boolean setOnlyNonDebugVariables) at ScanDoc.Scanner.IsPageBlank(Bitmap pageImg) in C:\TFS\SharePoint\Web Applications\PersonnelDocuments\ScanDoc\Scanner.cs:line 640 at ScanDoc.Scanner.ProcessLegacyDocuments(Stream pdfFileStream, String userName) in C:\TFS\SharePoint\Web Applications\PersonnelDocuments\ScanDoc\Scanner.cs:line 262 at PersonnelDocuments.Controllers.SearchController.UploadLegacyArbitration(HttpPostedFileBase arbitrationFile) in C:\TFS\SharePoint\Web Applications\PersonnelDocuments\PersonnelDocuments\Controllers\SearchController.cs:line 411 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.<>cDisplayClass2b.