Bug 21497 - System.Net.ServicePoint.SendRequest fails with System.NullReferenceException exception on Monotouch
Summary: System.Net.ServicePoint.SendRequest fails with System.NullReferenceException...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: master
Hardware: Macintosh Other
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-22 02:18 UTC by Mustafa Shaik
Modified: 2016-05-25 00:19 UTC (History)
3 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 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 NORESPONSE

Description Mustafa Shaik 2014-07-22 02:18:04 UTC
Hi,
I am using RestSharp 104.4 to perform HTTP requests and in some specific scenario I am getting the following exception from System.Net.ServicePoint.

Here is the StackTrace of the Exception:
Jul 21 18:07:01 iphone-5c iOS[155] <Warning>: *** Exception details: 
	Message: Object reference not set to an instance of an object
	Stacktrace:   at System.Net.ServicePoint.SendRequest (System.Net.HttpWebRequest request, System.String groupName) [0x00000] in <filename unknown>:0 
	  at System.Net.HttpWebRequest.GetResponseAsyncCB2 (System.Net.WebAsyncResult aread) [0x00000] in <filename unknown>:0 
	  at System.Net.HttpWebRequest.BeginGetResponse (System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0 
	  at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0 
	  at RestSharp.Http.GetRawResponse (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0 
	  at RestSharp.Http.GetResponse (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0 

Steps to reproduce:
* I allowed my app(phone) to go to sleep for more than 5 mins.
* Then brought my phone back to active mode and tried to refresh my app to perform few calls.
* This resulted in the HTTP request to fail with exception.

Surprising thing is I tried to retry this particular failed call once I see this exception for 3 times and 3 times consistently this fails with the same exception.

Any help is highly appreciable.

Regards
Mustafa Shaik
Comment 1 Prashant manu 2014-07-22 03:24:03 UTC
Could you please provide us the exact test steps you followed. If possible please
attach a small complete project that demonstrates this behavior.

Also can you please add the logs from the following places?:
On XS IDE Log  Location: XS>Help> Open Log Directory> IDE.log file (with latest
timestamp)
Comment 2 Sebastien Pouliot 2016-05-25 00:19:21 UTC
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!