LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executable does not stop running when closed

You unregistered for the user event, but you did not destroy it.  What happens if you put the destroy events in there also?

0 Kudos
Message 11 of 22
(1,712 Views)

@Ravens Fan wrote:

You unregistered for the user event, but you did not destroy it.  What happens if you put the destroy events in there also?


I removed the shift register for the events because it was giving an error. I destroyed events as well and unregistering, but still have the problem.

0 Kudos
Message 12 of 22
(1,706 Views)

OK in a thousand words-

odd.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 22
(1,698 Views)

@Jeff Bohrer wrote:

OK in a thousand words-

 


That makes sense.

 

I tried making a change, but it's still not working. It does use a global variable setup. Could something along those lines cause the problem? Is there a way to check to see if there are loose ends somehow?

 

Thank you for your help!

0 Kudos
Message 14 of 22
(1,690 Views)

The left loop looks rather dodgy.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 22
(1,689 Views)

@Yamaeda wrote:

The left loop looks rather dodgy.

/Y


I have now removed that loop entirely for the purposes of debugging. Any method of closing closes the front panel, but the thread continues to run.

0 Kudos
Message 16 of 22
(1,688 Views)

Thank you all for your help. Through your suggestions, I've isolated the problem to having another .vi in the build. Even if I do not activate this event, just having it built with the .exe causes the application to not terminate when it's closed. In other words, even if I open the the application and immediately close it, it will not terminate.

 

How can I call on another program but not have this problem?

 

I've included the stripped down, very simple program.

 

Thank you!

 

Problem area.JPG

0 Kudos
Message 17 of 22
(1,680 Views)

Wait till august?

 

Whoops- LabVIEW cannot launch another process and leave it running.  You COULD take the same vi referance and kill process on it through Windows.  Why did you "start it" if it cannot be controled?

 

Perhaps dynamically launching a vi you have no controll over was a poor discision.  Timeout the dratted vi or enable dynamic events in it to close when your app exits


"Should be" isn't "Is" -Jay
0 Kudos
Message 18 of 22
(1,672 Views)

@Jeff Bohrer wrote:

Wait till august?

 

Whoops- LabVIEW cannot launch another process and leave it running.  You COULD take the same vi referance and kill process on it through Windows.  Why did you "start it" if it cannot be controled?

 

Perhaps dynamically launching a vi you have no controll over was a poor discision.  Timeout the dratted vi or enable dynamic events in it to close when your app exits


At least in the non-executable form, this method of passing between programs poses no problem.In the executable, the problem occurs even if the event case that triggers the dynamic launching is never activated. Simply by having the application present somewhere in the code seems to cause the problem.

 

 I want to be able to open a second .vi from this initial program (remember it's goin to be packed into an .exe). Is there a better way to do this than a dynamic reference?

0 Kudos
Message 19 of 22
(1,668 Views)

Just make sure you have the Close reference in the Quit event? I'm not sure, but it feels like it should solve the problem. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 20 of 22
(1,659 Views)