Bug 44685 - VS2015 freeze for a few minutes when trying to start a debug session
Summary: VS2015 freeze for a few minutes when trying to start a debug session
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- critical
Target Milestone: 7.1 (C9)
Assignee: Gonzalo Martin
URL:
Depends on:
Blocks:
 
Reported: 2016-09-23 15:46 UTC by Guillaume
Modified: 2017-01-04 16:30 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: Yes
Last known good build: 4.1.2.18


Attachments
Capture of the frozen VS instance (15.99 KB, image/png)
2016-09-23 15:46 UTC, Guillaume
Details
Stacktrace of VS 2015 instance (1.97 KB, text/plain)
2016-09-23 15:47 UTC, Guillaume
Details
The logs obtained from the second VS instance (7.25 MB, text/plain)
2016-09-23 15:49 UTC, Guillaume
Details


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:
Status:
VERIFIED FIXED

Description Guillaume 2016-09-23 15:46:03 UTC
# Steps to reproduce
1. Deploy a store version of an app to device (signed with a key different than the default Android debug key).
2. From VS2015, start a new debug session for the same app (ensure it is a debug session which use the default Android debug key).

# Expected behavior
Debug session should start

# Actual behavior
VS freeze at different point during the process depending on whether the solution has been cleared previously

# Supplemental info (logs, images, videos)
After attaching to the process of the first frozen VS instance from a new one, I have been able to browse local variable and retrieve the full log, with the exception which seemed to have frozen it.
After that, I resumed the second VS instance (the one used to capture the stacktrace) which seemed to have unlocked the first VS instance. I can't tell if it is my actions in the second instance which have unlocked it, or if it was only due to some kind of timeout.

Base on the logs, it appeared that I had a signature issue preventing VS from deploying.
After removing the package manually, issue was gone.
This is a regression as I was previously able to see this error (Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]) in the output pane without having VS freezing in the meantime.

Find in attachment:
1. 2016-09-23 11_23_44-Distech.X50.png: a screenshot of the ouput pane from the frozen VS instance.
2. VS stacktrace - Worker thread.txt: the stacktrace captured from the second VS instance.
3. $exception.Message local variable.txt: the log extracted from the local variable pane in the second VS instance. It took times to the debugger to gain this variable value.

# Test environment (full version information)
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

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

Xamarin Inspector Support   0.9.0.14 (4d868da)
Adds support for inspecting Xamarin and WPF apps.

Xamarin.Android   7.0.0.18 (0e59c36)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.0.6 (6c3fee4)
Visual Studio extension to enable development for Xamarin.iOS.

Android SDK Tools 25.2.2
Android SDK Platform-Tools 24.0.3, 24.0.2, 24.0.1
Android SDK Build-Tools 23.0.2
Comment 1 Guillaume 2016-09-23 15:46:55 UTC
Created attachment 17710 [details]
Capture of the frozen VS instance
Comment 2 Guillaume 2016-09-23 15:47:54 UTC
Created attachment 17711 [details]
Stacktrace of VS 2015 instance
Comment 3 Guillaume 2016-09-23 15:49:28 UTC
Created attachment 17712 [details]
The logs obtained from the second VS instance

After more testing, it appears that VS will froze only for a few minutes then recover to show the full log.
Comment 4 Hrvoje 2016-09-24 13:28:18 UTC
I'm facing the same issue.
Comment 5 Hrvoje 2016-09-29 12:45:06 UTC
There is one workaround (on every freeze).
Kill Java SE binary process in Task Manager. Build automatically continues.
Comment 6 Guillaume 2016-09-29 14:39:34 UTC
@Hrvoje not sure whether this workaround can impact the result of the build process...
Comment 7 Hrvoje 2016-09-29 14:42:51 UTC
There is no impact to the build process.
Comment 8 dean.ellis 2016-10-07 10:59:07 UTC
Fixed in monodroid/master/433c20b4