Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtimes/EXE fails to run

Status
Not open for further replies.

k2a

Programmer
Jun 26, 2012
133
DE
When starting the app.exe it fails to run. It seems that the app gets killed immediately because I do not see it in the Windows task manager.

I created many runtimes and exe before the very same way without any problems. But after making a bunch of changes to the new app version it now fails.

The difference between the previous working app version and the new one are these: performed many changes at some forms, also made changes in the menu and data tables. The new app version runs fine when starting it from the main.prg on the development system. There are no errors when the exe and setup.exe files are being generated. I use Inno to create the setup.exe file. The runtimes and the exe are installed in the same folder.

The runtimes/exe folder is installed on different systems but the database is located on a server system. When any changes are made on the database the data on server are also replaced along with the new app version.

What could I do to find out the reason why the new version fails?
Any help will be appreciated.

Klaus
 
Sorry, I don't get why EVENTTRACKING doesn't work now. Perhaps try within the IDE first.

Your log files vary a lot in how they end up. Now we're ending in do(), line 9.
What's the code in the DO method?

Bye, Olaf.
 
The EVENTTRACKING file c:\temp\EventTrack_v20.log will be created running the app within the IDE.

In the DO method usually there is just one statement a READ EVENTS, but right now there are some addional lines that what you told me to do.

exapp.do methode
_cliptext = ''
KEYBOARD '' CLEAR
DOEVENTS FORCE
READ EVENTS

Regards
Klaus
 
Your log shows line numbers 1,6,7,8,9, that's five lines. There is one missing?

Bye, Olaf.
 
Below are the lines from log running in IDE mode, here the app runs correctly.

0.000137,exapp,exapp.createtoolbar,16,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,3
0.000040,,mahnwesen,62,c:\allg-vfp9\appl\mahnen\progs\mahnwesen.fxp,1
19.893592,,mahnwesen,63,c:\allg-vfp9\appl\mahnen\progs\mahnwesen.fxp,1
0.002976,exapp,exapp.do,1,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
0.000475,exapp,exapp.do,6,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
0.000130,exapp,exapp.do,7,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
0.014376,exapp,exapp.do,8,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
19.854399,exapp,exapp.do,9,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
0.453505,,on selection bar,,,3
0.423328,,_3l819i5ch,365,c:\allg-vfp9\appl\mahnen\menus\mahnwesen.mpx,4
0.002042,,embossedform.dataenvironment.beforeopentables,1,c:\allg-vfp9\appl\mahnen\forms\reaktion.sct,5

One reason why eventtraching file is not create when running app.exe could be that the READ EVENTS fails.
What do you think moving the READ EVENTS into the main.prg?
The same could be done with the DO menus\mahnwesen.mpr

Klaus
 
Hi Olaf,
I just modified the main.prg from my previous good app and inserted the same code to create the EVENTTRACKING and COVERAGE log files.
The outcome is that here as well only the COVERAGE log file has been created. So my assumption that the READ EVENTS failed is wrong.

Something inside my new app causes the failure. I created both setup file with very same Inno script file.

Regards
Klaus
 
You always talk about inno. What about making a test on the dev machine, just starting the exe there?

READ EVENTS is not capable to fail, it's just a wait state. There has to be something triggering shutdown in some event queue or buffer, which acts after read event put's foxpro in the mode to process the event queue.

Bye, Olaf.
 
The exe fails already on the dev maschine I always install it first there. The previous version works on the dev maschine and the new version fails.
I found that the config.fpw file was different to the one of the previous version, so replace it with this file. Then I replaced the exbase.vcx with the one of the the previous version.

But nothing changed, its becoming a nightmare.

Below are the lines when the DO method is loaded from the good previous version:
0.000030,,mahnwesen,59,c:\program files\bfs-mahnwesen\mahnwesen.exe,1
0.000014,,mahnwesen,61,c:\program files\bfs-mahnwesen\mahnwesen.exe,1
23.578508,,mahnwesen,62,c:\program files\bfs-mahnwesen\mahnwesen.exe,1
0.003432,exapp,exapp.do,1,c:\program files\bfs-mahnwesen\libs\exbase.vct,2
23.547409,exapp,exapp.do,7,c:\program files\bfs-mahnwesen\libs\exbase.vct,2
1.348500,,on selection bar,,,3
1.338672,,_3l9042zoq,316,mahnwesen.mpx,4
0.000064,,embossedform.dataenvironment.beforeopentables,1,c:\program files\bfs-mahnwesen\forms\reaktion.sct,5

And here are the lines the DO method is loaded from the current version after the changes mentioned above:
0.000032,,mahnwesen,45,c:\program files\bfs-mahnwesen\mahnwesen.exe,1
,,mahnwesen,46,c:\program files\bfs-mahnwesen\mahnwesen.exe,1
0.000048,exapp,exapp.do,1,c:\program files\bfs-mahnwesen\libs\exbase.vct,2
,exapp,exapp.do,7,c:\program files\bfs-mahnwesen\libs\exbase.vct,2
,,on shutdown,,,3
0.000036,,appquit,59,c:\program files\bfs-mahnwesen\mahnwesen.exe,4
,,appquit,60,c:\program files\bfs-mahnwesen\mahnwesen.exe,4

Regards, Klaus
 
It would always help to know which code is in which line, otherwise we can only see the difference is in the shutdown.
So let's see the code inclusing it's line numbering.

And what's in config.fpw?
Have you tried just starting the EXE from the development folder, not after installing?

Bye, Olaf.
 
Both version have the same DO method, the same main.prg and the same config.fpw

The DO method:
CLEAR
*Test zur Begutachtung des Datumsformats
*? 'Programm wurde gestartet:'
*? DATETIME()

*Start der Ereignisverarbeitung
READ EVENTS

This config.fpw is now used, just delete the comments.
SCREEN = OFF
TITLE = Mahnwesen
_STARTUP = ""
_BROWSER = ""
_SPELLCHK = ""
_GENMENU = ""
_GENGRAPH = ""
_GENXTAB = ""
_COVERAGE = ""
_SCCTEXT = ""
_CONVERTER = ""
_TRANSPORTER = ""
_BUILDER = ""
_WIZARD = ""
MVCOUNT = 1025
OUTSHOW = ON
RESOURCE = OFF
_THROTTLE = 0
TALK = OFF
MULTILOCKS = ON
EXCLUSIVE = OFF
SAFETY = OFF
DO C:\Program Files\VFX90\builder\vfxmnu.app <<<< this line has been deleted in my new config.fpw I don't use VFX90

When starting the EXE from the development folder, both version donot run, but can only run it once. On the 2nd start a error message tells me that access to the log file is denied. The log file is locked and I'm forced to reboot the system to free them. Is better way to release the log files again?

Regards, Klaus
 
Sounds like it is running, but you can't see it, which is a bit different.

Run it once, then check with taskmgr to see if the instance is still there.

Might be in apps or processes - most likely processes

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
No the taskmgr does not the apps processes, i checked that already.

Regards, Klaus
 
Hi Olaf,

Just want to make sure there is no misunderstanding.
You asked "Have you tried just starting the EXE from the development folder, not after installing?"

So i started the exe from the explore so both apps quit.
Starting the apps from vfp project manager both version run with no problems.

Klaus
 
Sorry Olaf,

I made a mistake. Both apps appear in taskmgr and when the process is stopped then the log file can be accessed.
However, both version do not display the app menue so there is no way to open something.

After stopping the apps within the taskmgr, the log files look a bit different at the end.

Old good version starting the EXE from the development folder:
0.000025,exapp,exapp.createtoolbar,16,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,3
0.000030,,mahnwesen,57,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
0.006100,,mahnwesen,58,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
0.000022,,mahnwesen,59,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
0.000015,,mahnwesen,61,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
,,mahnwesen,62,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
0.000039,exapp,exapp.do,1,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
,exapp,exapp.do,7,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2

New version starting the EXE from the development folder:
0.000025,exapp,exapp.createtoolbar,16,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,3
0.000033,,mahnwesen,45,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
,,mahnwesen,46,c:\allg-vfp9\appl\mahnen\mahnwesen.exe,1
0.000043,exapp,exapp.do,1,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2
,exapp,exapp.do,7,c:\allg-vfp9\appl\mahnen\libs\exbase.vct,2

Regards, Klaus
 
So they are running but you can't see them.

The screen mus be off

Remove the SCREEN = OFF from your config.fpw

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
SCREEN=OFF

Yes, Griff has got it. Your main form needs to have ShowWindow=2 (As Top Level Form), only those forms show outside the screen and don't depend on the _SCREEN to be visible. If that's not the case, of course you don't see anything with SCREEN=OFF in your config.

So your log files so far just had a on shutdown line, because you did kill these in the task manager so far? Why didn't you tell that. I assumed the apps shutdown on their own.

Nothing was wrong all the time, you just made your app invisible.

Bye, Olaf.
 
Hi Olaf, hi Griff,

You both are my heroes. Finally your insistency and patience with me became a full success, congratulation! This side is really incredible and must be supported which I will do right away.

Thanks, Olaf I learned quit a lot from your posts. Starting the exe from the development folder is a tremendous shortcut.

Regards, Klaus
 
The mystery continues, I'm afraid.

If that's all you changed, it should never have worked at all! <sigh>
 
Well Dan,

There are two possibilities: Either the earlier version had a different config.fpw, or in that earlier version a form was started with ShowWindow=2.
One of the things must have changed.

The hint that would have helped is to state the EXE process can be found in the Task Manager. But indeed Klaus told us: "It seems that the app gets killed immediately because I do not see it in the Windows task manager." That was very misleading. If the EXE is found there, _SCREEN.Visble or SCREEN=OFF would have been my first guesses.

Bye, Olaf.



 
Dan,
Yes it is a mystery that all my older versions started and displaying the app menu also all those had SCREEN=OFF in the config.fpw, just checked that. I feel somewhat guilty because I gave Olaf false information. As the new version failed to display the app menu my wrong assumption was the program has stopped.

Later as we started to create log files I was wondering about the access denied message, also in the taskmgr there was no apps shown. Later as Griff mentioned to look also for processes in the taskmgr i finally found my process among all those many other processes.

Fact is that all older versions run the app correctly and failed when starting the EXE from the development folder. However the new version failed in both cases. I’m not going to investigate that conflict any further. I can live with that mystery.

Finally thank you all for interest and help of cause.

Regards, Klaus
 
>in the taskmgr there was no apps shown. Later as Griff mentioned to look also for processes in the taskmgr i finally found my process

OK, that explains that. The Applications tab of task manager only shows visible app windows, what a user expects. The process tab is showing all and that's where you should look in the first place, as a developer. You also only find automated instances of office applications there and many other stuff of course, also the many system processes.

If your previous app runs with SCREEN=OFF setting, then take a look at the form starting, what it has set in it's ShowWindow property. You must have fiddled with that, or you started a new form without making that setting there.

In that matter you better have some framework form classes, that have the minimum of functionality in them, eg a main form, which in case of no screen must be "As Top Level Form". Also with a close button code not only exiting the form, but also clear events or quit in it. A sysinfo form on the other hand should have a close button only closing the info form by calling release.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top