Solution
This message means that an object in LabVIEW such as a wire or a loop tunnel does not pass an internal test known as a sanity check (see examples of insane object errors in Additional Information below). If the errors are serious enough, LabVIEW exits because something has become corrupted. Sanity checks occur before each save, to ensure that corrupted VIs are not written over good VIs. They also happen as part of the compilation process. Thus, sanity checks happen frequently. Many insanities are actually fixed (made sane) after the dialog box appears and will not appear again, so the first thing you should do after receiving an insane object error is to try to make a backup copy of the VI, run it, and perform some additional editing to see if the problem was resolved automatically.
VI corruptions do not happen often. They can happen because of disk corruption, but this will often lead to a file that can no longer be loaded. Corruptions can also happen because the programmer did something that corrupts a LabVIEW data type, perhaps as the result of a call to external code.
The following steps will help to diagnose the cause of this error and troubleshoot the issue:
- If the VI is small, try selecting the entire diagram and copying it to a new VI. After saving the new VI, there is a good chance the insane object error will no longer appear.
- If the VI is too large to do the above step, you can copy the VI to disk (or to your network if that is available) and open it on the second machine. If the insane object errors do not appear, save the VI (on the second machine) and transfer it back to the original PC (by disk or by network). The new, uncorrupted version of the VI should now run without generating the insane object error.
- If LabVIEW crashes and is not able to load the VI, try opening the VI on a higher version of LabVIEW. In some cases, it is possible to recover part of the VI when it is opened in a different version of LabVIEW.
- Look at the error log and determine if the problem appears to be with a component (wires, controls, indicators, etc.) on the front panel ("FPHP") or block diagram ("BDHP") (see Error Log contents section below). Delete and recreate the most recently created objects and make use of the text in the error message in deciding which objects to rebuild. Example: In the case of the second message above, it would be best to delete and recreate the most recently created loop tunnels. There is also a way to directly find the objects from the error log messages as explained in the Finding insane objects section below.