Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imaqReadFile raises Microsoft C++ exception: GRLIBError_enum when reading 16bit TIFF files

Hello,

I have to read 16bit tiff files into a imaq images. This I do in Visual C++ like this:

    Image* test = imaqCreateImage(IMAQ_IMAGE_I16, 0);
    int res = imaqReadFile(test, "d:\\error.tif", 0, 0);


res is "1" which indicates that the image has been loaded correctly. But the debug output prints 4 Errors:

    First-chance exception at 0x7c812a5b in Test.exe: Microsoft C++ exception: GRLIBError_enum at memory location 0x0012cb88..
    First-chance exception at 0x7c812a5b in
Test.exe: Microsoft C++ exception: GRLIBError_enum at memory location 0x0012cbe0..
    First-chance exception at 0x7c812a5b in
Test.exe: Microsoft C++ exception: GRLIBError_enum at memory location 0x0012cb88..
    First-chance exception at 0x7c812a5b in
Test.exe: Microsoft C++ exception: GRLIBError_enum at memory location 0x0012cbe0..

The error also occurs with the ..\National Instruments\Vision\Examples\MSVC\Load And Display\ example. Still the example program displays the image correctly.

I attached a 16 bit tiff for you to try. I cannot just dirtily catch the exception because after some 50 images my program is stopped with the message that the heap is corrupt.

Hope for your help,

Fabian






0 Kudos
Message 1 of 2
(4,009 Views)
Hello Fabian,
often a first chance exception does not mean their is a problem in a code. This message let your know that an exceptional situation was encountered and was handled.
Probably you could disable this on the debugger's configuration.

Cheers,
AmirG

0 Kudos
Message 2 of 2
(3,984 Views)