Showing results for 
Search instead for 
Did you mean: 

Random crashes when in simple while loop runs in subpanel

Hey guys,


I am currently facing an odd problem while developing our company's new test framework.


A bit of background:

The framework basically consists of Producer-Consumer VIs, that contain subpanels to load submodules. In automatic test mode, various test steps are loaded one after the other and I have implemented a simple while loop to allow the operator to have a longer look at the diagram. This is done by a simple while loop (see pic in attachment) that executes at the end of the test step vi (the Prod./Cons. Struct is wrapped in a state machine to serve a clean init and deinit case) as long as a pause button is switched (operating mode: switch by release).


The problem:

In some cases (roughly 25%) pressing the pause button crashes the test step vi aswell as the parent subpanel VIs. The hardware module that runs in parallel (but does not have a frontpanel) does not crash.


And no solution:

Unfortunately I cannot post the framework or parts of it, so I fear that it is hard to give any advice. Until now I was not able to rebuild this issue in a more simple project.

- There are no event structures involved (the while loop is in the deinit case of a state machine with the cases Init->ProducerConsumer->DeInit) that could explain such a crash.

- The control is placed inside the while loop to allow refreshing

- The test step vi is running in two nested subpanels (Main VI with Subpanel -> Test manager with subpanel -> Test step VI)


I have no idea how to go on with searching for the error, so any advice is highly appreciated.


Thanks a lot in advance!!

0 Kudos
Message 1 of 2

A first suggestion would be to throw a bunch of Probes onto the error wire to determine what's throwing an error out.

When you say "crashing", do you mean LabVIEW crashes completely, or that the program aborts unexpectedly?

I'm a little unsure about the Queue being removed, but based on the input condition to the SR, I guess that you're creating a queue per module in the Init case and then cleaning that up at the end. Where does your local variable for the Queue elements go? Do you need to do anything with these?

Is the "Log" with "Close" VI controlling the subpanel insertion (guess based on icon)?

0 Kudos
Message 2 of 2