I'm only sending 30 to 300 records, no images (they're handled separately, and 
the locations having errors are not using images).

Problem I have is that they were able to connect milliseconds later to send the 
error report to me - so if it's a bad connection, it's intermittent.

I have exception handling in every single function in the entire app - but 
these exceptions are not occurring anywhere in my code - that's my core issue.

Dino

From: Jason Hardman [mailto:[email protected]]
Sent: Sunday, October 07, 2012 19:29
To: Dean Cleaver; James Darbyshire
Cc: [email protected]
Subject: RE: [MonoTouch] Any ideas what causes this?

When I had the data size issue my web server was trying to send 50000 records 
at once.  Once I changed it to 1000 records it was all good.  If the record 
counts are low, maybe images are the problem?  For me it was consistent and 
easy to replicate.  After relooking at your errors, exception 2 and 3 looks 
like it was unable to connect to the server.  Maybe exception 1 was caused by 
corrupted data from being dropped?  In any case you should put exception 
handling around your web calls and either try the call again or inform the user 
of a bad connection.  The nature of mobile apps is that will not always be 
connected so you need to be able to handle these situations.

From: Dean Cleaver 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Monday, 8 October 2012 12:40 p.m.
To: James Darbyshire
Cc: Jason Hardman; [email protected]<mailto:[email protected]>
Subject: RE: [MonoTouch] Any ideas what causes this?

Appreciate it James, but I fear it's possibly something where you have to be 
actively using the app 24/7 for it to occur. This app is designed for Valet 
Parking providers, who issue tickets and process requests all day long - this 
is why I've not seen it as I just don't use the app enough to see it.

I'm also curious that some venues see more of this issue than others. Either 
means their data packets are larger than the rest (not the case as I have 
eyeballed some and they should have much less data than other venues) or their 
internet connection is really slow/problematic.

Dino

From: James Darbyshire 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Sunday, October 07, 2012 17:54
To: Dean Cleaver
Cc: Jason Hardman; [email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] Any ideas what causes this?

Dino,

Always happy to test on my devices if you need a hand.

Regards,

James

On 08/10/2012, at 9:50 AM, Dean Cleaver 
<[email protected]<mailto:[email protected]>> 
wrote:
I'm using the standard Visual Studio calls to the web client - so if I have a 
method called "Fred" I call "service.Fred()".I don't use async, but I do use my 
own threads so there's no blocking.

I'll look into the response property, but it's a long slow fix - won't be till 
we publish to Apple again that I'll start to get that information, and can then 
look at fixing it. I can't reproduce these errors, but they're happening to a 
few clients in the field.

Dino

From: Jason Hardman [mailto:[email protected]]
Sent: Sunday, October 07, 2012 17:10
To: Dean Cleaver; [email protected]<mailto:[email protected]>
Subject: RE: Any ideas what causes this?

How are you making the web calls?  It is your choice to use async or not.  
Maybe you are using a library that is forcing it to use async?  If you are 
there might be sync methods available.  I know RestSharp has sync and async 
methods.  Personally I am using async so we can use the same code on Windows 
Phone if we ever get that far.

The WebException has a Response property that you should be able to use to 
determine the Url that was called.

From: Dean Cleaver 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Monday, 8 October 2012 10:21 a.m.
To: Jason Hardman; [email protected]<mailto:[email protected]>
Subject: RE: Any ideas what causes this?

Yeah - I figured it was because of some Async calls, but I don't use the Async 
calls directly - so Mono? must be calling async?

And I have about 80 to 100 different web service calls - so I'm unsure which 
ones to page. If there was any hint as to what part of my code was causing the 
problem it would be useful, but I just have nothing to go on.

From: Jason Hardman 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Sunday, October 07, 2012 16:15
To: Dean Cleaver; [email protected]<mailto:[email protected]>
Subject: RE: Any ideas what causes this?

The errors are to do with making calls to the web asynchronously i.e. the error 
is occurring on a different thread to the code that started it, hence your 
namespace is not displayed.

I have experienced the first error when the data being returned was large.  My 
fix was to change my WCF Web API to use paging and then update my RestSharp 
code (in MonoTouch) to make the web calls while passing the paging parameters.  
RestSharp is a library that simplifies making web calls to REST web services as 
it automatically serialises the data into objects.

From: 
[email protected]<mailto:[email protected]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 On Behalf Of Dean Cleaver
Sent: Monday, 8 October 2012 7:56 a.m.
To: [email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] Any ideas what causes this?

And this one:

System.Net.WebException: Error: ConnectFailure (No route to host) ---> 
System.Net.Sockets.SocketException: No route to host
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] 
in :0
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) 
[0x00000] in :0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) 
[0x00000] in :0
at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in :0
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (System.String 
method_name, System.Object[] parameters) [0x00000] in :0

Dino

From: Dean Cleaver
Sent: Sunday, October 07, 2012 13:48
To: Dean Cleaver; [email protected]<mailto:[email protected]>
Subject: RE: Any ideas what causes this?

Likewise this one:

System.Net.WebException: The request timed out
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) 
[0x00000] in :0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in :0
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse 
(System.Net.WebRequest request) [0x00000] in :0

Once again - none of my code nor namespaces at all. How does this happen?

Dino

From: 
[email protected]<mailto:[email protected]> 
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
 On Behalf Of Dean Cleaver
Sent: Sunday, October 07, 2012 13:47
To: [email protected]<mailto:[email protected]>
Subject: [MonoTouch] Any ideas what causes this?

System.Net.WebException: Error getting response stream (ReadDone2): 
ReceiveFailure ---> System.Exception:
at System.Net.WebConnection.ReadDone(IAsyncResult result)
at System.Net.WebConnection.HandleError (WebExceptionStatus st, 
System.Exception e, System.String where) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) 
[0x00000] in :0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in :0
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse 
(System.Net.WebRequest request) [0x00000] in :0

It must be being reported by this?

AppDomain.CurrentDomain.UnhandledException += 
HandleAppDomainCurrentDomainUnhandledException;

Because none of the above is my code - there is no "Xception" nor "KleverLogic" 
namespace in the call. And any ideas what could cause it?

Dino
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to