Archived:Error -1074396120 after Vision Assistant when Running VI Twice

Updated Jun 20, 2023

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Software

  • Vision Development Module

Issue Details

I have a VI that utilizes the Vision Assistant. When I run my program the first time, it works properly. If I run it again without closing my VI/project, Error -1074396120 occurs after the Vision Assistant. This seems to point to there not being an image. If I close my VI/project, the program runs correctly on first run. How can I fix this?

Solution

This issue was addressed in CARs 481652 and 413948 and was fixed in NI Vision Development Module 16 as discussed in the readme

Code generated for certain algorithms in Vision Assistant did not work the second time the main VI was called if the application disposes all buffers in the main VI. 

If using a previous version and you are unable to update, consider using the IMAQ Dispose VI to dispose the images manually, instead of choosing to dispose all images.

Additional Information

The following algorithms were affected by this issue: Color Location, Color Pattern Matching, Compare Contour Template, Defect Inspection, Flat Field Correction, Image Calibration, Mask from Image File, Match Geometric Pattern, Match Pattern, and Shape Matching.