LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What are these "ghost errors" and how can I get rid of them?

Solved!
Go to solution

Hi everyone, I'm building a labview program and I'm encountering something strange I haven't seen before. I'm using LV 2016 student edition.

 

I usually throw my program together pretty quickly and then go through the error list at the end to just tidy up the errors/etc I've made, usually forgetting to add a tunneling variable for each case, stuff like that, etc. So I'm going through the one I just made, and I have a long list of errors, like so:

 

ghosterrors.PNG

 

So I double click on the first one, for example, and it shows me where on the block diagram the error is. And... it looks like this:

 

ghosterror.PNG

 

And you can notice that the thing that's actually causing the error, the thing with the dotted outline, is not the select structure I have there.

 

At one point I copied and pasted some code, so maybe that caused it...

 

But what is this and how can I get rid of them? I pressed delete when that one was selected and it goes away, and so does the error, but there are a ton of them so this wouldn't really be practical.

 

I tried "clean up diagram" but apparently my PC is too slow/the program is too large, because it crashed LabVIEW. Thanks for any advice.

0 Kudos
Message 1 of 7
(2,960 Views)

If LabVIEW crashes on a cleanup, this is an indication that your VI is WAY too large.  I'm guessing that this is why you are getting the highlighting issue, too.

 

It's NI's way of telling you to refactor your code.  😉

 

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 7
(2,935 Views)
Solution
Accepted by topic author optoelectro

The first thing that I would suspect is that there is broken code behind some structure you are working in. I usually recommend doing a cleanup because it will make sure code doesn't overlap but you could try manually moving the structures to see if the broken things are hidden behind loops or structures.

 

The only other time I have seen this type of thing are when using VI Macros if you were messing with them in your code at all. It's more of a "hidden" feature so if you don't know whether or not you are using them, you aren't.

Matt J | National Instruments | CLA
Message 3 of 7
(2,932 Views)

If I had to bet...

 

You duplicated code more than once over top of itself.

 

Revert and try it again.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 7
(2,928 Views)

hi, thanks for the reply. When you say "too big", in what sense? Too many variables or just too many functions/general stuff?

 

Right now the code is one state machine that has 9 states, and then a few of those states have a kind of sub-state machine in them that have 3 or 4 states... There are a lot of variables I guess, probably 50 or so (it's setting the parameters for several machines).

0 Kudos
Message 5 of 7
(2,911 Views)

@Jacobson-ni wrote:

The first thing that I would suspect is that there is broken code behind some structure you are working in. I usually recommend doing a cleanup because it will make sure code doesn't overlap but you could try manually moving the structures to see if the broken things are hidden behind loops or structures.

 

The only other time I have seen this type of thing are when using VI Macros if you were messing with them in your code at all. It's more of a "hidden" feature so if you don't know whether or not you are using them, you aren't.


Hm, so I just tried the cleanup on a smaller selection (as opposed to having nothing selected and then it tries to clean up the whole diagram, which might understandably take a long time). I selected only a really dinky multiplication thing, like:

 

mult.PNG

 

(that's actually a pic of it after cleaning that selection), and it still takes 3-4 seconds... so maybe my PC just sucks? Because I imagine it would scale way nonlinearly with a more complex block diagram.

 

 

 

0 Kudos
Message 6 of 7
(2,905 Views)

@Jacobson-ni wrote:

The first thing that I would suspect is that there is broken code behind some structure you are working in. I usually recommend doing a cleanup because it will make sure code doesn't overlap but you could try manually moving the structures to see if the broken things are hidden behind loops or structures.

 

The only other time I have seen this type of thing are when using VI Macros if you were messing with them in your code at all. It's more of a "hidden" feature so if you don't know whether or not you are using them, you aren't.


Welp! Sorry to bother you all, but I'm an idiot! Smiley Wink Smiley Frustrated Smiley Embarassed

 

Like several of you suggested, it was indeed identical code behind this code... messy mouse-ing strikes again.

 

Thank you all!

0 Kudos
Message 7 of 7
(2,903 Views)