Bug 24051 - Quitting Xamarin Studio kills csproxy process, causing iOS designer timeout until build host is reconnected
Summary: Quitting Xamarin Studio kills csproxy process, causing iOS designer timeout u...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS Designer ()
Version: 3.7
Hardware: PC Windows
: --- minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-24 22:48 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-02-10 03:55 UTC (History)
5 users (show)

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


Attachments
Log files (28.38 KB, application/zip)
2014-10-24 22:48 UTC, Brendan Zagaeski (Xamarin Team, assistant)
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 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-24 22:48:49 UTC
Created attachment 8508 [details]
Log files

Quitting Xamarin Studio on the build host kills the csproxy process, causing the iOS designer to timeout until VS has been disconnected and reconnected to the build host.


Note: I think the steps to reproduce this bug are in fact an explicitly unsupported scenario, so this bug can probably be marked INVALID without further investigation. I'm filing the bug mostly so that the various stack traces and error messages will be searchable in case they appear for users in other, supported scenarios at some point in the future.

The managed stack trace looks like it might be the same error as in bug 21367, comment 7.


## Steps followed to reproduce

1. Pair with the iOS Build Host.

2. Open a storyboard in the iOS designer.

3. Open an iOS project in Xamarin Studio on the Mac build host.

4. Quit Xamarin Studio. After this step Activity Monitor shows no `csproxy` process.

5. Attempt to make a change on the storyboard in Visual Studio.

6. The iOS designer canvas will show the waiting spinner indefinitely.

7. Quit Visual Studio.


## Results

### devenv*.log

> [2014-10-24 21:54:06.7] [2014-10-25 01:54:06.7] Error marshaling native exception: Could not load mono_runtime_invoke
> [2014-10-24 21:54:07.0] [2014-10-25 01:54:06.7] NSDistantObject (0x223d400) is invalid (no connection)
> [2014-10-24 21:54:07.2] [2014-10-25 01:54:06.7] Stacktrace:
> [2014-10-24 21:54:08.5] [2014-10-25 01:54:06.7] 
> [2014-10-24 21:54:08.7] [2014-10-25 01:54:06.7]   at <unknown> <0xffffffff>
> [2014-10-24 21:54:08.9] [2014-10-25 01:54:06.7]   at (wrapper managed-to-native) MonoTouch.Hosting.Internal.Messaging.monomac_Int64_objc_msgSend (intptr,intptr) <0xffffffff>
> [2014-10-24 21:54:09.1] [2014-10-25 01:54:06.7]   at Bindings.SimDevice.get_State () <0x0001b>
> [2014-10-24 21:54:09.3] [2014-10-25 01:54:06.7]   at MonoTouch.Hosting.CoreSimulatorSession.get_IsRunning () <0x00033>
> [2014-10-24 21:54:09.6] [2014-10-25 01:54:06.7]   at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (bool) <0x00191>
> [2014-10-24 21:54:09.8] [2014-10-25 01:54:06.7]   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (System.Action`1<System.IO.Stream>,System.Action`1<System.IO.Stream>,bool) <0x000a5>
> [2014-10-24 21:54:10.1] [2014-10-25 01:54:06.7]   at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest,bool) <0x000c7>
> [2014-10-24 21:54:10.3] [2014-10-25 01:54:06.7]   at Mtb.Server.Commands.DesignerSendPayload.HandleRequest (MonoTouch.Tools.Utilities.ILoggingHelper,object) <0x00527>
> [2014-10-24 21:54:10.5] [2014-10-25 01:54:06.7]   at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext,object) <0x00433>
> [2014-10-24 21:54:10.7] [2014-10-25 01:54:06.7]   at Mtb.Server.Listener.OnRequest (object) <0x008b0>
> [2014-10-24 21:54:10.9] [2014-10-25 01:54:06.7]   at System.Threading.Tasks.TaskActionInvoker/ActionObjectInvoke.Invoke (System.Threading.Tasks.Task,object,System.Threading.Tasks.Task) <0x00018>
> [2014-10-24 21:54:11.1] [2014-10-25 01:54:06.7]   at System.Threading.Tasks.Task.InnerInvoke () <0x00050>
> [2014-10-24 21:54:11.3] [2014-10-25 01:54:06.7]   at System.Threading.Tasks.Task.ThreadStart () <0x002b7>
> [2014-10-24 21:54:11.4] [2014-10-25 01:54:06.7]   at System.Threading.Tasks.Task.Execute () <0x00013>
> [2014-10-24 21:54:11.6] [2014-10-25 01:54:06.7]   at System.Threading.Tasks.TpScheduler.TaskExecuterCallback (object) <0x00033>
> [2014-10-24 21:54:11.8] [2014-10-25 01:54:06.7]   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>


### iOSDesigner*.log

> [2014-10-24 21:54:06.7] INFO: Reloading: Server rendering completed in 6ms with 214 bytes
> [2014-10-24 21:54:06.7] ERROR: EnsureSession (counter 0): MonoTouch.Design.Client.InvalidSessionException: Session invalid
>    at MonoTouch.Design.Client.ServerProcessConnection.SendRequest(CommandRequest req, Boolean throwIfNotRunning)
>    at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse](CommandRequest req, Boolean throwIfNotRunning)
>    at MonoTouch.Design.Client.ServerProcessConnection.PostXml(DesignSession session, String xml, String[] viewsToHide)
>    at MonoTouch.Design.Client.ServerProcessConnection.PostXml(DesignSession session, XElement fullStoryboard, XElement[] partialElements, String[] viewsToHide)
>    at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass1b.<RenderSingle>b__1a(ServerProcessConnection c)
>    at MonoTouch.Design.Client.IPhoneDesignerSession.<>c__DisplayClass79`1.<EnsureSession>b__75()
> [2014-10-24 21:54:06.7] INFO: Reloading: Serialization took 0ms

### mtbserver.log

> [24-Oct-2014 21:54:02] Request handled in 2.639ms
> [24-Oct-2014 21:54:06] Handling with command: [DesignerSendPayload: CommmandUrl=DesignerSendPayload] (15)
> [24-Oct-2014 21:54:06] Attempting to acquire command execution lock, timeout set to 00:10:00
> [24-Oct-2014 21:54:06] Deserializing designer command: 0.673ms
> [24-Oct-2014 21:54:06] Command [DesignerSendPayload: CommmandUrl=DesignerSendPayload] finished (15)
> [24-Oct-2014 21:54:06] Request handled in 3.81ms
> [24-Oct-2014 21:54:06] Handling with command: [DesignerSendPayload: CommmandUrl=DesignerSendPayload] (15)
> [24-Oct-2014 21:54:06] Attempting to acquire command execution lock, timeout set to 00:10:00
> [24-Oct-2014 21:54:06] Deserializing designer command: 0.402ms
> [24-Oct-2014 21:54:11] Request handled in 4.04ms
> [24-Oct-2014 21:54:17] Request handled in 2.549ms
 

### Additional results

`mtbserver` also crashes (crash log attached).


## Version information

### Windows
Xamarin   3.7.230.0 (e78d10d6993f95fc3ebe791aeb4aacff165bf8bb)
Xamarin.iOS   8.4.0.0 (209abebbd8f1a292d042420edb45fa5fbd3f017b)

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Windows 8.1 64-bit (in VMWare Fusion 6.0.5)


### Mac build host

Xamarin Studio Version 5.5.2 (build 3)
Mono 3.10.0 ((detached/e204655)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000023

Release ID: 505020003
Git revision: 6d4c806e383ba366b15fbccca9ddc1ba94f8d5ad
Build date: 2014-10-15 15:00:36-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

Xcode 6.1 (6604), Build 6A1052d

Xamarin.iOS, Version: 8.4.0.16 (Business Edition)
Hash: 80e9ff7
Build date: 2014-10-22 15:09:12-0400

Mac OS X 10.9.5
Comment 1 Alex Corrado [MSFT] 2014-10-27 13:39:10 UTC
There was an issue that prevented the VS designer from recovering from server restarts. This was fixed in XVS master by d867b46b35c4481aa1f87b7bec984a04ec89dfc4
Comment 2 Saurabh 2015-02-10 03:55:24 UTC
I have checked this Issue with latest builds and observed that csproxy does not goes away after quieting XamarinStudio. This is the screencast for the same: http://www.screencast.com/t/fQfqcD9AWqc

X.S 5.7 (Build 661)
X.iOS 8.6.1.24

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0446016-02238
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0446016-02238
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446016-02238
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446016-02238
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446016-02238
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446016-02238
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446016-02238
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.

Windows Phone SDK 8.0 - ENU   06177-004-0446016-02238
Windows Phone SDK 8.0 - ENU

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

ASP.NET and Web Tools   12.4.51016.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 Websites
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.21010.0
For additional information, visit http://www.asp.net/

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

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
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

PowerShell Tools   1.3
Provides file classification services using PowerShell

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

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.293.0 (080a254)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.1.0 (3b3ef438017c7ecf486defa9e01567a5f2b3cb2a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified