---------------------------------------------------------------------------------------------
[BUG/PRB.] VFP 9.0 FIX - RECURSIVE CALL THE QUIT ROUTINE BEFORE VISUAL FOXPRO EXITS
April 2026
---------------------------------------------------------------------------------------------
CCB
1. BUG:
In vfp9 (and vfp7, vfp8), sometimes the breakpoints information in the resource file (foxuser.dbf) is empty,
the breakpoints information has been lost.
The bug occurs in vfp7, vfp8 and vfp9, it does not occur in vfp6.
The bug occurs when SET("RESOURCE")="ON" (the default setting), it does not occur when SET("RESOURCE")="OFF".
In VFP Advanced, it will save the breakpoints information and other information in the resource file (foxuser.dbf),
there is no problem.
2. CAUSE:
Before Visual FoxPro exits, it will do somethings in the QUIT routine, for example,
save breakpoints message (ID="BPOINTS") in the resource file (foxuser.dbf), and then clear all breakpoints
save data (ID="WLAYOUTNAMES") in the resource file (foxuser.dbf)
save data (ID="BLDOPTS") in the resource file (foxuser.dbf)
save data (ID="EDITOPTIONS") in the resource file (foxuser.dbf)
save data (ID="GTOOLBAR") in the resource file (foxuser.dbf)
In vfp9, sometimes it will recursive call the QUIT routine, for example,
in the first pass:
save breakpoints message (ID="BPOINTS") in the resource file (foxuser.dbf), and then clear all breakpoints
there is no problem.
In the second pass:
save breakpoints message (ID="BPOINTS") in the resource file (foxuser.dbf), and then clear all breakpoints
there is no breakpoints message, the breakpoints information has been lost.
In Advanced, it will not recursive call the QUIT routine,
it will call the QUIT routine once, there is no problem.
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Fun8a75b6 :: ; proc near
cmp dword ptr [ Data93e700 ] , 00h ;0x008a75b6 : 833d00e7930000
jne Label8a75d7 ;0x008a75bd : 7518
mov ecx , dword ptr [ esp + 4 ] ;0x008a75bf : 8b4c2404
call Fun551270 ;0x008a75c3 : e8a89ccaff
test eax , eax ;0x008a75c8 : 85c0
je Label8a75d7 ;0x008a75ca : 740b
;
; ----------------------------------------------------------------------------------
; VFP 9.0 FIX - RECURSIVE CALL THE QUIT ROUTINE BEFORE VISUAL FOXPRO EXITS
; April 2026
; ----------------------------------------------------------------------------------
; CCB
;
; Recursive call the QUIT routine before Visual FoxPro exits.
;
; 2026/4/22, by ccb
;
cmp dword ptr [ esp + 00h ] , offset Label59c3d6 ;; Fun42e45e .. ; proc near
je Label8a75cb
jmp Label8a75cc
Label8a75cb ::
cmp dword ptr vfpa_sys9207_data,00h
jne Label8a75cc
cmp dword ptr vfpa_quitroutine_inquitroutine,00h
je Label8a75cc
jmp Label8a75d7
Label8a75cc ::
mov edx , dword ptr [ esp + 4 ] ;0x008a75cc : 8b542404
xor ecx , ecx ;0x008a75d0 : 33c9
call Fun54ffbc ;0x008a75d2 : e8e589caff
Label8a75d7 ::
ret 04h ;0x008a75d7 : c20400
4. APPLIES TO:
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix414.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix27.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix220.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix221.asp
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|