LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exe encounter problem

Hi,

I get the following error when I try to run my .exe files. "some program.exe has encountered a problem and needs to close. We are sorry for the inconvenience." I noticed in one exe, I get this problem after I successfully ran the application, then close the application and the error message will pop up. On two other applications, this error appears when the exe just started running. If I just run the vi's of these application, I get no problem at all, but I need for the executable program to work though. Help, please!

Thanks.
0 Kudos
Message 1 of 25
(3,835 Views)
When building the exe. are you sure you are including all of the files.It sounds to me like something is missing from the build.

trying to help.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 25
(3,835 Views)
Yea, all the files are included. One of the applications is working perfectly and display right result until you hit the exit button. Then the error message appears.
0 Kudos
Message 3 of 25
(3,835 Views)
Do you have an actual exit button that you created or are you using the x in the top. also if it is not to much trouble could you post some code.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 25
(3,835 Views)
Also, this text file appcomptat.txt was generated with the error:





















0 Kudos
Message 5 of 25
(3,835 Views)
I just hit the x at the top. I cannot post the code because it's very big, sorry! But I tried to make application out of only part of the code and it works ok.
0 Kudos
Message 6 of 25
(3,835 Views)
Hi analog,

If you are closing the application by using the "X" button at the top right corner, you are probably getting this error because your application is not cleaning itself up correctly. You shouldn't be closing the app with that X. Rather, have a Stop button or Exit button to quit the application. This way, it gives the app the opportunity to clean up memory space it used and deallocate as necessary. I have a feeling that your error may be related to this.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 7 of 25
(3,835 Views)
Hi,
I have narrowed my program down and found that this error is generated when I tried to call a dll. I have included the dll and some code. I have use this code with windows 2000 before and with this dll and everything is hunky dory, but now that I put Windows XP OS on my computer, the exe is the only thing causing a problem, the VI is still working fine. I have another exe file which I created to parse an xml file and that exe doesn't give me any error upon closing, so I am thinking that the dll is a problem. If anyone has windows 2000, can you use my code to build an exe and then post it here so maybe I can test to see if there is any difference? Thanks. http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000
2CA80100&HIsQuestionPoster=Yes&HTHREAD=000108588&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
I still don't understand your Stop button or Exit button concept though. My program stops completely and you can re-run it with the RUN button at the top, doesn't that mean that the program has stopped? I don't understand how I would implement this STOP button idea without using another loop outside or an event structure. But either way, it would seem like extra unneccesary code, right?
0 Kudos
Message 8 of 25
(3,835 Views)
Yes, pressing the X button stops the program and you can rerun it, but doing that doesn't necessarily mean it cleans up all of the memory allocation that it did. By using a stop button (which would be just a large while loop around your whole block diagram), you allow labview time to deallocate memory it used for this application, rather than having a forced sudden stop. also, your dll may be doing some allocation of memory so that when you close your program, that memory the dll accessed may not have been deallocated as well.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 9 of 25
(3,835 Views)
Hi,
I use a stop button now but it still doesn't take care of the error message. It still pops up.
Thanks for trying to help.
0 Kudos
Message 10 of 25
(3,835 Views)