Microsoft KB Archive/246313

= BUG: Certain Icons May Cause Error with FoxPro =

Article ID: 246313

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition, when used with:
 * Microsoft Windows NT 4.0
 * Microsoft Visual FoxPro 5.0 Standard Edition, when used with:
 * Microsoft Windows NT 4.0
 * Microsoft Visual FoxPro 5.0a, when used with:
 * Microsoft Windows NT 4.0
 * Microsoft Visual FoxPro 6.0 Professional Edition, when used with:
 * Microsoft Windows NT 4.0

-



This article was previously published under Q246313



SYMPTOMS
Icon files (*.ICO) usually have two or more resources contained within them. Each resource can be built with a different number of colors. Viewing an icon file that has a 32x32 resource that was built with greater than 256 colors causes the Visual FoxPro (VFP) versions mentioned above to exit. This occurs when Visual FoxPro is running on Microsoft Windows NT.



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



Steps to Reproduce Behavior
From Visual FoxPro, you can get a dialog to view an icon in a number of ways: assigning an .ico to a project, through the PICTURE property of an image control, and so forth. The easiest way to reproduce this, however, is with GETPIC.

 Using Impact Software's Microangelo (information available on their Web site at: http://www.impactsoft.com/muangelo/muangelo.html), or some other icon editor, create an icon. Include a 32x32 resource with more than 256 colors.  Open one of the Visual FoxPro versions listed above and execute the following command from the Command window: ? GETPIC  When the dialog box appears, locate the icon created in step 1. Select the icon and PREVIEW it (using either the preview checkbox or button).

Using Visual FoxPro 6.0 (no service pack), the following error might occur and then Visual FoxPro exits:

Fatal error: Exception code=C0000005

Using Visual FoxPro 5.0x and Visual FoxPro 6.0 SP3, the following error might occur and FoxPro exits or VFP shuts down without reporting an error:

APPLICATION ERROR. The instruction at referenced memory at. The memory could not be "read".

(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Trevor Hancock, Microsoft Corporation.

