LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PSA: Bad VIM can cause a "This VI failed to compile" error, and a fix

Solved!
Go to solution

This one is for future Googler's out there, as it has taken me several hours to finally (hopefully...) figure out. The fix was already on the forums but the specific errors that I got were not coupled to that thread.

 

I have a VI that returns a "This VI failed to compile" error. In it, there are a couple instances of a VIM in there that all have broken wires. The VIM itself doesn't show an error in the Error list, and it has a white Run arrow, but I can fix the caller VI if I delete and re-add basically any control in the VIM, then save everything.

 

I've done a heap peek on it, and the *calling* VI has a red item or two called "SelList" that doesn't locate to anything on the front panel or the block diagram (it's definitely on the BDHP window, might be in the FPHP as well). There are vanishingly few Google results for "SelList" causing an issue.

 

The fix had nothing to do with the calling VI that returned the error- the fix was to do a workaround in the VIM (even though it didn't show any errors, just broken wires in the caller VI).

 

This thread gave me the right workaround that finally seemed to fix it. I just had to replace the "Assert Array Dimension Count" function with a "Rotate 1D Array" function (which Assert Array Dimension Count uses internally). Apparently, having a VIM inside a Type Specialization Structure inside another VIM just doesn't act right sometimes.

 

The general fix is to just remove VIM's from internal type specialization structures by replacing them with their actual logic.

 

Hope that helps someone else!

Message 1 of 2
(580 Views)
Solution
Accepted by topic author BertMcMahan

Reply just to mark "Solved" and show the different options:

 

BertMcMahan_0-1690571007528.png

 

0 Kudos
Message 2 of 2
(578 Views)