简体   繁体   中英

An invalid parameter error at msvcr120.dll (Building Tesseract Lib in 64bit Windows)

I have already raised the inquiry to Tesseract Forum, but whether I can have a clue for the error, I raise the issue at this forum again. As this is my favorite forum in solving the problems.

I have a problem somehow related to the tesseract lib.

The problem is at libtiff one of the components used in leptonica library.

I followed exactly what is described here

in building libtiff for my 64bit windows.

C:\LIBTIFF\LIBTIFF> nmake /f makefile.vc
C:\LIBTIFF\LIBTIFF> cd ..\tools
C:\LIBTIFF\TOOLS> nmake /f makefile.vc

Build is ok. Using tiff lib and I built leptonica lib and tessearact lib for 64bit windows. Once I run my application using tesseract lib, I got error at tiff lib and the error is

"Unhandled exception at 0x00007FFA966FDD27 (msvcr120.dll) in TessarActOCR_test.exe: An invalid parameter was passed to a function that considers invalid parameters fatal."

The error is happening at lseek in the following function. The function is located in tiffio.c

static TIFF *
fopenTiff(FILE        *fp,tif_win32.c
          const char  *modestring)
{
l_int32  fd;

    PROCNAME("fopenTiff");

    if (!fp)
        return (TIFF *)ERROR_PTR("stream not opened", procName, NULL);
    if (!modestring)
        return (TIFF *)ERROR_PTR("modestring not defined", procName, NULL);

    if ((fd = fileno(fp)) < 0)
        return (TIFF *)ERROR_PTR("invalid file descriptor", procName, NULL);
    lseek(fd, 0, SEEK_SET);

    return TIFFFdOpen(fd, "TIFFstream", modestring);
}

What could be wrong with this error?

Now I solved all problems and tesseract lib is working at my 64bit pc and project. The solution for me is step by step following the discussions in this link during preparing the dependencies. Then leptonica lib is built and then link to tesseract to build tesseract lib. Now all are working well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM