LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview program fails to close properly!

I have implemented an event structure which triggers on an Application Instance Close.  All preliminary tests showed that the fix was working; however, after letting the application run for quite some time (4 hrs or so) on its intended machine and then attempting a shutdown of Windows, the application became unresponsive and had to be manually ended.  I'm back right where I started with the same problem.
0 Kudos
Message 11 of 31
(1,611 Views)
Are you not shutting the program down before you exit windows?
If not you need to follow Chris's directions in post 8.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 12 of 31
(1,593 Views)
It sounds like you are on the right track. Now, we need to determine if something in your program is getting stuck, which would prevent it from responding to the event. How many parallel loops do you have in your program? hmm, there are so many things to think about now that it would probably help if you could post some screenshots of your block diagram.

I am pretty sure that if you actually run the Quit LabVIEW function within the event for Application Instance Close, the program will quit. I would guess that for some reason the event is not getting activated. That may mean that the program is stuck in a different event case, or somewhere else in your program.

Chris
0 Kudos
Message 13 of 31
(1,582 Views)
When placed in the 'Application Instance Close' case, initial tests proved the 'Quit Labview' vi to be unnecessary.  When this vi was placed in the event structure and the application was closed using the task manager, the application would become unresponsive.  Attached are screenshots of the events.  This event structure is placed within a single while loop that performs the rest of the application.


Message Edited by Acelhp on 04-09-2008 09:22 AM
0 Kudos
Message 14 of 31
(1,571 Views)
I placed a one button dialog in the 'Application Instance Close' notify event to validate that the program is indeed entering this event structure when attempting a shutdown.  After running the executable for a couple of hours and attempting a shutdown, I observed the dialog appear.  I clicked the OK button and then the program became unresponsive.  It appears to be trying to close, but it's still getting hung.
0 Kudos
Message 15 of 31
(1,534 Views)
Can you post the app so I can give it a try?
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 16 of 31
(1,530 Views)
Would you like the executable or the vi?
0 Kudos
Message 17 of 31
(1,529 Views)
vi so I can debug and try to fix it.
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 18 of 31
(1,527 Views)
Thanks for taking the time!


Message Edited by Acelhp on 04-10-2008 08:55 AM
Download All
0 Kudos
Message 19 of 31
(1,526 Views)
Theres a few vis missing, can u post them?
Get Window Refnum, Hide Window, and Get Window Rect, and Restor Window


Message Edited by TWGomez on 04-10-2008 09:05 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 20 of 31
(1,519 Views)