03-22-2013 09:16 PM
(Labview 2011) I have a medium sized application that runs just fine within the Labview environment. It uses event trapping for most things and passes longer tasks off to a consumer loop using a queue. Having gotten it to run the way I want, I want to use the application builder to turn it into a stand alone exe that can be distributed. It compiles without any errors or warnings and starts up fine. However, anything that happens via a queue doesn't work. The very first thing that should happen within any of the queues is that it should disable and grey out certain buttons to prevent unwanted behaviour. They don't get disabled and greyed out. So it's pretty clear nothing gets started. The queues also all have error handlers and there's no peep from them. Everything that doesn't use a queue works OK. Is there some kind of option in the application builder I need to activate to get the queues to work properly? The consumer loop does use an enum to figure out what it should do. On the off chance that the queue was mistakenly running the default (blank) case, I stuck a message box in there to warn it was being accessed. No message comes up so there is no indication that it is running the queues at all. The program doesn't hang when it should be running a queue. It just doesn't do what it should. ANy help would be greatly appreciated.
03-22-2013 09:37 PM
Strange. All I can say that I use queues in most of my built applications and they work just fine without any special tricks.
Can you reduce it to a very simple project that still shows the problem and attach it here?
03-22-2013 09:47 PM
The same here. I have used queues in my application with LabVIEW 2011 and I didn't have any problem. I am curious to see how queue is intialized and used in the design.
03-23-2013 12:43 AM
03-23-2013 08:27 AM
03-23-2013 11:30 AM
@rossu wrote:
Thanks for the replies. The answer is a bit bizarre, but might be useful to know. Apparently, in some of the cases in the event structure (producer loop), the Boolean value that gets wired to the stop control in the surrounding while loop was missing. In the Labview environment,this didn't cause a problem (default value?), but in the application it did. Making sure they were all fixed made the issue go away. Interestingly, which events were missing the Boolean and what didn't function were not correlated. The program never got hung in the event loop I.e. the interface didn't freeze.
This does not make any sense either. There should be no difference between development and build. Most of my output tunnels of event structures are only wired in the non-default situations. I suspect there was maybe some corruption and changing the tunnels forced a recompile, clearing things up. No way to really tell.