NI Imaq Version 8.2.1 until 8.6.1
Hi,
we work since over 2 years with the imaq vision library. We implement our functions in a c++ dll and export this functions to use it in our visual basic 6 projects, which implement the GUI. Now there is a very strange problem. I think it causes from my own code, but i make a test-dll which only uses 4 imaq-functions and a visual basic 6 form to start matching and display results and the problem is still there.
Ok, here now the description of the problem:
I have 25 images and 25 pattern. In the respective image i will match the correspondig pattern. The pattern was create with the NI template editor. There are 3 function in my own test dll. One function only load the source image, one function load the pattern and one function match the pattern with imaqMatchGeometricPattern2 and predefined parameters. In the Visual Basic 6 test-form i use this function to load the source images in a loop and load for every source-image all the pattern files in this inner loop. After loading one pattern i use the matching function. This works fine in Visual Basic 6 IDE (P-Code) and in the Exe-File (Native-Code). I have defined a error-handler in my visual basic 6 function. If any error occurs it will return the error-description. In this VB6 test program there is no double-variable defined. But when i define a double variable and set this variable to any value (in my case zero) after matching a pattern, VB6 raise a "overflow" or "division by zero" error. 2 of these 25 pattern create this strange error in the VB6 IDE (P-Code) but not in the Exe-File(Native-Code). All other patterns works fine for me.
I use the NI Imaq Development Kit Version 8.2.1. But i can reproduce this error in all runtime-versions up to 8.6.1. I have also tested in a virtual machine, the problem is the same.
I have attached a archiv which contains the c++ sourcecode, the vb6 sourcecode and the images. Its not a solution if you say "ok, then compile in native code". We need it to run in the debugger without these error.
Best regards,
Mirko