Bug 20369 - VS2013 crashes after connect/disconnecting to Build host (when only existing projects)
Summary: VS2013 crashes after connect/disconnecting to Build host (when only existing ...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-05 06:22 UTC by Prashant Cholachagudda
Modified: 2016-12-22 18:43 UTC (History)
8 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 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:
RESOLVED FIXED

Description Prashant Cholachagudda 2014-06-05 06:22:56 UTC
After Xamarin 3 update Visual Studio 2013 crashes on connect/disconnecting to Build host
with existing projects opened

Error log:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at 
Microsoft.VisualStudio.Shell.Interop.IVsSolution4.ReloadProject(System.Guid 
ByRef)
at 
Xamarin.VisualStudio.ExtensionMethods.Load(Microsoft.VisualStudio.Shell.Interop.IVsHierarchy)
at 
Xamarin.VisualStudio.Shell.ShellPackage.<HandleCurrentEntitlements>b__2()
at 
System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, 
System.Object, Int32)
at 
MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, 
System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at 
System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at 
System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object, Boolean)
at 
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object, Boolean)
at 
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, 
System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, 
IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean 
ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at 
System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, 
System.Object, Int32)
at 
MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, 
System.Delegate, System.Object, Int32, System.Delegate)
at 
System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, 
System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
Comment 2 Akhilesh kumar 2014-06-05 08:15:33 UTC
We have tried to reproduce this issue 3-4 times but we are not able to reproduce. VS 2013 is not getting crash when we are connecting/disconnecting the Build Host for existing projects.

Could you please provide test steps to reproduce this issue?

Screencast: http://screencast.com/t/GsAL42yqF3J

Environment info:
VS 2013
Xamarin   3.0.54.0 (d3cf238e3845e930e312b6ec9b4c6c5437c33067)
Xamarin.Android   4.12.4.20 (b5dc5ce91305e19de51d71a1122c109719c4bc34)
Xamarin.iOS   3.0.54.0 (d3cf238e3845e930e312b6ec9b4c6c5437c33067)

Build Host
X.iOS 7.2.3.39
Comment 3 bczfeocv 2014-06-05 12:36:42 UTC
After playing around a bit more, I have noticed that this only happens when I open the project first (This is only happening on one of my Xamarin projects, it is under TFS source control).

I can open a different project first (of any type), then close it, then I am able to open the Xamarin project without issues.

Additionally, I can open the project from Source Control Explorer without crashing.  After it opens successfully once, I can open the project successfully using any method until I close and reopen VS.

All other methods of opening the project crash.

Steps:
1.) Open new instance of VS 2013
2.) Open the project without opening any other projects first or opening it from source control.
Comment 5 Paul Diston 2014-06-30 12:04:41 UTC
I am experiencing the same issue. Is there a fix or is the work around already suggested the only way to solve this?
Comment 6 Paul Diston 2014-06-30 12:16:44 UTC
The only way that I seem to be able to open the solution is via the Source Control Explorer, double clicking on the .SLN in File Explorer or opening Visual Studio 2013 and then clicking on the recent solution do not work.

After opening the solution successfully via the source control explorer, I am still unable to open the solution by using either of the two recent solution ways.
Comment 7 bczfeocv 2014-07-18 20:03:41 UTC
I had a strange issue where I had multiple Xamarin installs on my VS.  I think this was causing the issue.  I have uninstalled Xamarin completely and reinstalled and the issue has stopped.
Comment 8 Emanuel 2016-12-22 18:43:37 UTC
Hi,
As we've introduced several improvements around VS/Mac connectivity and the iOS build system, I'll mark the bug as resolved fixed.
Please feel free to reopen it if you can still reproduce the issue with current bits.
Thanks!