LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application crash only in exe file

Hello all,

 

I'm working on an application which have to get multiples images images from a camera, the application have to treat each image and calculate some datas.

 

I'm facing a very vicious problem, I tested my application in my LabVIEW project, so when i run my main VI, the application works perfectly. But when i make an executable, the application doesn't works correctly. The problem i have when i run the exe file is :

- I launch my exe file, and every things works perfectly, i have acces to all my panels, all functions are OK.

- I configure a test to get 2000 images and data associated.

- Each time, the application stopped working when it reach 320 images, whereas when i run the same code in my LabVIEW project I can get all the 2000 images. Once i did a test to get 50000 images, it worked through the LabVIEW project... The application stopped working so brutally that i have no LabVIEW errors, so no lines in my log file.

 

First i thought that it was a memory issue, so i checked my memory. My application uses in the worst case about 350 Mo (350 through LabVIEW project and 300 through the exe file), I used the task manager and the ressources monitor to have this number. Then i thought that it was due to the processor, maybe my application uses to much ressources from the processors, but my application uses about 50% of my processor (50 % for the LabVIEW project and for the exe file), so there is no reason that only the high use of the processor crashes my application.

 

I also thinks my application crashed because there is a lot of files created on the hard drive. When the application get an image, it save the image on a file, and the application also compute the image and write results on a different file. Maybe there is a kind of security in Windows which doesn't allow an unknow exe to write so much on the hard drive.

 

I really don't have any idea, can you help me ?

 

Thanks

 

0 Kudos
Message 1 of 5
(3,350 Views)

A well-written LabVIEW program will exit either (a) when it finishes executing everything it was asked to execute or (b) when an "abnormal situation" forces an unexpected (and often unprogrammed-for) "exception", often leading to a Program Abort (sometimes with Error Messages that can be helpful).

 

You haven't said much about the circumstances of your "Application crash" -- how do you know it is a "Crash"?

 

Is your LabVIEW code (which we haven't seen) well-designed, using Error Wires "almost everywhere" and having proper Error Handlers to help you "control" potential Error conditions?

 

What else runs on your PC?  One difference between the LabVIEW environment and an Executable is whether or not the LabVIEW Development System is running, interacting with a User, letting Windows "know" that the Computer is "in use" and shouldn't "go to sleep" or "hibernate" or "do background bookkeeping tasks".  Could this be a factor?

 

For more specific help, we need more specific information, such as a Zip file containing the Project Folder (and all the VIs) for this Project.  Absent this, you might consider hiring a LabVIEW Consultant to take a close look at your code.

 

Bob Schor

0 Kudos
Message 2 of 5
(3,324 Views)

Of course a well written LabVIEW program should exit properly and should log at least errors in a log file.

 

I asked to some collegues who work with others languages, what they think about my issue. They gave me some ideas, and i think my problem is solved.

 

I didn't gave you an information which wasn't relevant to me at the beginning, I use 20 DLL in this application, these DLL are made by the camera constructor. The constructor also made some VI to use these DLL, so I only have to use all VI they created. All these DLL contains C++ code.

 

In my project, I have a folder where I saved all these DLL. I included this folder in my exe file and now it works properly.

 

First I didn't thought that the issue was caused by the DLL, because i can read 320 images. I checked my results files and they are well filled.

0 Kudos
Message 3 of 5
(3,317 Views)

I have found that in the majority of instances where compiled code fails but the same code runs fine in the development environment there is a race condition someplace in the code.

 

Other times it was more obscure like file permissions and locations or differences in DLL's on the target machine

========================
=== Engineer Ambiguously ===
========================
Message 4 of 5
(3,309 Views)

Can you please explain more as i have same issue
sometimes the exe suddenly stops no crash report no nothing
How does it work if the dlls donot exits for 320 images ?

 

thanks

0 Kudos
Message 5 of 5
(740 Views)