Microsoft KB Archive/221745

From BetaArchive Wiki
Knowledge Base


Article ID: 221745

Article Last Modified on 8/7/2007



APPLIES TO

  • Microsoft Visual FoxPro 6.0 Professional Edition



This article was previously published under Q221745

SYMPTOMS

Placing the GetPem() function in a loop while tracing the code more than once in the Debugger causes the following error in Visual FoxPro 6.0:

Fatal error: Exception code: C0000005

Note that the error message also contains information regarding the line number of the program running when the error occurred.

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 the next service pack for Visual Studio 6.0.

For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:

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

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed


To download the latest Visual Studio service pack, visit the following Microsoft Web site:

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a program called Ztest.prg that contains the following code:

    DO doit
    CLEAR ALL
    DO doit
    
    PROC doit
        SET EXACT ON
        oForm = CREATEOBJECT( "Form" )
        oForm.ADDOBJECT("lbl1", "label")
        FOR EACH loObject IN oForm.OBJECTS
            m = AMEMBERS( laMembers, loObject )
            lcClass = loObject.CLASS
            FOR j = 1 TO m
            IF ( ! pemstatus( loObject, laMembers[j], 1 ) )
            luClassValue = getpem( lcClass, laMembers[j] )
                ENDIF
            ENDFOR
        ENDFOR
    ENDPROC
                        
  2. Close and save the program.
  3. Open the Debugger and open the Ztest.prg file.
  4. In the Debugger, click the Resume toolbar button. The C0000005 error appears.

You can also get this error by simply running the code in the example above. In Visual FoxPro 6.0, if you run the program using either the DO command or by pressing the Run button (!) on the standard toolbar with the program open, the C0000005 error appears. In Visual FoxPro 6.0 Service Pack 3, only the DO command causes the error.


Additional query words: sp4

Keywords: kbbug kbfix kbmisctools kbvs600sp4fix kbvs600sp5fix KB221745