Bug 38507 - Enabling "Use Xamarin Insights." freezes XS when creating a Multi-platform SpriteKit template
Summary: Enabling "Use Xamarin Insights." freezes XS when creating a Multi-platform Sp...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NuGet ()
Version: unspecified
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Matt Ward
URL:
Depends on:
Blocks:
 
Reported: 2016-02-05 20:14 UTC by Manish Sinha
Modified: 2016-05-17 17:17 UTC (History)
5 users (show)

Tags:
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 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 Manish Sinha 2016-02-05 20:14:39 UTC

    
Comment 1 Manish Sinha 2016-02-05 20:17:39 UTC
Steps to reproduce:

1. Select Multiplatform SpriteKit Game
2. Select "Use Xamarin Insights."
3. Click Create

Expected: Solution is created
Actual: XS freezes with Adding Xamarin.Insights

Using master XS + master XI + master XM

Ide.log: https://gist.github.com/anonymous/391f4334fda22a8f7cf5
XS Info: https://gist.github.com/anonymous/128b9d1276083f0319ad
Comment 3 Lluis Sanchez 2016-02-08 17:04:37 UTC
So it is actually a NuGet issue.
Comment 10 Greg Munn 2016-02-09 16:09:30 UTC
Matt, FWIW, I didn't repro it either until I installed master XI and XM (but I can't recall if I was using the right template at the time).
Comment 12 Matt Ward 2016-02-11 12:37:29 UTC
Managed to repro this. I had to install Xamarin Studio 6.0.3322 and then running the QA automation tests I hit the hang straight away. Testing my local copy of Xamarin Studio built from master seemed to be OK.

The UI thread is hung MonoDevelopWorkspace.ApplyDocumentTextChanged. The line that has locked the UI seems to be doing a .Result:

oldFile = document.GetTextAsync ().Result;

MonoDevelop.Ide.TypeSystem.MonoDevelopWorkspace.ApplyDocumentTextChanged (Microsoft.CodeAnalysis.DocumentId,Microsoft.CodeAnalysis.Text.SourceText) [0x0015f] in /Users/builder/data/lanes/432/4b3fe99a/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs:720

Full callstacks for GUI Thread and NuGet are shown in the following Gist:

https://gist.github.com/mrward/026c39b029eed3cdc1a1

It does not look like the NuGet addin has hung the UI thread. It looks like its background thread is still waiting to run some code on the UI thread.

Also I am using Mono 4.2.2 so I am guessing that rules out Mono 4.3 as a cause of the hang.
Comment 13 Matt Ward 2016-02-11 14:28:15 UTC
Running some tests I can repro the problem most of the time with Xamarin Studio 6.0.0.3322. Out of 10 runs of the QA automation test TestCreateBuildMultiPlatformSpriteKitGame Xamarin Studio hangs 7 out of 10 times.

With Xamarin Studio 6.0.0.3405 I cannot reproduce a hang. 10 runs of the QA automation test TestCreateBuildMultiPlatformSpriteKitGame and everyone worked without a UI hang. Since nothing else in my environment has changed, just Xamarin Studio, it seems that the hang is due to Xamarin Studio and not due to Xamarin.iOS or Xamarin.Mac.

Looking at the commits for Xamarin Studio 6.0.0.3405 possibly a newer version of Roslyn has fixed a problem since I can see it has been updated recently.

XS 6.0.0.3405 commit:
https://github.com/mono/monodevelop/commit/d2ea5578a934ac94cf22e1c7665eadfde9ccf498

Going to mark this as fixed. If it happens again please re-open this bug.
Comment 14 Parmendra Kumar 2016-05-17 17:14:05 UTC
Xamarin Insights disable in C7 so I am going to remove the target milestone.

Thanks.
Comment 15 Manish Sinha 2016-05-17 17:17:15 UTC
The issue was fixed on the XS UITest.