Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: Error message when you run an application that is configured to be built for the x64 platform by using the MSVCR90.dll file that calls the strncpy function: "An unhandled win32 exception occurred in 'application_name'"


Symptoms

You have an application that is configured to be built for an x64 platform by using the Msvcr90.dll file. The application calls the strncpy function. When you run the application, you may receive the following error message in the Visual Studio Just-In-Time Debugger window:
An unhandled win32 exception occured in 'application_name'
When you check the call stack, you may find an access violation was triggered in the Msvcr90.dll file and that the application stopped responding in the strncpy function. This problem occurs when the following conditions are true:
  • The source buffer extends to the end of an allocated page.
  • The next byte after this page does not belong to the running process.
  • The length to be copied is an even multiple of 8.
  • The length to be copied includes the final byte of the source buffer.

↑ Back to the top


Cause

This problem occurs because the strncpy function tries to access the next byte after the source buffer. This issue is introduced by new optimizations to some CRT library functions.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual Studio 2008 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have Visual Studio 2008 Service Pack 1 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Atl90.dll9.0.30729.162159,55214-Oct-200802:32x86
Mfc90.dll9.0.30729.1625,084,48014-Oct-200801:12x64
Mfc90.dll9.0.30729.1623,766,08014-Oct-200802:32x86
Mfc90chs.dll9.0.30729.16236,68014-Oct-200801:12x64
Mfc90chs.dll9.0.30729.16236,68014-Oct-200802:32x86
Mfc90cht.dll9.0.30729.16237,70414-Oct-200801:12x64
Mfc90cht.dll9.0.30729.16237,70414-Oct-200802:32x86
Mfc90d.dll9.0.30729.1627,419,20014-Oct-200801:12x64
Mfc90d.dll9.0.30729.1625,934,91214-Oct-200802:32x86
Mfc90deu.dll9.0.30729.16264,32814-Oct-200801:12x64
Mfc90deu.dll9.0.30729.16264,32814-Oct-200802:32x86
Mfc90enu.dll9.0.30729.16254,60014-Oct-200801:12x64
Mfc90enu.dll9.0.30729.16254,60014-Oct-200802:32x86
Mfc90esn.dll9.0.30729.16262,79214-Oct-200801:12x64
Mfc90esn.dll9.0.30729.16262,79214-Oct-200802:32x86
Mfc90esp.dll9.0.30729.16262,79214-Oct-200801:12x64
Mfc90esp.dll9.0.30729.16262,79214-Oct-200802:32x86
Mfc90fra.dll9.0.30729.16263,81614-Oct-200801:12x64
Mfc90fra.dll9.0.30729.16263,81614-Oct-200802:32x86
Mfc90ita.dll9.0.30729.16262,28014-Oct-200801:12x64
Mfc90ita.dll9.0.30729.16262,28014-Oct-200802:32x86
Mfc90jpn.dll9.0.30729.16244,36014-Oct-200801:12x64
Mfc90jpn.dll9.0.30729.16244,36014-Oct-200802:32x86
Mfc90kor.dll9.0.30729.16243,84814-Oct-200801:12x64
Mfc90kor.dll9.0.30729.16243,84814-Oct-200802:32x86
Mfc90u.dll9.0.30729.1625,103,42414-Oct-200801:12x64
Mfc90u.dll9.0.30729.1623,781,44014-Oct-200802:32x86
Mfc90ud.dll9.0.30729.1627,464,26414-Oct-200801:12x64
Mfc90ud.dll9.0.30729.1625,980,48814-Oct-200802:32x86
Mfcm90.dll9.0.30729.16267,07214-Oct-200800:50x64
Mfcm90.dll9.0.30729.16259,90414-Oct-200800:20x86
Mfcm90d.dll9.0.30729.16293,18414-Oct-200800:50x64
Mfcm90d.dll9.0.30729.16280,89614-Oct-200800:20x86
Mfcm90u.dll9.0.30729.16267,07214-Oct-200800:50x64
Mfcm90u.dll9.0.30729.16259,90414-Oct-200800:20x86
Mfcm90ud.dll9.0.30729.16293,69614-Oct-200800:50x64
Mfcm90ud.dll9.0.30729.16280,89614-Oct-200800:20x86
Mfcmifc80u.dll9.0.30729.16214,15220-Oct-200817:19x86
Microsoft.visualc.stlclr.dll9.0.30729.16249,00020-Oct-200817:19x86
Msvcm90.dll9.0.30729.162225,28013-Oct-200821:59x86
Msvcm90.dll9.0.30729.162324,09613-Oct-200822:36IA-64
Msvcm90.dll9.0.30729.162245,76013-Oct-200823:40x64
Msvcm90d.dll9.0.30729.162312,83213-Oct-200821:59x86
Msvcm90d.dll9.0.30729.162429,56813-Oct-200822:37IA-64
Msvcm90d.dll9.0.30729.162333,31213-Oct-200823:40x64
Msvcp90.dll9.0.30729.1621,467,20814-Oct-200800:56IA-64
Msvcp90.dll9.0.30729.162854,34414-Oct-200801:12x64
Msvcp90.dll9.0.30729.162570,69614-Oct-200802:32x86
Msvcp90d.dll9.0.30729.1622,514,76014-Oct-200800:56IA-64
Msvcp90d.dll9.0.30729.1621,121,60814-Oct-200801:12x64
Msvcp90d.dll9.0.30729.162873,28814-Oct-200802:32x86
Msvcr90.dll9.0.30729.1621,504,58414-Oct-200800:56IA-64
Msvcr90.dll9.0.30729.162624,45614-Oct-200801:12x64
Msvcr90.dll9.0.30729.162653,64014-Oct-200802:32x86
Msvcr90d.dll9.0.30729.1623,599,68814-Oct-200800:56IA-64
Msvcr90d.dll9.0.30729.1621,349,96014-Oct-200801:12x64
Msvcr90d.dll9.0.30729.1621,178,44014-Oct-200802:32x86
Vcomp90.dll9.0.30729.162142,66414-Oct-200800:56IA-64
Vcomp90.dll9.0.30729.16257,67214-Oct-200801:12x64
Vcomp90.dll9.0.30729.16252,04014-Oct-200802:32x86
Vcomp90d.dll9.0.30729.162317,25614-Oct-200800:56IA-64
Vcomp90d.dll9.0.30729.162105,80014-Oct-200801:12x64
Vcomp90d.dll9.0.30729.16289,41614-Oct-200802:32x86
Vcomp90ui.dll9.0.30729.16211,59220-Oct-200817:19x86
Vcredist_ia64.exe9.0.30729.1624,712,27214-Oct-200819:32x86
Vcredist_x64.exe9.0.30729.1625,236,56014-Oct-200819:36x86
Vcredist_x86.exe9.0.30729.1624,496,20814-Oct-200819:28x86

↑ Back to the top


Workaround

To work around this problem, use one of the following methods:
  • Change any of the four conditions that are described in the "Symptoms" section.
  • Replace the strncpy function with other functions that have the similar functionality, such as the memcpyfunction or the lstrcpyn function.

    Note These copy functions are slightly different. For example, the memcpy function does not end the string copy when a null byte is encountered before the indicated length.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

↑ Back to the top


Keywords: kbhotfixdev, kbnotautohotfix, kbfix, kbexpertiseadvanced, kbqfe, kbhotfixserver, kb

↑ Back to the top

Article Info
Article ID : 956420
Revision : 4
Created on : 3/30/2017
Published on : 3/30/2017
Exists online : False
Views : 104