Microsoft KB Archive/262878

= FIX: Fatal Exception with Large Number of Variables or Objects =

Article ID: 262878

Article Last Modified on 8/7/2007

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q262878



SYMPTOMS
When a large application written with Visual FoxPro is running, one of the following error messages may appear:

Alias is not found

-or-

Class &quot;name&quot; is not found

-or-

Object &quot;name&quot; is not found

-or-

Property &quot;name&quot; is not found

-or-

Variable &quot;variable&quot; is not found

These error messages may be displayed multiple times. If one of these errors is displayed, it is followed by a fatal exception error.



CAUSE
This behavior may occur following any Visual FoxPro command after 32767 entries have been made into the Visual FoxPro name table.



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:

http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx



MORE INFORMATION
Visual FoxPro stores references to variables, objects (such as forms, classes, tables, and so forth), object properties, and references to child objects (such as text boxes, command buttons, OLE controls, and so forth) internally in a name table. When the name table contains more than 32767 entries, the behavior mentioned in the &quot;Symptoms&quot; section may occur. The fatal exception error has been found to occur under the following circumstances:
 * in very large applications that utilize multiple forms along with multiple classes which have been extensively subclassed.
 * when using macro expansion/variable substitution to access the table.

Steps to Reproduce Behavior
  Create a program file named Demo.prg by using the following code: LOCAL lcAlias, nMem, x CLEAR @ 2,1 SAY &quot;Starting User Object Memory Use&quot; @ 3,1 SAY SYS(1016)      && User Object Memory Use @ 4,1 SAY &quot;Current User Object Memory Use&quot;

FOR x = 1 TO 100000 lcAlias = &quot;ABCDEF&quot; CREATE CURSOR (lcAlias) (fld1 c(10)) cValue = &lcAlias..fld1 USE IN (lcAlias) @ 1,1 SAY lcAlias @ 5,1 SAY SYS(1016) && User Object Memory Use ENDFOR RETURN  Save and run the program file, and note that the following error message eventually appears:

Alias is not found.

 After the error message appears, a fatal exception error occurs.

Additional query words: sp4

Keywords: kbbug kbcodesnippet kbfix kbvs600sp4fix kbvs600sp5fix kbxbase KB262878

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.