FIX: C0000005 Fatal Error With Big Array Property (221742)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q221742

SYMPTOMS

" " In Visual FoxPro 5.x and 6.0, dimensioning a two-dimension array greater than its maximum allows value, which is 32500, causes the following or some other memory related error message:
C0000005 Fatal Error

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

MORE INFORMATION

Steps to Reproduce Behavior

  1. Cut and paste the program below into a .PRG:
    x1 = CREATEOBJECT( "cBigArray" )
    x1.aBig[1,1] = 1
    x1.aBig[1000,1] = 1
    x1.aBig[10000,1] = 1
    x1.aBig[30000,1] = 1
    
    DEFINE CLASS cBigArray AS Custom
       DIMENSION aBig[33000,2]
    ENDDEFINE
    					
  2. Save and run the .PRG.

    NOTE: Visual FoxPro causes a C0000005 Fatal Error and terminates.

    After the fix in Visual Studio Service Pack 3, Visual FoxPro shows this error message when the maximum allowed value is greater then 32500 on a two- dimensional array:
    Too Many Variables

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbVS600SP1fix kbVS600sp2fix kbVS600sp3fix kbXBase KB221742