I'm going to post the exact code this program does which causes the "2nd build lock-up". Is there anything which would cause a memory leak, or am I improperly closing the program, or is there any other error I'm committing? (This may also correct this no-information VFP crash that I'm still trying to tackle, which is why I'm posting over two months after the original post...)
Since this is a production program, I'd like to correct this problem as soon as possible. Any assistance is still appreciated, as always.
-----------------
OPENING PROGRAM
-----------------
* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
* TEST FOR MAINTENANCE MODE
* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *
SET PATH TO .;..\common;..\security;.\database
TRY
OPEN DATABASE ..\security\pin SHARED NOUPDATE
USE ..\security\pin!apps IN 0 SHARED NOUPDATE
errorflag = .f.
CATCH
WAIT WINDOW AT 27, 50 'Unable to access PIN!APPS.dbf' TIMEOUT 1
errorflag = .t.
ENDTRY
IF errorflag
RETURN .f.
ENDIF
SELECT mainttrigger ;
FROM apps ;
WHERE appid == '****' ;
INTO ARRAY laMaint
SELECT apps
USE
CLOSE DATABASE
PUBLIC glMaintmode, gcMaintCntl
glMaintmode = .f.
gcMaintcntl = laMaint[1]
IF FILE(laMaint[1])
lnHandle = FOPEN(laMaint[1])
IF lnHandle >= 0
lcRec = FGETS(lnHandle)
lcWho = FGETS(lnHandle)
lcWhen = SUBSTR(lcWho, AT(' @', lcWho)+2)
lcWho = SUBSTR(lcWho, 1, AT(' @', lcWho) -1)
ELSE
lcRec = 'Unknown.'
ENDIF
=FCLOSE(lnHandle)
WAIT WINDOW '***' ;
AT 20,50 TIMEOUT 5
WAIT WINDOW '***' AT 20,50 TIMEOUT 3
* test for alt + F1 for bypass of maint mode
glMaintmode = .t.
IF LASTKEY() # 104
RETURN .F.
ENDIF
glMaintmode = .f. && no maint mode if code given
ENDIF
** ESTABLISH POSSIBLE FILES AND THE LOCATION (AKA PATH)
** USING THE CONFIG FILE
SET PROCEDURE TO start
CLOSE TABLES ALL
PUBLIC gclaflaf
PUBLIC gcUser, gcOffice, gcOktoplay, gcAuth_off
PUBLIC gcCards, gcOffices, gcSWOffices, gcSWCards
PUBLIC gcHunt, gcCompany, gcMaster
PUBLIC gcOktoplay
gcUser = GETENV("name"

gcEditor = 0
SET SYSMENU TO DEFAULT
SET CENTURY ON
SET CENTURY TO 19 ROLLOVER 60
SET TALK OFF
SET EXCLUSIVE OFF
SET REPROCESS TO 10 SECONDS
SET STATUS OFF
*set gclaflaf for report preview if set to logical
IF TYPE('gclaflaf') = 'L' AND gclaflaf = .T.
gclaflaf = 'test'
ELSE
gclaflaf = ''
ON ERROR DO ..\common\onerror WITH ;
ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
ENDIF
DO FORM mainwind
gcOktoplay = .F.
DO FORM login
ON SHUTDOWN CLEAR EVENTS
IF gcOktoplay
READ EVENTS
ENDIF
ON ERROR && return to system error handler
IF VARTYPE(mainwind) = 'O'
mainwind.RELEASE
ENDIF
ON SHUTDOWN
-----------------
LOGIN.INIT
-----------------
txtpin = ''
thisform.numtrys = 0
ThisForm.txtId.value = UPPER(gcUser)
if seek(ThisForm.txtId.value , 'access')
thisform.buttons.ok.enabled = .t.
else
thisform.buttons.ok.enabled = .f.
endif
-----------------
LOGIN.TXTID.VALID
-----------------
if seek(this.value, 'access')
thisform.buttons.ok.enabled = .t.
else
thisform.buttons.ok.enabled = .f.
endif
-----------------
LOGIN.CANCEL.CLICK
-----------------
gcOktoplay = .f.
thisform.Release
CLEAR EVENTS
-----------------
LOGIN.UNLOAD
-----------------
return gcOktoplay
-----------------
MAINWIND.INIT
-----------------
DO visamenu.mpr WITH this,.t.
application.visible = .f.
-----------------
MAINWIND.DESTROY
-----------------
ThisForm.Whosin_update1.user = gcUser
ThisForm.Whosin_update1.system = 'VISA'
ThisForm.Whosin_update1.update('LOGOUT')
application.visible = .t.
-----------------
MAINWIND.UNLOAD
-----------------
CLEAR EVENTS