FIX: C0000005 Fatal Error w/ ISBLANK( ) and Array Prop in Init (221702)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q221702 SYMPTOMS
Placing an ISBLANK() function in the Init of a form created programmatically causes the following error in Visual FoxPro 6.0:
Fatal Error C0000005
In Visual FoxPro 5.0x, the following error appears:
An application has occurred
and an application error log is being generated.
VFP.exe
Exception: access violation(0xc0000005); address: <memory location>
If the ISBLANK() function is in the Init event of a form create with the Form Designer, no error occurs but the Show event of the form never fires. Therefore, the form flashes and disappears.
RESOLUTION
To work around this behavior, put parentheses around the array variable. In the example below, this works:
IIF(isblank((THISFORM.WorkerData[2]))
while this does not:
IIF((isblank(THISFORM.WorkerData[2]))
In Steps to Reproduce Behavior below, comment and uncomment the specified lines of code as indicated in the example and it operates as expected.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbContainer kbCtrl kbOOP kbVS600sp3fix kbXBase KB221702 |
---|
|