LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error upon exiting program

Hi,
For some reason, my program displays an error message like "someprogram.exe has encountered a problem and needs to close. We are sorry for the inconvenience" when you exit the program by clicking the X at the top or File-->Exit. This does not happen with application that controls intruments. This doesn't happen before when I had windows 2000. Now I have windows xp, I wonder if window xp can be a problem or something. I have this problem on 2 desktops. One with full installation of LV7.0 and the other with just the runtime engine. All the data comes out correct and the program stops. If I run the VI's, they work fine and exit fine. But when I run and then close the .exe file, I get that error message for all applications. I know I
had ask a similar question before, but I thought this one explains my problem a lot clearer.
Thanks
0 Kudos
Message 1 of 12
(3,776 Views)
Without seeing the code, it's hard to say but usually using the "x" to exit the program is a bad idea. It can leave things open that should be closed like file references, ActiveX controls, DAQ, DLL calls, etc. You might try using an event structure to trap the x and shut everything down or disable it and use a button on the front panel that does the same thing.
0 Kudos
Message 2 of 12
(3,776 Views)
You mean using the quit LabView icon (stop all executing VI and end the current instance of LabView) that is included with Labview under Application Control? But if you use this, you would need another loop don't you? Loop until a button is pressed to enable quit LabView? I tried to go under File, then Exit and I still get an error message, is that a bad way to do it also?
0 Kudos
Message 3 of 12
(3,776 Views)
Quitting (by the file exit, the little x button, the Quit LabVIEW function) abruptly when other processes are active is a bad thing. One difference between closing your main VI while in development mode is that LabVIEW itself is still active. That doesn't happen when you exit your exe. A well designed application should have a front panel quit button that allows for an orderly shutdown. You can make the windows exit functions do the same shutdwon procedure. Look at the shipping examples called Event Conditional Stop and Menu Selection With Events.
0 Kudos
Message 4 of 12
(3,776 Views)
Hi,
With some help, I have narrowed down my problem to a simple block of code. I get the error message after I use this dll. But it only crashes in the *.exe file for some reason. So does that mean that there is a problem with the dll or is it the runtime engine that's got a problem?
Thanks
0 Kudos
Message 5 of 12
(3,776 Views)
I would suspect the dll before the run-time engine. If you have it isolated, can you create a small VI that demonstrates the problem and post that with the dll and any other support files?
0 Kudos
Message 6 of 12
(3,776 Views)
Yup, here ya go, thanks for doing this.
Download All
0 Kudos
Message 7 of 12
(3,776 Views)
two more dll's
Download All
0 Kudos
Message 8 of 12
(3,776 Views)
I may be missing something because I can't get the VI to run because the class is not registered and I haven't been able to register it. What does this do? Where did it come from?
0 Kudos
Message 9 of 12
(3,776 Views)
Hi,
If you try to register the class through the RUN command, it doesn't work. I had to register it using the program attached here and also on this site http://digital.ni.com/public.nsf/websearch/4F811A9B23F1D46E862566F700615B7A?OpenDocument
Look at Registration utility.zip on the bottom of the page. Sorry for any inconvenience.
0 Kudos
Message 10 of 12
(3,776 Views)