Bug 18051 - Build hangs in Xamarin Studio
Summary: Build hangs in Xamarin Studio
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.12.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2014-02-27 08:42 UTC by Michal Fašina
Modified: 2016-10-21 13:21 UTC (History)
12 users (show)

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


Attachments
hang1 (3.62 KB, text/plain)
2014-12-18 10:30 UTC, viktor.kagramanyants
Details
hang2 (4.90 KB, text/plain)
2014-12-18 10:31 UTC, viktor.kagramanyants
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 for Bug 18051 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Michal Fašina 2014-02-27 08:42:59 UTC
When I build the application, the build never ends (several minutes) and I have to restart studio.
The status of build is "Waiting for packaging to complete", or sometimes "Building: app (Debug)"

The only way to do the build is to restart the studio just before the build. After the restart it works well.
Comment 1 Mikayla Hutchinson [MSFT] 2014-02-27 17:28:11 UTC
What kind of apps? From the message in your decription I assume Android. What version of Xamarin.Android? What version of Windows?

Does this happen in all cases, or just for certain projects?

Can you please attach the build output (click the "Build Output" button in the Errors pad) from the point at which the build has hung?
Comment 3 Michal Fašina 2014-03-01 18:51:35 UTC
Yes, it's Android application.
I use last stable version of XamarinStudio and Xamarin.Android (4.12.00028) - Trial Edition.
Windows 8.1 (Windows 6.2.9200.0 (64-bit))

I'm not sure, if it happens in all cases, I'm trying xamarin studio with only one project... Maybe it begun to happen after I added GooglePlayServicesLib (using google map view). My friend tried the same project, and it happens only rarely.

Build Outpul attached.

Thanks.
Comment 4 Michal Fašina 2014-03-01 18:53:44 UTC
See comment above.
Comment 5 Ram Chandra 2014-03-03 11:45:39 UTC
I have checked this issue and able to reproduce this issue.

Steps to reproduce:
(1) Create an "android application" on "Xamarin Studio"
(2) add component "GooglePlayServiceLib".
(3) build "android application".

screencast: http://www.screencast.com/t/EBZcLRxmHO8

Environment:
Windows 8
Xamarin Studio : 4.2.3 (build 59)
Xamarin.Android : 4.12.0 (Trial Edition)
Comment 6 Michal Fašina 2014-05-12 18:46:56 UTC
I have updated to Indie edition and the problem still occurs.

Is there any workaroud? Now I have to restart xamarin studio before each build...
Comment 7 baramuse 2014-08-19 04:07:19 UTC
Hi,

I'm experiencing it now with the last update of XS, don't think it happened to me before it.
I just can't build and deploy more than once now and have to constantly force close XS, very counter-productive :/
Any way to get more output ?

Regards.

Xamarin Studio
Version 5.3 (build 423)
Runtime:
	Microsoft .NET 4.0.30319.34011
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

Xamarin.Android
Version: 4.16.0 (Business Edition)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode)

Operating System
Windows 6.2.9200.0 (64-bit)
Comment 8 Jonathan Pryor 2014-08-19 13:51:34 UTC
My guess is that Xamarin Studio is hanging because MSBuild is hanging.

Open CMD.EXE:

    cd Path\To\Project
    %windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ^
        /v:diag ^
        Project.csproj > b.txt

Does that similarly hang? What are the contents of b.txt?

It's possible that Path.GetTempPath() is attempting to use a network share which is timing out; I've encountered that before.
Comment 9 viktor.kagramanyants 2014-11-12 08:48:42 UTC
I'm experiencing the same issue under MacOSX. Answering to Comment 8, no, xbuild doesn't freeze.
Comment 10 viktor.kagramanyants 2014-11-12 08:49:47 UTC
I believe it's the deployment what freezes, not compilation.
Comment 11 viktor.kagramanyants 2014-12-18 10:30:33 UTC
Created attachment 9124 [details]
hang1
Comment 12 viktor.kagramanyants 2014-12-18 10:31:27 UTC
Created attachment 9125 [details]
hang2
Comment 13 viktor.kagramanyants 2014-12-18 10:34:20 UTC
OK, I've added logs from 2 different hangs. Deployment always hangs during execution of "InstallPackageAssemblies" task, but in a random place. In these two examples it froze during upload and during "Synchronizing assemblies".

hth
Comment 14 Jonathan Pryor 2014-12-18 12:28:31 UTC
@Radek: Any idea why fast deployment would hang, and/or what can be done to address this?

Maybe we need a timeout around adb invocations, and a kill/nuke+restart adb if the timeout expires?
Comment 15 viktor.kagramanyants 2014-12-19 04:21:55 UTC
During the hang, adb invoked from console works perfectly, so I'm not sure the problem is with adb...
Comment 16 David Ortinau [MSFT] 2015-04-24 18:02:33 UTC
This is happening to me more and more frequently on an Android project. Between this and the "out of memory, file a bug" build error, it's hard to know what I'll see when I get back from making yet another espresso.

Is there a workaround yet? Details I can provide to help?

I'm building for Android, API 21 targeting min API 19. 

Xamarin Studio
Version 5.8.3 (build 1)
Installation UUID: 89b6d01c-6671-4dc0-af25-78eba7a1514b
Runtime:
	Mono 3.12.1 ((detached/0849ec7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010003

Apple Developer Tools
Xcode 6.3.1 (7703)
Build 6D1002

Xamarin.iOS
Version: 8.9.1.3 (Enterprise Edition)
Hash: f7736a4
Branch: 
Build date: 2015-04-09 04:22:08-0400

Xamarin.Android
Version: 4.20.2.1 (Enterprise Edition)
Comment 17 Boris Spinner 2015-12-04 16:39:27 UTC
Happens with Visual Studio, too.

Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081

Installierte Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA044
Microsoft Architecture and Modeling Tools
    
UML® und Unified Modeling Language™ sind Marken oder eingetragene Marken der Object Management Group, Inc. in den Vereinigten Staaten und anderen Ländern.

LightSwitch for Visual Studio 2015   00322-80000-00000-AA044
Microsoft LightSwitch for Visual Studio 2015

Visual Basic 2015   00322-80000-00000-AA044
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA044
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA044
Microsoft Visual C++ 2015

Visual F# 2015 RC   00322-80000-00000-AA044
Microsoft Visual F# 2015 RC

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA044
Windows Phone SDK 8.0 - ENU

Allgemeine Azure-Tools   1.5
Bietet allgemeine Dienste für die Verwendung durch Azure Mobile Services und Microsoft Azure-Tools.

Application Insights Tools für Visual Studio Package   1.0
Application Insights Tools für Visual Studio

ASP.NET- und Webtools   14.0.20626.0
ASP.NET- und Webtools

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

CodeInjector   1.0
Injects code into the currently debugging WPF app.

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

JetBrains ReSharper Ultimate 2015.2   Build 103.0.20150818.200216
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Komponententest generieren   1.0
Generiert Komponententestcode für Methoden in zu testenden Klassen.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft.Pex.VisualStudio   1.0
Pex

NuGet-Paket-Manager   3.2.0
NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter "http://docs.nuget.org/".

Office Developer Tools for Visual Studio 2015 ENU   14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio-Erweiterung zur Visualisierung aggregierter Zusammenfassungen vom PreEmptive Analytics-Produkt.

Python Tools for Visual Studio   2.2.30718.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.30718.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.30718.00
Profiling support for Python projects.

SQL Server Data Tools   14.0.50616.0
Microsoft SQL Server Data Tools

Visual C++ für plattformübergreifende Mobile-Entwicklung   1.0
Visual C++ für plattformübergreifende Mobile-Entwicklung

Visual C++ für plattformübergreifende Mobile-Entwicklung   1.0
Visual C++ für plattformübergreifende Mobile-Entwicklung

Workflow Manager Tools 1.0   1.0
Dieses Paket enthält die erforderlichen Visual Studio-Integrationskomponenten für Workflow Manager.

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

Xamarin.Android   6.0.0.34 (3efa14c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.51 (3c0ec35)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 18 Steven Morris 2015-12-18 18:42:47 UTC
My entire team can repeat this error 100% of the time with the following steps. Basically every time the device is disconnected from the computer (remove from USB, or reboot device for instance) then you must restart VS2013. (Note: We are using an older version of Xamarin - and upgrading at this point in time is not an option.)

Within Visual Studio 2013

1. Build Android App
2. Deploy to Android Device
3. Success

4. Remove Device from cradle (connected via USB)
5. Replace device on cradle
6. Deploy to Android Device
7. Hangs 

To fix:
1. must cancel build in Build menu of Visual Studio
2. Restart Visual Studio 
3. Deploy to Android Device
4. Success


Visual Studio Info


Microsoft Visual Studio Ultimate 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.5.50938

Installed Version: Ultimate

Architecture and Modeling Tools   06181-004-0451022-02876
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2013   06181-004-0451022-02876
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06181-004-0451022-02876
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06181-004-0451022-02876
Microsoft Visual Basic 2013

Visual C# 2013   06181-004-0451022-02876
Microsoft Visual C# 2013

Visual C++ 2013   06181-004-0451022-02876
Microsoft Visual C++ 2013

Visual F# 2013   06181-004-0451022-02876
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06181-004-0451022-02876
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.5.60612.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Web Apps
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

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

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

Code Metrics Viewer 12.0   12.0
Code Metrics Viewer 2013 integrates the Code Metric Power Tool 12.0 into Visual Studio and displays calculation results in a tool window.

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

Esri.ArcGISRuntime.VSPackage   10.3.0.945
Visual Studio package for the ArcGIS Runtime SDK for Xamarin

GenerateUnitTest   1.0
Generates unit test code for methods in classes under test.

JetBrains ReSharper Platform 6   Build 6.0.20141219.120158 on 2014-12-19 12:56:02Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

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

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

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

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

VisualSVN   4.0.12
Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
Copyright © 2005-2015 VisualSVN Ltd. All rights reserved.

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.547.0 (20fd2f0)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.2.1 (86274adfc6418b4c3a9d67734eb871163859b51c)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.9.1.0 (02a05754f85064ec222c8a1a975761debfe7122d)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 19 apujadas 2016-08-04 17:17:40 UTC
Things got working as expected when set the number of parallel builds to 1 as this comment stated:

https://bugzilla.xamarin.com/show_bug.cgi?id=37492#c22
Comment 20 Mikael Nensén 2016-10-21 13:11:48 UTC
Happens to me too. Never had this issue before. Doing a couple of debugs and then running without debug just hangs vs. Have to kill and boot it up again. 

Trying out setting the number of parallel builds to 1 (default: 8).
Comment 21 Mikael Nensén 2016-10-21 13:21:36 UTC
Well that didn't do jack sh*t. Still hangs even when I'm doing a normal build with parallel builds set to 1.