I'm experiencing a very complex issue with my program. Actually, it's about queue. I have simplified my VIs at the maximum but I still get an issue.
Issue : the program can't exit all while loops because the queue doesn't work anymore.
How to get it ? : You have to run the program as much as you need to get this issue. So : Run, Quit, Run, Quit etc...Sometimes, you have it, sometimes not.
A kudo to the winner !
Solved! Go to Solution.
I'll earn my Kudos.
When you start you enqueue Init to both consumer loops. One by one those loops will dequeue the init command and start waiting for the next command. Well the first loop that iterates will start waiting for a command. The second loop needs to wait untill the other loop recieves a command before it can start waiting. since the other loop is running the non-reentrant sub-vi that dequeues both queues.
A classic lock-up condition!
Make the dequeue function re-entrant prealocate clones. so that each loop can run its dequeue function clone in its own dataspace
You're completely right and I'm disappointed that I didn't find it !
In conclusion, it seems that the forum is much powerful that NI support => 1 months with 5 french ingeneer + sending to US team and they didn't find it...And on the forum 30min !!
I'm also a little bit disapointed about that because the forum is free ...
Thanks a lot, I now know all about my error.
Don't think that the NI Engineers don't know what they are doing - especially since many of them are here answering the questions in the forums - but the forums have the unfair advantage of pooling the intellectual resources of everyone in the forum. 🙂
To be bluntly honest.
I took me some time to find that same problem the first time I ran across it. I bet the next time YOU see it, it will be much easier to find.