Bug 42037 - After closing multiple android designer file, user is unable to open android designer file again.
Summary: After closing multiple android designer file, user is unable to open android ...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 7.1 (d15-3)
Hardware: PC Mac OS
: High critical
Target Milestone: master
Assignee: Jérémie Laval
: 52693 55475 ()
Depends on:
Reported: 2016-06-21 16:54 UTC by Atin
Modified: 2018-02-26 05:34 UTC (History)
7 users (show)

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

Force-Quit a non-responsive VS4M (191.46 KB, image/png)
2017-07-17 19:38 UTC, Tom Opgenorth
Sample project to duplicate the issue (9 layout files). (34.62 KB, application/zip)
2017-07-17 19:39 UTC, Tom Opgenorth

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 42037 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:

Comment 1 Tom Opgenorth 2017-07-17 19:37:55 UTC
I can duplicate this behaviour. It seems that trying to open an AXML file as described in step #3 causes VS4M to become non-responsive; have to Force-Quit the app.

VS4M information:

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version 7.1 Preview (7.1 build 1281)
Installation UUID: ef2cd217-c6d2-4b3a-8525-cd01cc0c9e21
	Mono (2017-04/3d531ba) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000209

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/1.0.4/Sdks
SDK Version: 1.0.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: bf350ba5
Branch: d15-3
Build date: 2017-07-05 11:08:04-0400

=== Xamarin.Android ===

Version: (Visual Studio Enterprise)
Android SDK: /Users/tom/Library/Android/sdk
	Supported Android versions:
		5.0 (API level 21)
		5.1 (API level 22)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.0

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Build Information ===

Release ID: 701001281
Git revision: cc3abfe9b515ed0e209041e00d3ea239e8e33df9
Build date: 2017-07-10 21:15:50-04
Xamarin addins: 73710b74251e471826f2d9981d3a2bee6c4e78ad
Build lane: monodevelop-lion-d15-3

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:13:31 PDT 2017
    root:xnu-3789.60.24~4/RELEASE_X86_64 x86_64
Comment 2 Tom Opgenorth 2017-07-17 19:38:27 UTC
Created attachment 23607 [details]
Force-Quit a non-responsive VS4M
Comment 3 Tom Opgenorth 2017-07-17 19:39:18 UTC
Created attachment 23608 [details]
Sample project to duplicate the issue (9 layout files).
Comment 4 Tom Opgenorth 2017-07-17 21:36:38 UTC
There are some other bugs that seem to be duplicates of this bug in that the exhibit the same net effect: Visual Studio for Mac is unresponsive and hangs when trying to open a layout file in the VS4M Android Designer.

Steps to duplicate: 
1. Open the project in the attached zip.
2. Open at least 8 of the layout files in the Android Studio designer.
3. Close all the open designers.
4. Try to open any one of the layout files.
5. The macOS "spinning beachball" appears, and VS4M is unresponsive. 

Expected Result: Designer file should open
Comment 5 Tom Opgenorth 2017-07-17 21:37:58 UTC
*** Bug 55475 has been marked as a duplicate of this bug. ***
Comment 6 Tom Opgenorth 2017-07-17 21:41:26 UTC
*** Bug 52693 has been marked as a duplicate of this bug. ***
Comment 7 Rod Barnes 2017-07-18 13:19:37 UTC
You may want to look at another Android Designer Host defect I've encountered.  It may be related.  You can read about it here:  https://developercommunity.visualstudio.com/content/problem/78229/xaml-viewer-indirect-rendering-enabled-javalangnul.html#reply-form
Comment 8 Barry Nolte 2018-02-26 05:34:01 UTC
I was having this same problem and I appear to have tracked down at least beginnings of figuring this out.  Since AdroidDesignerHost is either a Java app, or runs Java code, I speculated that something could be wrong with my Java environment.  I uninstalled the Oracle Java I had installed:

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane 
sudo rm -fr ~/Library/Application\ Support/Java

This made the problem go away and now the host runs at a reasonable < 1% cpu utilization.

I was also able to reinstall the latest Java (Version 8 Update 161) and not run into the problem again.

Hope this info helps.