FIX: SEH exceptions are caught by wrong exception handler when asynchronous exception handling is enabled in WEC 2013

This article describes an issue in which SEH exceptions are caught by a wrong handler in Windows Embedded Compact 2013. An update is available to fix this issue. Before you install this update, all previously issued updates for this product must be installed.
Symptoms
Consider the following scenario:
  • You use the Application Builder plug-in for Visual Studio 2013 to create a C++ application that targets Windows Embedded Compact 2013.
  • You enable the asynchronous exception handling by using the "/EHa" compiler switch. This switch allows both C++ synchronous and structured exception handling (SEH) asynchronous exception handling methods to be mixed in the same code.
  • You run the related code to catch SEH exceptions.
In this scenario, SEH exceptions are always caught in the very first exception handler even if it's filtered for a C++ synchronous exception. 

The expected behavior is SEH exceptions being caught by the ellipsis exception handler.

For example, you run the following sample code:
class CMyEx{public:    CMyEx(int nParam) : m_nParam(nParam) { }    int m_nParam;}; void TestExceptions(){    try    {        int a = 42;        int b = 0;        // throw CMyEx(1);        // throw 97;        int c = a / b;    }    catch (const CMyEx &e)    {        wprintf(L"CMyEx exception caught (param=%d)!\n", e.m_nParam);    }    catch (...)    {        wprintf(L"Exception of unspecified type caught by ellipsis clause!\n");    }}
In this sample, you always hit the first catch clause when the SEH exception (integer divide by zero) occurs instead of the ellipsis handler as expected.

Resolution

Software update information

Windows Embedded Compact 2013 Monthly Update (September 2015) is now available from Microsoft. To download this Windows Embedded Compact 2013 monthly update, go to Microsoft OEM Online or MyOEM.

Prerequisites

This update is supported only if all previously issued updates for this product have also been installed.

Restart requirement

After you apply this update, you must perform a clean build of the whole platform. To do this, use one of the following methods:
  • On the Build menu, select Clean Solution, and then select Build Solution.
  • On the Build menu, select Rebuild Solution.
You don't have to restart the computer after you apply this software update.

Update replacement information

This update doesn't replace any other updates.

File information

The English version of this software update package 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's 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.
Files that are included in this update package
File nameFile sizeDateTimePath
Frame.cpp34,13313-Nov-201423:06Private\Winceos\Coreos\Core\Corelibc\Crtw32\Eh
Fullcrt.lib30,027,37809-Sep-201509:17Public\Common\Oak\Lib\X86\Checked
Fullcrt.lib30,228,29209-Sep-201509:17Public\Common\Oak\Lib\X86\Retail
Fullcrt.lib28,759,83609-Sep-201509:16Public\Common\Oak\Lib\X86\Debug
Fullcrt.lib29,278,30009-Sep-201509:17Public\Common\Oak\Lib\Armv7\Checked
Fullcrt.lib29,566,73009-Sep-201509:17Public\Common\Oak\Lib\Armv7\Retail
Fullcrt.lib33,139,56009-Sep-201509:16Public\Common\Oak\Lib\Armv7\Debug
Msvcr110d.dll1,339,95208-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110.dll754,22408-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110d.map1,287,57908-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110d.rel528,83408-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110.map788,98608-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110.rel242,16908-Sep-201505:26Public\Common\Sdk\Crt\Bin\X86
Msvcr110d.dll1,145,31208-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
Msvcr110.dll539,60808-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
Msvcr110d.map2,714,27508-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
Msvcr110d.rel215,92408-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
Msvcr110.map1,258,31708-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
Msvcr110.rel122,16708-Sep-201505:26Public\Common\Sdk\Crt\Bin\Arm
References
Learn about the terminology that Microsoft uses to describe software updates.
Properties

Article ID: 3008664 - Last Review: 10/29/2015 19:18:00 - Revision: 1.0

Windows Embedded Compact 2013

  • kbautohotfix kbqfe kbhotfixserver kbfix KB3008664
Feedback