From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2017 SP1 crash without error

Hi, 

I am developing a LabVIEW program for data acquisition. It is using simple state machine frame. The states are moving the RC(IAI) linear stage, take laser power measure, take camera(basler) image, take spectrum and then save all the data. Then it will move to the repeated iteration. (I call this vi  LfTest.vi)

 

I manage to make this vi work without any issue. However, we require to drive two sets of similar systems at once. For driving two stages, I simply use a main VI to send parameters to two instances of LfTest.vi. However running this main VI crashes the LabVIEW program without giving any error message. There was also once or twice, the LabVIEW shows 'not responding' forever. 

 

I have carefully set each subVI included in the main and LfTest.vi as re-entrant, but it gives the same probelm. I also try to create another copy of instance. And put instance1 and instance2 to different project libraries and loaded into the main program. It still behaves the same. 

 

Then, I tried to add 2s delay between these systems (the linear stage run at the same speed), then the system can run for ~5mins, after that, LabVIEW suddenly close again without any error. I am wondering if there is any racing condition issue with my code. 

 

Hopefully, I describe this problem clearly. In general, I would like to know how to avoid the racing condition or potential memory leak or low memory issue with running multiple systems driving numbers of devices. Please advise. Thanks 

 

Below, I attached the snapshots of the main program and each state of the LfTest.vi. 

 

Thanks,

0 Kudos
Message 1 of 4
(2,259 Views)

Do you have a smaller reproducible case? It would be difficult to troubleshoot a generic crash on a large program without any error messages.

0 Kudos
Message 2 of 4
(2,205 Views)

Without more information, particularly regarding the operation of your hardware (C language drivers via Call Library Function Node?) it's difficult to do more than guess, but taking a blind stab I'd ask if memory is being allocated in one process then written to in another (I.e. some block is shared between the two calls and this isn't expected by the driver).

 

Can you give more details about the hardware interaction code? I've recently had similar sounding issues with some of my own wrapper code for a motor controller and found the problem there related to my C code allocating into memory LabVIEW wanted to own. Perhaps similar problems occur when multiple instantiatuons of your hardware are called simultaneously. 


GCentral
0 Kudos
Message 3 of 4
(2,197 Views)

Thanks for all your reply. The problem has been resolved. It’s the wrapper in the loop. The sub vi is trying to initialize all the connected spectrometers and close them after the loop. One instance is fine, but two will condlict with each other.  I move the initilization out of the loop and that solves the issue. 

0 Kudos
Message 4 of 4
(2,189 Views)