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

Dr. Watson error again

Status
Not open for further replies.

IRABYY

Programmer
Joined
Apr 18, 2002
Messages
221
Location
US
Fellows,

same nuisance again, Dr. Watson error. As before, it gives me two message boxes, one of them reading the same:

&quot;<process has already exited> has generated errors and will be closed by Wondows. You will need to restart the program. An error log is being created.&quot; - under the banner &quot;Program error&quot;;

And another one, reading this time:

&quot;Dr. Watson was unable to attach to the process. It's possible that process exited before Dr. Watson could attach to it.

Windows 2000 returned error code = 87
The parameter is incorrect&quot; - under the banner &quot;DrWatson Fatal Error&quot;.

Program is written in VFP 7.0 SP1.

Hard as I tried I could not determine what exactly parameter this thingy is talking about. My program exits by just QUIT after
Code:
ON KEY
CLOSE DATA ALL
SET PROCEDURE TO
SET LIBRARY TO
CLEAR DLLS
= SYS(1104)
RELEASE ALL EXTENDED LIKE gl*, gc*, go*, frm*
ON ERROR
statements.

This nuisance happens only on WinNT 5 machines (regardless of the SP installed) and never on Win95...WinME, neither on WinNT 4 or WinXP.

Redirecting the TEMP and TMP environment variables to point onto WinNT\Temp folder (instead of pointing onto \Documents and Settings folder) helped only to a certain extent. Dr. Watson error does not spring up if you launch the program, play with it for a short time (3-5 minutes) and exit.

If you stay in the program for extended time (say 15 minutes or more) it may or may not give you this error.

But for the 2nd, or 3rd, or Nth time it will happen for sure.

I think it has something to do with the memory allocation and/or usage in these WinNT 5, but I cannot say it for sure.

Any hints, anybody? Or any tools in VFP 7.0 for determining the bottleneck in my program that possibly can cause this behavior?

Regards,

Ilya

 
Fellows,

this time around I managed to defeat MS on my own:

this Dr. Watson error was apparently caused by the
Code:
= SYS(1104)
command. Once I put it into a definite cycle with conditional exit, like
Code:
FOR I = 1 TO 1000
   lnRet = SYS(1104)
   IF TYPE('lnRet') = 'C'
      IF VAL(lnRet) = 0
         EXIT  && FOR...NEXT cycle
      ENDIF (VAL(lnRet) = 0)
   ELSE
      IF lnRet = 0
         EXIT  && FOR...NEXT cycle
      ENDIF (lnRet = 0)
   ENDIF (TYPE('lnRet') = 'C')
NEXT I
this Dr. Watson error has gone away!

Note how this &quot;small company in Redmont, WA&quot; is trying to screw up us, programmers yet again (the following is copy-pasted from MSDN help page for SYS(1104) system function):

Purges memory cached by programs and data.

SYS(1104)
Returns
Numeric. 0, if successful


And don't you believe it, my brothers in arms! ([smile]) Yes, SYS(1104) returns a number by as a type STRING, not INTEGER!

With that - have a nice day and Happy New Year to everybody!

Regards,

Ilya

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top