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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unrecoverable loop

Status
Not open for further replies.

ajpa

Programmer
Jan 31, 2002
52
GB
I wonder if anyone can rescue me from this?

My application can be run by all intranet users from a central server. It consists of one window that I've made the top window, and I've hidden the screen. This means that the active window has to be modeless, and I've had to issue READ EVENTS in the calling program. Because the screen isn't visible, I had to put CLEAR EVENTS in all terminating buttons, and, originally, I disabled the close button of the window so that you were forced to exit via one of the terminating buttons, thereby ensuring that FoxPro got shut down properly.

One of the things you can do is to browse the database, but because it tries to make the browse window bigger than the active window, I had to enable the maximise button. When you use that on the browse window it hijacks the controls of the active window, and the only way to clear the browse window was to re-enable the close button of the active window. Unfortunately it turns out that pressing the only visible close button closes both the browse window AND the active window, and I hadn't put a CLEAR EVENTS in the destroy event of the active window.

So FoxPro has locked up on the server. Any terminal running the program cannot be closed down because it gets a 'Cannot Quit FoxPro' message, and you have to resort to hold the power button off for 5 seconds. Well, that's sort of OK, though tiresome, and the main server seemed at first to be happy to keep on opening fresh FoxPro sessions. But it's now becoming fractious.

The Administrators in their most draconian mode can't remove the offending .EXE file, and I can't get rid of it from DOS either - you just get a sharing violation message. The Network manager says that the only thing to do is to re-boot the server, and he's not terribly happy about that. As a short-term measure I've put a new version of the application on the server and suggested the the users (happily only about a dozen at the moment) that they create a new shortcut and delete the old one. But what I'd really like to do is to remove the offending program. Does anyone know how to get out of a READ EVENTS loop when you haven't got a screen to put a command window on?

Tony Ayres
 
on the shutdown event try to put clear events. you can have a shutdown procedure on your main prg.

on shutdown do <program>

program procedure
clear events
release all extended
quit

hope this helps
 
That'l certainly be very useful in the future: I hadn't encountered ON SHUTDOWN before. Thanks.

It doesn't actually get me out of my present trouble because the program is already running and I can't get at the .exe file to modify it. What I need to do is to shut down a FoxPro session (or several) that is already running!
 
Hit CTL + ALT + DEL. See if your program shows up in the window. If it does, select it and choose &quot;End Task&quot;. You may get the &quot;Cannot Quit Visual FoxPro&quot; message, but you will be asked again if you want to close the program. Say yes, and you are out.

Good Luck,
Steve
 
Thanks for this.

It gets me out of the current session, but there are by now several sessions running that have been escaped from by switching the relevant terminal off. The trouble stems from the fact that the system seems to use both the terminal and the server. I thought I might try removing all the support files from the server, but I can't shift Foxuser while it's still in use, although I can remove the libraries. It's the server I want to clean up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top