LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between running within enviroment and externally

I have an Image viewing application, and I have a win32 imageview control, that I add to my main panel. My applications works fine in debug mode and release mode when I run from with the labwindows environment. However, when I run the executable outside of the cvi enviroment or try to make a distribution kit I have problems.

The program runs until I try to display the main panel with DisplayPanel() . The panel id is valid and the panel displays for an instant  and  then the program shuts down straight away not even calling functions like gets() can stop the shutdown. (Why is this ? Is it the runtime shutting down ?). Due to this shutdown I can not get any return errors from DisplayPanel
or RunUserInterface.

PS I can run externally in debug mode.

Does anyone have any advice on how to debug this problem.

What could be different from running in release mode from within the environment compared to running in release mode using a built executable ?

Thanks for any help.

Glenn Pierce
Message 1 of 4
(3,168 Views)
Hi!

   I had similar problems, and in my case the problem was the TAB ORDER!!! That is, the selected button was "stop" button, and if I pressed tab to switch the focus to another button, application stopped....  that is, your exit function may be launched in some way, you can check if this occurs.

   Moreover, the problem shows also when you properly build an executable?? I mean a distribution kit, and not when you create the executable and you abruptly launch the file "my_application.exe".

   I am interested too to the problem of the difference between execution of an .exe while LabWindows is running, and an execution when it is not, so any further post is wellcome!

Graziano


0 Kudos
Message 2 of 4
(3,133 Views)
I found the problem.

After I initialised some variables properley to NULL before I started using them I noticed
that I had a assertion failing.

I thought assertions on removed in non debug code but I guess not.

Anyway the main difference between release and debug mode is the initialisation of variables I believe.

HTH

Glenn
0 Kudos
Message 3 of 4
(3,118 Views)
This seems non to me to be the answer...... you should have the  assertion failing for first during the debug..... 

If you find something more, let me know!

graziano
0 Kudos
Message 4 of 4
(3,095 Views)