Sicos1977 / TesseractOCR

A .net library to work with Google's Tesseract
167 stars 21 forks source link

5.2.12 InteropDotNet exception #20

Closed washcycle closed 2 years ago

washcycle commented 2 years ago

There might be a new issue with the latest release. Project builds succesfuly, but throws a runtime exception.

TesseractOCR Version: 5.2.12

System Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

DotNet SDK Version: 6.0.401

Exception has occurred: CLR/System.Reflection.TargetInvocationException
An exception of type 'System.Reflection.TargetInvocationException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'Exception has been thrown by the target of an invocation.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception     System.MethodAccessException : Attempt by method 'InteropRuntimeImplementer.LeptonicaApiSignaturesInstance.LeptonicaApiSignaturesImplementation..ctor(TesseractOCR.InteropDotNet.LibraryLoader)' to access method 'TesseractOCR.InteropDotNet.LibraryLoader.LoadLibrary(System.String, System.String)' failed.
   at InteropRuntimeImplementer.LeptonicaApiSignaturesInstance.LeptonicaApiSignaturesImplementation..ctor(LibraryLoader loader)

If there is some other information that might help let me know.

Sicos1977 commented 2 years ago

Get the latest version --> https://www.nuget.org/packages/TesseractOCR

5.2.12 indeed has this issue that I accidently introduced by making the wrong class internal. I fixed it in version 5.2.14

washcycle commented 2 years ago

That did the trick, thanks.