LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queue becomes invalid after entering event structure

I'm performing the exercises for the LABVIEW CORE 3 chapter 4.  It's pretty straight forward, but I started having problems and I can't explain why this is an issue.

 

Probes show that the queue refnum is valid before the wire enters the event structure, but becomes invalid when it enters the structure.  I even made an event case that doesn't do anything other than pass the wires through it unaltered.  Any ideas? 

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 5
(2,302 Views)

Nevermind, I figured it out.  There isn't an option to delete my question though.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 2 of 5
(2,295 Views)

So, what was the problem?  Your answer might help someone in the future.

 

I don't think that picture of a very small part of your block diagram was enough for anyone to have helped you.

Message 3 of 5
(2,290 Views)

A queue will become invalid if an error causes it to be destroyed anywhere else in the code.  The pains of parallel processing.  It would be nice if LabVIEW had more information in some of the error codes.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 4 of 5
(2,239 Views)

It could also happen if it passes through a FOR loop that iterates zero times and the wire isn't in a shift register.  An auto-indexed array that is empty will do that.  In this case, the reference going in is valid; it's the ref coming out that is just a reference with a default value of zero.  (This isn't limited to references, either.)  A shift register guarantees that what goes in the left side of a FOR loop comes out the right side.  If you thought hunting down where a reference was closed is hard to do...

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.
0 Kudos
Message 5 of 5
(2,223 Views)