LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reentrant vi crashes 7.0 development environment

I have had a recent issue that has stumped me.  I have a complex data analysis routine which that an array of data streamed over a queue (this is feed from a file in chunks but will linked to a DAQ sub-system eventually) and analyzed it using a naive Bayesian network for patterns in the data.  One vi is which is called often inside  a loop is responsible for part of the analysis, I marked as reentrant.  I set this for reentrant because this algorithm is innately parallel and I want to split it to many threads for future distribution.  For not the vi does not have to be reentrant though.  The issue I have is when I run the application in the development environment the Labview crashes and a typical application bug report is displayed.  Oddly enough running a compiled version with the same inputs does not have this issue.  Also when I make the subvi not reentrant the system no longer crashes.  I am using LV7.0 and windows XP..I can not post this code unfortunately.  Has any one experienced similar problems?  Is there any specific restrictions to reentrant vi I should have picked up?
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 1 of 4
(2,793 Views)
" Is there any specific restrictions to reentrant vi I should have picked up?" that restricts operation to run only a compiled form?
 
Not to my knowledge.
 
Look to what is different between the environments and we should find the answer.
 
Debugging is not allowed on re-entrant VI's so I should rule that out.
 
The exe run-time is different.
 
No compiling is possible run time engine so a mass compile may make a difference.
 
If you comment out the fancy math do you still have an issue?
 
How much can you comment out and still get the crash?
 
What is the nature of the crash message?
 
Re-entrant VI's take up more memory, does reducing your data set make a differnece?
 
I would like to see a stripped down version that demonstrates this  behaviour. I would also not be suprised if you end winning yourself a shiney new CAR (Corrective Action Report) if we can reproduce this in LV 7.1.
 
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 4
(2,775 Views)

Ben, thanks for the help, I can attach the VI which caused the crash, it is not a complete program, just the offending function.  When this function was marked reentrant it caused a crash in the labview 7.0 development environment.  I also marked it for garbage collection (could this be a problem?) since this vi is called in a loop and each copy requires a modest amount of memory allocation. The function takes an input array on the order of Nxd and another vector of size d, where N is usually 10^3-10^5 and returns a 2d array of size Nxd.  This function is called 1000's of times as fast as possible.  Essentially what is is doing is finding how well a point in d-dimensional space fits in a set of predefined points in a set (it is a parzen kernel).  I think this is the function killing my system.  When I either compiled the system or removed the reentrant flag setting the system no longer crashed.  The system is complex with 4 concurrent threads in a producer consumer pattern if this could cause the problem.  When profiling the system with the task manager there was no noticeable increase in thread counts, handles or memory allocation, so I don't think it is a leak.  Is there a maximum number of copies of a reentrant vi calls in labview or any other known bugs.  I have never had a problem like this before, but I also rarely make my vi reentrant.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 4
(2,760 Views)

Hi paul

I just made a simple vi, which calls yours. I fed in the arrays (1 x 1000 and 1000 x 10000) and had no problems. When I tried to resize the 2d array to 1000x100000 I got an out of memory message, but LV did not crash.

I also use LV 7.0 on Win XP.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 4 of 4
(2,754 Views)