-------------------------------------------------------------------------------------
[ENHANCED] VFP 9.0 FIX - CATCH THE PURE VIRTUAL FUNCTION CALL RUNTIME ERROR
July 2026
-------------------------------------------------------------------------------------
CCB
1. BUG:
If we enable catching the pure virtual function call runtime error in Visual FoxPro Advanced,
when Visual FoxPro causes the pure virtual function call runtime error,
it will display a dialog box "Are you sure you want to exit Visual FoxPro?",
if we select "Yes", it will display the Visual C++ runtime error dialog, and then exit Visual FoxPro,
if we select "No", it will cause the error "There is not enough memory to complete this operation (Error 43)",
and then it will return to Visual FoxPro, now we can do some important works, and then exit Visual FoxPro.
It is the startup default for Visual FoxPro Advanced Interactive Development Environment (IDE).
Please refer to the picture testpurecall.png:
If we disable catching the pure virtual function call runtime error in Visual FoxPro Advanced,
when Visual FoxPro causes the pure virtual function call runtime error,
it will display the Visual C++ runtime error dialog, and then exit Visual FoxPro.
It is the startup default for Visual FoxPro Advanced Runtime and Visual FoxPro Advanced Multi-threaded Runtime.
2. CAUSE:
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Label9160f3 ::
;
; --------------------------------------------------------------------------
; VFP 9.0 FIX - CATCH THE PURE VIRTUAL FUNCTION CALL RUNTIME ERROR
; July 2026
; --------------------------------------------------------------------------
; CCB
;
; Catch the pure virtual function call runtime error.
;
; 2026/7/28, by ccb
;
cmp dword ptr vfpa_sys9210_data,00h
je Label9160f4
cmp dword ptr vfpa_sys9210_data,02h
je Label9160f4
pushd 00h
pushd 02h
pushd 00h
pushd 00h
lea eax , byte ptr vfpa_sys9210_text
push eax
call Fun6da248
cmp eax , 02h
jne Label9160f4
mov ecx , 0B6h
jmp Fun544742
Label9160f4 ::
IF VFPA_VERSION GE 102
call vfpa_lmm_release
ENDIF
cmp dword ptr vfpa_sys9210_data,02h
jne Label9160f5
push 0FFh
call exit
Label9160f5 ::
IFDEF RAX
call _purecall ;0x009160f3 : ff25d8799100
ret
ELSE
jmp _purecall ;0x009160f3 : ff25d8799100
ENDIF
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
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_vfp9fix422.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix212.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix213.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix214.asp
http://www.baiyujia.com/vfpdocuments/f_vfp9fix215.asp
2, microsoft.com:
https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/c-runtime-error-r6025?view=msvc-170
https://devblogs.microsoft.com/oldnewthing/20040428-00/?p=39613
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|