LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OOP unknown VI error and crash

I'm attempting to use the OOP capability in LabView 8.20 for the first time. In my class I have a main VI that calls several dynamic member VIs of the class. This appeared to work fine when I first created the class and its subVIs. I attempted to inherrit a new class from the original one. Now whever I load the parent classes main VI, it shows a broken run error and X by the VIs name in the error window. However it lists 0 errors. One of the dynamic VIs it calls has been replaced by the unknown VI questionmark icon. If I replace the unknown with the correct VI it appears ok but LabView performs a GPF when I try to save or run the VI.

Has anyone else encountered a problem like this or does anyone know a way around it?
0 Kudos
Message 1 of 2
(2,377 Views)
This is a common problem with LabVIEW OOP. The issue happens because the compilation process fails to update all the VIs in the project when change in the code occurs that affects multiple VIs. If you already are in a state where you have VIs with question mark, you need to manually replace them with the correct VI.

To avoid the issue later on, do the following:
1) upgrade to LabVIEW 8.2.1, LV 8.20 is not mature enough for LabVIEW OOP development
2) Keep your files backed up so that you have backups for at least a few versions that have worked. Using version control software such as TortoiseSVN is a good idea.
3) Use Ctrl + Shit + Run on any VI to force LabVIEW to compile all files in memory. Before you do this, open all VIs outside the classes in your project. After forcing compiling save all.
4) Remember that you need to keep all your class hierarchy in memory during development. This means that you need to have ancestor classes in your project in addition to the classes you
    use directly

I try to cover these issues in more detail in my object-oriented programming article series on my blog at Expressionflow in future.

Tomi
--
Tomi Maila
0 Kudos
Message 2 of 2
(2,371 Views)