09-09-2014 12:07 PM
Hello,
i added a small vi-popup at beginning of my program where user can select between 3 buttons. The fourth button is Exit that should exit the application.
For this i added the "Quit Labview" = True.
It works fine in developer-mode but when i run it in the application exe-file this creates the following exception:
Why is this not working in a application?
Is there a better thing to quit the program?
Thx
09-09-2014 12:16 PM
OnlyOne wrote:Is there a better thing to quit the program?
Let your program stop normally. This means getting your code to where there is nothing else to run. It could be as simple as just stopping the loop in that dialog and letting the VI finish. You should then also close the front panel. Avoid the Quit LabVIEW and the Stop functions like the plague. They are the same as hitting the abort button in the toolbar.
09-09-2014 03:31 PM - edited 09-09-2014 03:33 PM
The problem is that this is sub-vi Nr 2 of 10 that are all connected in a row with the error in/out.
That means i would have to put the other 8 sub-vis inside a case-structure and give the "close"-vi an output to feed the case.
It is simpler to just kill the whole LV.
####
#Date: Di, 9. Sep 2014 19:08:43
#OSName: Windows 7 Ultimate Service Pack 1
#OSVers: 6.1
#OSBuild: 7601
#AppName: XXXXX
#Version: 13.0.1 32-bit
#AppKind: AppLib
#AppModDate: 09/09/2014 16:53 GMT
#LabVIEW Base Address: 0x30000000
starting LabVIEW Execution System 2 Thread 0 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
starting LabVIEW Execution System 2 Thread 1 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
starting LabVIEW Execution System 2 Thread 2 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
starting LabVIEW Execution System 2 Thread 3 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
<DEBUG_OUTPUT>
09.09.2014 19:08:44.496
Crash 0x00000000: Crash caught by NIER
File Unknown(0) : Crash 0x00000000: Crash caught by NIER
minidump id: 02df131c-8b0b-4227-860a-d1f27df161c8
ExceptionCode: 0xC0000005
</DEBUG_OUTPUT>
0x30761D96 - lvrt <unknown> + 0
0x3076211C - lvrt <unknown> + 0
0x7C37FDB4 - MSVCR71 <unknown> + 0
0x75A40303 - kernel32 <unknown> + 0
0x77E174FF - ntdll <unknown> + 0
0x77DD9F45 - ntdll <unknown> + 0
0x00000000 - <unknown> <unknown> + 0
09-09-2014 03:34 PM - edited 09-09-2014 03:36 PM
Quit LabVIEW is really more equivalent to Kill LabVIEW. It is indeed the same as pressing the abort button and as an analogy about the same like stopping your car by crashing it in a wall. Effective but not very nice!
It doesn't allow your application to close resources properly and some third party external drivers take that rather personally by crashing the process that created resources in them.
09-09-2014 03:48 PM
@OnlyOne wrote:
It is simpler to just kill the whole LV.
It is simpler to use a GOTO than to re-write the application design but we all know how that goes.
Have a proper clean-up. Give the application a chance to release resources, and close references.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-09-2014 04:51 PM
If it is causing too many problems to terminate a program properly, that is a problem that you need to fix. Using the Quit LabVIEW function is masking a larger issue.
Mike...
09-09-2014 05:08 PM
@OnlyOne wrote:
The problem is that this is sub-vi Nr 2 of 10 that are all connected in a row with the error in/out.
Two simple solutions here.
I recommend going with #1.