You experience many first chance exception errors when you use the Application Verifier (AppVerifier) runtime verification tool to test a GDI+ program

Article translations Article translations
Article ID: 961889 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you use the Application Verifier (AppVerifier) runtime verification tool to test a Microsoft GDI+ program, you experience many first chance exception errors. Additionally, the GDI+ program may close unexpectedly.

CAUSE

This problem may occur if the GDI+ program uses the GIF codec.

WORKAROUND

To work around this problem, turn off exceptions testing in Application Verifier. To do this, follow these steps:
  1. Start Application Verifier.
  2. Under Applications, click the GDI+ program that you want to test.
  3. Under Tests, expand Basics.
  4. Click to clear the Exceptions check box.
  5. Run the GDI+ program that you want to test.
You can also configure the debugging tool to make sure that you do not experience a breakpoint in the debugging tool when an access violation occurs. For example, you can configure the WinDbg debugging tool to ignore the error or to generate a warning message. To do this, follow these steps:
  1. Start the WinDbg debugging tool.
  2. Click Debug, and then click Event Filters.
  3. Click Access violation, and then click Ignore or Output.
  4. Click Close.

MORE INFORMATION

The GIF codec in GDI+ 1.0 encodes GDI+ images that have 256 or fewer colors (8 bits per pixel). The GIF codec uses exception error information when the GIF codec decodes these GIF images. Therefore, you may experience many breaks when you use Application Verifier to test a GDI+ program that uses the GIF codec.

Steps to reproduce the problem

The following code is an example of GDI+ code that causes this problem.
case WM_PAINT:
        {
            PAINTSTRUCT ps;
            Graphics* graphics;
            HDC hdc;

            hdc = BeginPaint(hWnd, &ps);
            graphics = new Graphics(hdc);

            Image *img = Image::FromFile(L"test.gif");
            graphics->DrawImage(img,0,0, 1400, 1100);

            delete img;
            delete graphics;
            EndPaint(hWnd, &ps);
        }

REFERENCES

For more information about Application Verifier, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/ms220948.aspx
For more information about how to use Application Verifier to troubleshoot programs in Windows XP, click the following article number to view the article in the Microsoft Knowledge Base:
286568 Using Application Verifier to troubleshoot programs in Windows XP

Properties

Article ID: 961889 - Last Review: January 13, 2009 - Revision: 1.0
APPLIES TO
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Premium
  • Windows Vista Home Basic
  • Windows Vista Ultimate
  • Windows Vista Business 64-bit Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition
Keywords: 
kbcode kbtshoot kbsurveynew kbprb KB961889

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com