Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 26204 [details]
Intermittent hang (pause, freeze) during `Xamarin.AndroidTools.AndroidSdk.IsInstalled.get()` when opening Xamarin.Android project in Visual Studio 2015
I was able to hit this issue both on my physical Windows computer and in a Hyper-V VM.
## Regression status: regression in the Xamarin 15.6 Release, only in Visual Studio 2015
> GOOD: Visual Studio 2017 version 15.6
> BAD: Visual Studio 2015 Tools for Xamarin version 220.127.116.119 (9b0fce36d) in Visual Studio 2015
> GOOD: Visual Studio 2015 Tools for Xamarin version 18.104.22.1680 (fc93f3f5b)
## Steps followed to test
1. Unzip the attached test case.
2. Open the .sln file in Visual Studio 2015, and restore the NuGet packages.
3. Quit Visual Studio 2015.
4. Open the .sln file once more in Visual Studio 2015.
5. Repeat steps 3 and 4 several times.
## BAD Results with Visual Studio 2015 Tools for Xamarin version 22.214.171.1249 (9b0fce36d)
The IDE hangs while loading the solution.
Number of times I repeated steps 3 and 4 until I saw the symptom, across 5 independent trials of steps 1 – 5:
> Hyper-V VM: 1 1 1 1 2
> Physical machine: 1 2 12 1 9
I suspect it is easier to hit the problem on the VM because the VM is slower.
Testing note: On the first and fourth trials on the physical machine, the Main Thread got stuck in a different Call Stack, in `Xamarin.Android.Tasks.Aapt.Execute()`. This different symptom might require a separate fix.
Additional note: Unlike some project load hangs we've seen in the past, repeating steps 3 and 4 again after the first observed hang does _not_ necessarily hang again.
### Call Stack of the Main Thread
> [Managed to Native Transition]
> Xamarin.VisualStudio.Android.dll!Xamarin.VisualStudio.Android.Commands.StartAvdManager.QueryStatus(Clide.Commands.IMenuCommand command)
> Clide.dll!Clide.Commands.VsCommandExtensionAdapter.OnBeforeQueryStatus(object sender, System.EventArgs e) Line 96
> at C:\projects\clide\src\Clide\Commands\VsCommandExtensionAdapter.cs(96)
> Microsoft.VisualStudio.Shell.14.0.dll!Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(ref System.Guid commandGroup, uint nCmdId, Microsoft.VisualStudio.OLE.Interop.OLECMD oleCmd, System.IntPtr oleText)
> Microsoft.VisualStudio.Shell.14.0.dll!Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(ref System.Guid guidGroup, uint nCmdId, Microsoft.VisualStudio.OLE.Interop.OLECMD oleCmd, System.IntPtr oleText)
## GOOD Results with Visual Studio 2015 Tools for Xamarin version 126.96.36.1990 (fc93f3f5b) in Hyper-V VM
I was _unable_ to hit the issue with the previous go-live version of the Visual Studio 2015 Tools for Xamarin.
I completed 30 repetitions of steps 3 and 4 Hyper-V VM. The solution load was successful _every_ time. I observed _no_ hangs.
## GOOD Results with Visual Studio 2017 version 15.6 in Hyper-V VM
I was _unable_ to hit the issue in Visual Studio 2017.
I completed 30 repetitions of steps 3 and 4 in 2 different conditions in the Hyper-V VM:
(a) Using the default Android SDK configuration as installed by the Visual Studio Installer.
(b) Using the same manually installed Android SDK configuration that I used in the Visual Studio 2015 tests.
The solution load was successful _every_ time. I observed _no_ hangs.
## Testing environment info
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Xamarin 188.8.131.529 (9b0fce36d)
Xamarin.Android SDK 184.108.40.206 (HEAD/22d97e153)
Windows 10 Version 1703 (OS Build 15063.786), 64-bit
US English locale
US Eastern time zone
User Name: "Windows User"
Android SDK Path: C:\android-sdk
Java 8u131 (1.8.0_131), 64-bit
### Physical machine
Android SDK Tools 25.2.5
Android SDK Build-tools 25.0.3
Android SDK Platform-tools 25.0.5
Android SDK Platform 25 version 3
Android SDK Platform 23 version 3
Android SDK Platform 16 version 5
Android SDK Platform 10 version 2
### Hyper-V VM
Android SDK Tools 26.1.1
Android SDK Build-Tools 26.0.3
Android SDK Platform-Tools 27.0.1
Android SDK Platform 26 version 2
Fixed in Visual Studio 2015 Tools for Xamarin by non-public commits:
## Verification status: verified fixed in the Xamarin 15.6.3 Release
GOOD: Visual Studio 2015 Tools for Xamarin version 220.127.116.112 (0faa808ee)
I performed 20 repetitions of steps 3 and 4, across 2 independent trials on the Hyper-V VM environment from Comment 0. I hit no hangs on any of the repetitions.