Bug 15066 - ObjectDisposedException at System.Net.WebConnection.Write
Summary: ObjectDisposedException at System.Net.WebConnection.Write
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2013-09-30 10:08 UTC by asp_net
Modified: 2016-11-11 09:34 UTC (History)
1 user (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 or GitHub 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 asp_net 2013-09-30 10:08:31 UTC
I am randomly facing an exception when posting data to the server. It's really hard to reproduce.

The full stacktrace:

Unhandled Exception:
System.ObjectDisposedException: The object was used after being disposed.
  at System.Net.WebConnection.Write (System.Net.HttpWebRequest request, System.Byte[] buffer, Int32 offset, Int32 size, System.String& err_msg) [0x00023] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnection.cs:1144 
  at System.Net.WebConnectionStream.WriteHeaders () [0x00015] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnectionStream.cs:679 
  at System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer) [0x000f8] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnectionStream.cs:649 
  at System.Net.HttpWebRequest.SendRequestHeaders (Boolean propagate_error) [0x0010c] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1257 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Net.Http.HttpResponseMessage].GetResult () [0x00011] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs:58 
  at System.Net.Http.HttpClient+<SendAsyncWorker>c__async5.MoveNext () [0x000a9] in /Developer/MonoTouch/Source/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:273 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Net.Http.HttpResponseMessage].GetResult () [0x00033] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xyz.Client.IPhone.Api.Client.ApiClient+<PrepareApiResponse>c__asyncA`1[System.String].MoveNext () [0x00084] in /Users/Thomas/Development/Xyz/iPhone App/App/Xyz.Client.IPhone.Api.Client/Client/ApiClient.cs:142 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[Xyz.Client.IPhone.Api.Client.ApiResponse`1[System.String]].GetResult () [0x00033] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xyz.Client.IPhone.Api.Client.ApiClient+<PostAsync>c__async3`1[System.String].MoveNext () [0x00022] in /Users/Thomas/Development/Xyz/iPhone App/App/Xyz.Client.IPhone.Api.Client/Client/ApiClient.cs:47 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 
  at System.Runtime.CompilerServices.TaskAwaiter`1[Xyz.Client.IPhone.Api.Client.ApiResponse`1[System.String]].GetResult () [0x00033] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59 
  at Xyz.Sync.NewlyCreatedCommentsPushCommand+<PushNewlyCreatedComment>c__asyncA.MoveNext () [0x00183] in /Users/Thomas/Development/Xyz/iPhone App/App/Xyz.Sync/Push/Comments/NewlyCreatedCommentsPushCommand.cs:38
Comment 1 Martin Baulig 2016-11-11 09:34:49 UTC
Closing ancient bugs, please reopen if you're still having this problem.