Bug 38657 - [XVS 4.0] Visual Studio occasionally quits unexpectedly, caused by a variety of different unhandled exceptions
Summary: [XVS 4.0] Visual Studio occasionally quits unexpectedly, caused by a variety ...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- major
Target Milestone: 4.1.0 (C7)
Assignee: Brendan Zagaeski (Xamarin Team, assistant)
Depends on:
Reported: 2016-02-11 03:18 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-03-09 01:11 UTC (History)
4 users (show)

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

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 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 Brendan Zagaeski (Xamarin Team, assistant) 2016-02-11 03:18:32 UTC
[XVS 4.0] Visual Studio occasionally quits unexpectedly, caused by a variety of different unhandled exceptions

## Regression status: suspected regression in Xamarin 4.0 ("Cycle 6")

The user who reported the issue only started seeing the problem after the upgrade to Xamarin 4.

## The problem might be difficult to replicate locally

At the moment this exact crashing behavior and the corresponding stack traces have only been reported by one user. So there is a chance the problem requires a fairly specific environment to happen. I'll leave a couple questions below that might help get the discussion started in case the problem is indeed difficult to replicate.

(Note: I also looked through each of the open XamarinvS bugs filed since November 16 in Bugzilla [1] for anything that might match. I didn't notice anything that that looked like the same problem.)


## "Steps to replicate"

It sounds like the problem can happen during a variety of different project actions. Two observations from the original user are:

- The problem might happen more often when the iOS project is set to the startup project

- VS might be more likely to hit the problem after the solution has been left open for a long time.

## "Results"

I will attach the full crash report in a private comment.

As a quick summary, the crash reports shows crashes caused by at least 5 different exception types:


## A couple questions about possible next steps

1. I was thinking that catching the exception via a second instance of Visual Studio might reveal some slightly different (maybe "better") call stacks? I can't remember for sure, but I think I might have seen situations in the past where the debugger would catch a different (probably earlier) exception than the one that ends up in the crash logs. Would it be worth having the user try that?

2. Some of the crash call stacks look like they could in theory have originated from code outside of the Xamarin extensions. I suspect it would be tricky on the user's end to test whether the problem still happens when working on Windows C# apps with the Xamarin extensions uninstalled. (Tricky because the problem only happens intermittently a couple times a day, and of course the user might also not have any Windows C# coding that needs to be done.) But maybe there's a clue I've missed in the call stacks that would point more strongly toward a generic problem with Visual Studio than with Xamarin in particular?

I'll update the bug with other questions and ideas if I think of any. Thanks!
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2016-03-09 01:11:34 UTC

The original reporting customer has tentatively solved this problem by reinstalling the Visual Studio 2013 Update 5 update. The customer hasn't been seeing the crashes anymore after that reinstall.