LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview crashes on Queue

I use a queue to transport data between different VI.

My problem: Labview crashes sometimes.

 

Have created a TestVI. -> The counter stops at 2 ^ 10!! -> No Message , nothing -> Crash

 

I am happy about every Idea.

Thanks Daniel

Download All
0 Kudos
Message 1 of 8
(3,159 Views)

Does it crash with an "out of memory" message?

 

If so, move the Get Queue ref to the outside of the loop so that you are not creating a ref to the queue a zillion times.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(3,153 Views)

Thanks Ben

 

The Idea is to generate the Queue Ref if i need it.
The App run 3-4 Months nonstop!

 

I never read a Guideline: you can't search the Queue Ref more than 2^10 😞

0 Kudos
Message 3 of 8
(3,147 Views)

Then use a Singleton approach and only get a ref if it does not exist. Otherwise use the one you have.

 

Closing the queue ref may also help a bit.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(3,144 Views)

Daniel1978 wrote:

I never read a Guideline: you can't search the Queue Ref more than 2^10 😞


It is more of proper handling of references in general.

1. If you open a reference, close it.

2. There is a limit on how many references you can have since a reference it really just an I32.

 

It sticks in my mind that the number of queue references was limited by something other than the I32 type.  I would have to do some major digging to find that tibit again.  So my guess is that you are just running into that limit.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(3,117 Views)

Just ran your VI in LabVIEW 2016.  The queue reads actually got up to 2^20 and it just caused the program to freeze.  After killing LabVIEW and restarting it, I just added a Release Queue after the Preview Queue and it is running way past that limit (almost 100M iterations).

 

So the lesson learned here:

1. Close your references.

2. It is best not to re-open references if you can help it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 8
(3,108 Views)

@crossrulz wrote:

Just ran your VI in LabVIEW 2016.  The queue reads actually got up to 2^20 and it just caused the program to freeze.  After killing LabVIEW and restarting it, I just added a Release Queue after the Preview Queue and it is running way past that limit (almost 100M iterations).

 

So the lesson learned here:

1. Close your references.

2. It is best not to re-open references if you can help it.


Hit Ctrl+I

That test vi was sourced in LabVIEW 8.6  If I'm not thoroughly mistaken Queues were reworked for LabVIEW 2009.  so comparisions running on modern versions don't really mean much.

 

I totally agree that the references are completely mishandled.  However, the ref to the named queue should return a ref to the named queue (Test for equality to prove its a ref to the same object, cast to int to prove its the same referance to that object)  That "Might" have changed between Pre 8.6  and post 2009.  It has been several years since I've had 8.6 to play with.  (Oh, I have media I just have no machine with that old a version installed)  


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(3,098 Views)

@JÞB wrote:
That test vi was sourced in LabVIEW 8.6  If I'm not thoroughly mistaken Queues were reworked for LabVIEW 2009.  so comparisions running on modern versions don't really mean much.

 The other VI the OP supplied was written in 2015.  Yes, I looked at the version before doing anything.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 8
(3,095 Views)