Bug 32726 - Debugger session ends with ObjectDisposedException
Summary: Debugger session ends with ObjectDisposedException
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 3.11 (C5)
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2015-08-03 15:50 UTC by PJ
Modified: 2017-06-23 14:57 UTC (History)
5 users (show)

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


Attachments
Xamarin logs as requested by Atin (752.30 KB, application/octet-stream)
2015-08-06 18:52 UTC, Michael Ribbons
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:
RESOLVED FIXED

Description PJ 2015-08-03 15:50:03 UTC
Reported in bug 18468, comment 4.

> I am seeing this quite a lot. Has been happening for the last year. Only
> posting now because it sometimes it seems to go away then comes back.
> 
> I always keep my Xam stuff up to date, here are current versions:
> 
> Microsoft Visual Studio Professional 2013
> Version 12.0.31101.00 Update 4
> Microsoft .NET Framework
> Version 4.5.50938
> 
> Installed Version: Professional
> 
> Xamarin   3.9.547.0 (20fd2f0)
> Xamarin.Android   4.20.2.1 (86274adfc6418b4c3a9d67734eb871163859b51c)
> Xamarin.iOS   8.9.1.0 (02a05754f85064ec222c8a1a975761debfe7122d)
> Xamarin.iOS Unified Migration   1.0
> 
> I get this in Xamarin Log. Not sure if it's always like this as I don't always
> check it:
> 
> [17-Apr-2015 09:27:30] Got connection from Visual Studio (log)
> [17-Apr-2015 09:27:30] Error: Error accepting log connection from Visual Studio
> [17-Apr-2015 09:27:30] Exception: Exception type:
> System.ObjectDisposedException
> The object was used after being disposed.
>   at System.Net.Sockets.Socket.EndAccept (System.Byte[]& buffer, System.Int32&
> bytesTransferred, IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
>   at System.Net.Sockets.Socket.EndAccept (IAsyncResult result) [0x00000] in
> <filename unknown>:0 
>   at Mtb.Server.Proxy.LogProxy.VS_IncomingOutput (IAsyncResult result)
> [0x00000] in <filename unknown>:0

The hallmark behavior is the ObjectDisposedException, and the error "Debugger Connection Lost".

Key additional information:
> Since switching from MVVMCross to Xamarin Forms I haven't seen the problem.

> I wonder if it's something to do with the 17 second startup time limit on iOS, as there is quite a lot of debug output from MVVMCross if the debug trace writer has been implemented to output to Debug.

See also:

Bug 18468, comment 5
Bug 18468, comment 6
Bug 18468, comment 7
Bug 18468, comment 8
Bug 18468, comment 9

Adding supplemental information for that issue.
Comment 1 PJ 2015-08-03 16:12:08 UTC
Michael's attachments from bug 18468:

https://bugzilla.xamarin.com/attachment.cgi?id=11639 - IDE Log from XS
https://bugzilla.xamarin.com/attachment.cgi?id=11640 - 'Xamarin' output in VS
https://bugzilla.xamarin.com/attachment.cgi?id=11641 - Screenshot
Comment 2 Michael Ribbons 2015-08-03 20:05:04 UTC
PJ,
Good job on separating the bugs out. This is the correct information.
Comment 3 Atin 2015-08-04 14:13:49 UTC
I have checked this issue with Compatible Xcode and iOS version i.e Xcode 6.4 and iOS 8.4. I have used Xaml sample and Xam.Forms.Mvx sample. I set the breakpoint in the finished launching method and breakpoint getting hit. When breakpoint hit on finished launching method then debugger only disconnect after 17-18 seconds and that's expected behavior. 

I am able reproduce the filed error i.e.

Bug 18468, comment 5
Bug 18468, comment 6
Bug 18468, comment 7
Bug 18468, comment 8
Bug 18468, comment 9

only when I use incompatible version of iOS and Xcode i.e. 8.4 iOS and Xcode 6.2. : here is the logs for the same : https://gist.github.com/Parmendrak/20abab7f7f2c919f378d

Could you please provide version information i.e. with which build of XVS and X.iOS you are getting this issue?

And it would be helpful if you provide ZipXamarin logs via Help->Xamarin->ZipXamarinlogs
Comment 4 Michael Ribbons 2015-08-04 18:56:54 UTC
Hi Atin,
Is it OK if you pick up my attachments from https://bugzilla.xamarin.com/show_bug.cgi?id=18468?

I believe this covers everything you requested.
Comment 5 Atin 2015-08-06 14:11:20 UTC
Hey Michael, we spent some time working on this and figured out a scenario where the **ObjectDisposedException** occurs, and it is similar to bug 31753”.

Xamarin Logs: https://gist.github.com/Shruti360/69bc54a3d1d9f25d757f

While we can use the attachments from bug 18468, that even those do not contain the full version information. Adding the full version information again at this point would help us make sure we’re hitting the same scenario.

Thanks
Comment 6 Michael Ribbons 2015-08-06 18:52:07 UTC
Created attachment 12396 [details]
Xamarin logs as requested by Atin

I had these saved since I first posted the bug.
Comment 7 Joaquin Jares 2017-06-23 14:57:00 UTC
This has been fixed for 15.2. I'm resolving this as fixed for internal verification. Please reopen if you're still seeing the issue.