Bug 43926 - Xamarin.iOS mismatch causing Visual Studio to crash
Summary: Xamarin.iOS mismatch causing Visual Studio to crash
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: High normal
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
URL:
: 44005 ()
Depends on:
Blocks:
 
Reported: 2016-08-31 23:09 UTC by Gerry
Modified: 2016-09-09 11:41 UTC (History)
8 users (show)

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


Attachments
Reproduction Logs (7.87 KB, application/zip)
2016-09-02 15:58 UTC, Ben Beckley
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 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 Gerry 2016-08-31 23:09:27 UTC
# Steps to reproduce
Install preview 3, load previously working project.  Wait a little bit and you'll get the "Microsoft Visual Studo 2015 has stopped working ..." and then VS restarts

# Expected behavior
No crash

# Actual behavior
Crash

# Supplemental info (logs, images, videos)


# Test environment (full version information)
Windows 10 Version 1607 (14915.1000)
Visual Studio Enterprise 2015 Version 14.0.25123.00 Update 2
Comment 1 Ben Beckley 2016-09-01 16:32:48 UTC
Hello Gerry,

Could you please update and try this again? Also, what kind of project are you trying to load, and would it be possible to share it?

If you do experience the crash again, please provide the About Information from VS as well as XS from the Mac if you are using a build host. Most importantly, please upload the IDE logs. You can find the logs here:
>%userprofile%\AppData\Local\Xamarin\Logs\14.0

If you are using a build host, it would be useful to have the logs from there as well. You can find them on your Mac at this location:
>~/Library/Logs/Xamarin-4.2
Comment 2 Gerry 2016-09-01 19:00:19 UTC
Ok, I just switched back to the beta channel and it crashed again as it was loading the solution.

The solution contains a PCL project and also an iOS & Android project. Right before the crash it looked like it was trying to connect to the Mac build agent.

VS About info:
Microsoft Visual Studio Enterprise 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.02001

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90000-02206-AA902
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.

Visual Basic 2015   00322-90000-02206-AA902
Microsoft Visual Basic 2015

Visual C# 2015   00322-90000-02206-AA902
Microsoft Visual C# 2015

Visual C++ 2015   00322-90000-02206-AA902
Microsoft Visual C++ 2015

Visual F# 2015   00322-90000-02206-AA902
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-90000-02206-AA902
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools 2015.1   14.1.20512.0
ASP.NET and Web Tools 2015.1

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

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

Azure App Service Tools v2.9.1   14.0.20519.0
Azure App Service Tools v2.9.1

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

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

CommonEditorPackage Extension   1.0
CommonEditorPackage Visual Stuido Extension Detailed Info

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft .NET Core Tools (Preview 1)   14.1.20512.0
Microsoft .NET Core Tools (Preview 1)

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40518.2

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

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

Project Template for UI for Xamarin Forms   1.0
This package contains a project template for Telerik UI for Xamarin Forms.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.31.0
TypeScript tools for Visual Studio

Xamarin   4.2.0.628 (f4d4600)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Inspector Support   0.6.1.0 (8d19529)
Adds support for inspecting Xamarin and WPF apps.

Xamarin.Android   7.0.0.3 (89d9d60)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.99.5.54 (974ea0b)
Visual Studio extension to enable development for Xamarin.iOS.

Logfile information below:
Xamarin Information: 0 : [2016-09-01 13:19:27.0286] Xamarin - 4.2.0.628-cycle8+f4d4600
Xamarin.VisualStudio.Activation.AccountManager Information: 0 : [2016-09-01 13:19:27.1882] VS2015 Enterprise
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.3366] No license found for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.4464] Running license sync for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.5524] Not logged in, using iOS VSEnterprise
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.6669] No license found for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.7875] Running license sync for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 13:19:27.9062] Not logged in, using Android VSEnterprise
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 13:19:28.1186] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 13:19:28.2402] Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage Warning: 0 : [2016-09-01 13:19:28.3656] Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2016-09-01 13:19:28.4901] MDAddinsHash: 00a35f60101b50c8fa28b2b8c0e5b8ade85f7083

Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 13:19:31.2919] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 13:19:31.4633] Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : [2016-09-01 13:19:31.6485] Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:19:48.9263] MacServer State transition from DisconnectedState to SshConnectingState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:19:55.3646] Starting Broker 4.2.0.628 in port 51707...
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:19:57.6049] MacServer State transition from SshConnectingState to SshConnectedState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:19:58.6283] SSH Connection established with the Mac Gerrys-Mac-Pro.local:51707
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:19:58.9586] MacServer State transition from SshConnectedState to AgentsStartingState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:19:59.1129] Starting agents on Mac Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:19:59.8138] Starting Agent IDB 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:20:00.0202] Starting Agent Build 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:20:00.9814] Starting Agent Designer 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:20:02.5058] Agent Build 4.2.0.628 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:20:04.9212] Agent IDB 4.2.0.628 is running
Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-09-01 13:20:06.0865] The installed Xamarin.iOS (version 9.8) on the Mac Gerrys-Mac-Pro.local (10.0.0.33) is not compatible with the local Xamarin.iOS 9.99.
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:20:06.4745] MacServer State transition from AgentsStartingState to DisconnectedState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 13:20:06.6757] Disconnected from Mac Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 13:20:06.8136] The underlying client has been closed
Comment 3 Jose Gallardo 2016-09-01 20:17:57 UTC
Hi Gerry,

It seems like you have an incompatible Xamarin.iOS on the Mac and that's causing VS to get disconnected.
From your logs:
> Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-09-01 13:20:06.0865] The installed Xamarin.iOS (version 9.8) on the Mac Gerrys-Mac-Pro.local (10.0.0.33) is not compatible with the local Xamarin.iOS 9.99.

That said, getting disconnected shouldn't make VS to crash anyway.

Can you please share with us what documents (.cs, storyboards, .xaml files, .xml Android layouts) have you open in your solution when it gets loaded? That would gives us a pointer to what components would be failing if it's related to an open doc. If that's the case, deleting the .suo file, or the .vs hidden folder from your solution folder might help as a workaround.

Another interesting test is to create a new app from scratch and see if it also crashes. In your case that can be done with an Android app, iOS app, and with a Xamarin Form PCL cross platform app, to help us to delimit the problem.

Also, please go to Xamarin - Help - Zip Logs and attach that zip file here, that file includes details that can help us to understand what's exactly failing.

Thanks!
Comment 4 Gerry 2016-09-02 02:56:12 UTC
Regarding incompatible X.iOS, yeah, I realize that but don't care since I'm just working on Android now on the Windows machine.

The current solution has nothing open on startup (everything is closed). As a side note, in the process of switching back & forth between stable & beta I ran across this issue with the MEF: https://bugzilla.xamarin.com/show_bug.cgi?id=40781

I can't submit this project to you as it is something for a client. I'll have to try a test project and see if I can reproduce it.
Comment 5 Gerry 2016-09-02 03:16:13 UTC
ok, I did a test and afterwards think it's definitely related to the iOS project (perhaps the mac build agent).

My test was to
a) create a new solution with an Android project (blank). That worked fine.
b) then I added a New iOS project to the solution (blank). VS then crashed after failing to connect to the Mac build agent. I say that because that was the last message displayed in the status bar.
Comment 6 Gerry 2016-09-02 03:30:49 UTC
One last thing--if I just open the iOS project directly it also crashes so definitely it is due to iOS.

See the log below.
==
Xamarin Information: 0 : [2016-09-01 22:10:58.8742] Xamarin - 4.2.0.628-cycle8+f4d4600
Xamarin.VisualStudio.Activation.AccountManager Information: 0 : [2016-09-01 22:10:59.0322] VS2015 Enterprise
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.1960] No license found for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.3104] Running license sync for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.4247] Not logged in, using iOS VSEnterprise
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.5779] No license found for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.6982] Running license sync for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-09-01 22:10:59.8325] Not logged in, using Android VSEnterprise
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 22:11:00.0530] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 22:11:00.1911] Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage Warning: 0 : [2016-09-01 22:11:00.3293] Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 22:13:10.0280] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-09-01 22:13:10.1688] Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage Warning: 0 : [2016-09-01 22:13:10.3080] Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2016-09-01 22:13:10.4431] MDAddinsHash: 00a35f60101b50c8fa28b2b8c0e5b8ade85f7083

Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:17.4520] MacServer State transition from DisconnectedState to SshConnectingState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:23.2677] Starting Broker 4.2.0.628 in port 58641...
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:25.6612] MacServer State transition from SshConnectingState to SshConnectedState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:26.6640] SSH Connection established with the Mac Gerrys-Mac-Pro.local:58641
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:26.8775] MacServer State transition from SshConnectedState to AgentsStartingState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:27.0219] Starting agents on Mac Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:27.8089] Starting Agent IDB 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:27.9722] Starting Agent Build 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:28.8729] Starting Agent Designer 4.2.0.628...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:30.3100] Agent Build 4.2.0.628 is running
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:32.7654] Agent IDB 4.2.0.628 is running
Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2016-09-01 22:13:34.0714] The installed Xamarin.iOS (version 9.8) on the Mac Gerrys-Mac-Pro.local (10.0.0.33) is not compatible with the local Xamarin.iOS 9.99.
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:34.4900] MacServer State transition from AgentsStartingState to DisconnectedState on Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-09-01 22:13:34.6561] Disconnected from Mac Gerrys-Mac-Pro.local (10.0.0.33)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-09-01 22:13:34.7999] The underlying client has been closed
Xamarin.VisualStudio.IOS.MacServer Information: 0 : [2016-09-01 22:13:34.9579] The Xamarin Mac Agent could not be fully started. Agents not started: IDB 4.2.0.628, Designer 4.2.0.628, Build 4.2.0.628. Please check the logs for more details.
Comment 7 Ben Beckley 2016-09-02 15:58:06 UTC
Created attachment 17316 [details]
Reproduction Logs

Hello Gerry,

Thank you for providing the additional information. I was able to reproduce the issue, and the Xamarin iOS mismatch does appear to be the problem.

Mac info: https://gist.github.com/BenBeckley/3b5d96642c61892e0ce12de41dc5922d
Windows info: https://gist.github.com/BenBeckley/5bc99ba59680d87019adea5993d15c8a
Comment 8 Gerry 2016-09-03 15:58:10 UTC
Glad to hear you can reproduce it. For now I've removed the iOS project from our solution. Once you have a fix out I will update and add it back in.
Comment 10 Ben Beckley 2016-09-06 15:30:37 UTC
*** Bug 44005 has been marked as a duplicate of this bug. ***
Comment 15 Mohit Kheterpal 2016-09-09 11:41:40 UTC
As per comment 14, Jon confirmed that this issue is resolved fixed, hence closing this issue by marking it as Verified fixed.

thanks