This article has been archived. It is offered "as is" and will no longer be updated.
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.
This problem may occur if the GDI+ program uses the GIF codec.
To work around this problem, turn off exceptions testing in Application Verifier. To do this, follow these steps:
Start Application Verifier.
Under Applications, click the GDI+ program that you want to test.
Under Tests, expand Basics.
Click to clear the Exceptions check box.
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:
Start the WinDbg debugging tool.
Click Debug, and then click Event Filters.
Click Access violation, and then click Ignore or Output.
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.