Bug 41467 - [WinRT] App Crashes In Release Mode
Summary: [WinRT] App Crashes In Release Mode
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-02 17:59 UTC by Jimmy [MSFT]
Modified: 2017-06-19 16:34 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Repro project (122.51 KB, application/x-zip-compressed)
2016-06-02 17:59 UTC, Jimmy [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jimmy [MSFT] 2016-06-02 17:59:13 UTC
Created attachment 16177 [details]
Repro project

### Overview
A WinRT app crashes on start up when deployed in release mode, both on WP 8.1 and Win 10 Mobile. The app crashes after Forms.Init() with the output:

> Exception thrown: 'System.Runtime.InteropServices.COMException' in Xamarin.Forms.Platform.WinRT.Phone.ni.DLL

I was able to reproduce the issue starting with Forms 2.1 and up to the latest pre-release. The app will launch successfully in debug mode, and it also deploys in release mode on an emulator.

### Steps to Reproduce
1. Deploy the attached WP 8.1 project in release mode to a device

### Expected Results
The app will launch and display the default "Welcome to Xamarin Forms!" screen

### Actual Results
The app crashes immediately

### Environment Info
Microsoft Visual Studio Professional 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01569

Installed Version: Professional

Visual Basic 2015   00322-40000-00000-AA362
Microsoft Visual Basic 2015

Visual C# 2015   00322-40000-00000-AA362
Microsoft Visual C# 2015

Visual C++ 2015   00322-40000-00000-AA362
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-40000-00000-AA362
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   5.2.60328.3
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.7
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.3
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25219.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin (a9c7826)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android (ee215fc)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS (be25da5)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 E.Z. Hart [MSFT] 2016-06-02 18:35:55 UTC
I just tried this on a Nokia Lumia 920 and was able to deploy and run it just fine. 

What device were you using?
Comment 2 Jimmy [MSFT] 2016-06-02 20:48:23 UTC
Huh, interesting. I tried on a Lumia 635 running WP 8.1 and Lumia 925 & 950 both with W10 Mobile.

The customer said it worked on their WP 8.1 device, but they might be using an older version of Forms 2.1 so I'm trying to confirm with them.
Comment 3 Chris Hardy [MSFT] 2017-06-19 16:34:18 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!