FIX: Silverlight for Windows Embedded application crashes from a memory leak in a custom control of type VTYPE_BSTR in Windows Embedded Compact 7

Introduction

This article describes an issue that triggers a Silverlight for Windows Embedded application crash from a memory leak in a custom control of type VTYPE_BSTR in Windows Embedded Compact 7. An update is available to resolve this issue. Before you install this update, all previously issued updates for this product must be installed.

Symptoms

You have a Silverlight for Windows Embedded application in Windows Embedded Compact 7. If the application creates and registers a custom control as a custom dependency property of type VTYPE_BSTR, a memory leak may occur. Additionally, the memory leak may cause the application to crash.

Examples:
  • The IXRCustomUserControl::GetPropertyValue() method is called, an XRValue is returned and sets the XRValue.shouldFreeValuePointer variable to False. This causes a break. If you set XRValue.shouldFreeValuePointer = True in your application, this will cause a memory leak.
  • The GetDependencyProperty method is called, an XRValue is returned and sets the XRValue.shouldFreeValuePointer variable to True. This also causes a memory leak.

These memory leaks eventually cause the application to crash.

Resolution

Software update information

A supported software update is now available from Microsoft as Windows Embedded Compact 7 Monthly Update (June 2015).

Note This Windows Embedded Compact 7 Monthly Update is available for download from the following Microsoft Download Center website:

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, click Clean Solution, and then click Build Solution.
  • On the Build menu, click Rebuild Solution.
You do not have to restart the computer after you apply this software update.

Update replacement information

This update does not replace any other updates.

File information

References

Learn about the terminology that Microsoft uses to describe software updates.
Properties

Article ID: 3032063 - Last Review: Jul 14, 2015 - Revision: 1

Windows Embedded Compact 7

Feedback