Microsoft KB Archive/191636

= FIX: Access Violation or Page Fault with Multiple Toolbars =

Article ID: 191636

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q191636



SYMPTOMS
When running code that instantiates, docks, and releases multiple toolbars, you may see an error similar to the following under Windows NT:

Exception: access violation (0xc0000005), Address: 0x77f7d514

The following error occurs under Windows 95:

VFP caused an invalid page fault in module KERNEL32.DLL at 0137:bff78053



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual FoxPro 6.0.



Steps to Reproduce Behavior
  Run the following code from a program (.prg) file: #DEFINE   ARRAYSIZE       14 DIMENSION oRef[ARRAYSIZE] FOR lni = 1 TO ARRAYSIZE oRef[lni] = CREATEOBJECT("Toolbar") oRef[lni].SHOW oRef[lni].DOCK(1) WAIT WINDOW "Creating "+ STR(lni) NOWA ENDFOR WAIT CLEAR FOR lni = 1 TO ARRAYSIZE WAIT WINDOW "Releasing "+ STR(lni) NOWA oRef[lni] = .NULL. && Use this in VFP 5, 3.0b ENDFOR WAIT CLEAR  Under Windows NT, you see an error like the following:

Exception: access violation (0xc0000005), Address: 0x77f7d514

Under Windows 95, you will see an error like the following:

VFP caused an invalid page fault in module KERNEL32.DLL at 0137:bff78053



NOTE: It may take multiple runs of the preceding program before you see the error occur in Windows 95.

