Insane Objects

From LabVIEW Wiki
Jump to: navigation, search

All objects within LabVIEW, have a self-verification mechanism, which makes each object able to audit whether its internal state is within expected bounds set by LV developers. On specific operations, LabVIEW triggers that sanity check on objects. If any object fails the verification, it is marked as Insane.

For example, if a connection-related object has state set to connected, but the underlying connection reference is NULL - the object will fail its sanity test. Another example might be an object which flags suggest it is compiled properly and there was no source code change which would require re-compilation, but the related machine code references objects which were removed.

The insane object message is what LabVIEW puts in a dialog when one of the objects on the diagram does not meet its consistency test. In other words, this object isn't in a state LabVIEW expects it to be in. Most of the time these errors are not fatal -- LabVIEW simply puts the object in the state it does expect. But it raises questions about how the object got into that bad state and what might have been done with that object between the last time LabVIEW checked and it was good and the time it became insane.

Reporting bugs

There is no need to necessarily report generically to NI that LabVIEW has insane objects; it is a mechanism which developers intentionally introduced. These are NOT merely bugs: insane objects can be generated as part of the LabVIEW internal verification process.

If you get a message about insane object, it is good to check the known bugs of LabVIEW at ni.com, and if the particular insanity in your dialog is not listed, only then should you report the insanity to NI technical support. As always in such cases, it is important to describe the situation which lead to the insane object appearing.

The insane object messages are something NI works on with each version of LabVIEW. But as it is a generic error message that can apply to anything from a simple cosmetic to the Front Panel itself, you'll still see them in any version of LabVIEW that has a bug -- a fact of life unfortunately for the foreseeable future.

The displayed message

An example of the insanity message may be:

Insane object at FPHP+4C in "name.vi": {dsitem} 0x400: Panel (FPSC)

The cryptic nature of the message can be deciphered as follows:

  • FPHP -- this will be either FP or BD for "front panel heap" or "block diagram heap"
  • 4C -- this is a hexadecimal number indicating which object.
  • name.vi -- which VI had the insanity
  • {dsitem} 0x400 -- really only meaningful if you know how LabVIEW internals work; in this example it is Data Space item identification
  • Panel (FPSC) -- the type of object that has problems. The four letter codes are usually descriptive (COSM for a cosmetic or simple drawn part, SGNL for a signal aka wire). A common one that you won't guess is DDOD, which stands for Data Display Object (the last D is because it has to be 4 chars).

Most of the time, deleting the offending object and recreating it from scratch is sufficient to fix your VI and allow you to continue working.

Using Heap Peek

There is a way to find and delete an insane object. When you get an insane error, you will get a code that identifies the object that is insane - write down that code. For example in the section above, the number "4C" is the number that tells you which object is the culprit.

After you have the number, enable and invoke Heap Peek window with your VI opened (instruction is in the link).

The window is divided into several sections. The functionality of the various parts is obscure and mystical; you can read more about it on the Heap Peek page. We're just going to focus on the bits that help with finding and deleting insane objects.

  • Check the error message given about the insane object. It includes either the letters BDHP or FPHP. Scroll through the top-left list box until you find those 4 letters and the name of your VI. Left click to select that item. This will change what is displayed in the top-right section of the window.
  • In the top-right section, find the line that begins with the number identifying the object. These are sorted numerically. Left click to select the object when you find it.
  • In the middle region, there is a box with an F inside it. This is a button (heap peek doesn't use a lot of advanced drawing, so it doesn't really look like a button, but it is). Click on the F button to find the offending object.
  • LabVIEW will switch to the block diagram or front panel and select some object. Whatever object it is, delete it.

Note: Heap Peek does not have any ability to change the objects. It is display information only. There are VIs in LV that are not real VIs (for example, a pseudo VI that is created to represent a Call By Reference to another application instance on another machine), and attempting to do Find to jump to their components can cause problems because those VIs never expect to actually draw themselves. But other than that state change, there are no edits to VIs possible using this tool as of November 2007.

See also