Rolf,
I think I have a lead on these. Would it happen if I did this:
try
{
this.InvokeOnMainThread( delegate
{
// my code here
});
}
catch
{
// report exception
}
Basically, does the invoking a delegate mean that there is no stack trace from
the calling code?
Dino
From: [email protected]
[mailto:[email protected]] On Behalf Of Dean Cleaver
Sent: Tuesday, December 13, 2011 9:54 AM
To: Rolf Bjarne Kvinge
Cc: [email protected]
Subject: Re: [MonoTouch] Exceptions with no stack trace in my code
Rolf,
No - I'm not. I do use web services, but never Begin/End - always direct calls,
even if they are on different threads. But occasionally I get those errors
trapped and reported back.
And I just got this one trapped and returned:
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name:
NSInternalInconsistencyException Reason: Attempt to create two animations for
cell
No idea how that occurred, nor the "two animations for cell" when I don't
create any. Only animation I have done is on a UIView which has nothing to do
with any table cells. Also got this one:
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name:
NSInternalInconsistencyException Reason: Invalid update: invalid number of rows
in section 0. Attempt to delete more rows than exist in section.
But that's it - nothing more than that. Not a hint of any of my code or
anything.
Dino
From: Rolf Bjarne Kvinge
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Tuesday, December 13, 2011 6:28 AM
To: Dean Cleaver
Cc: [email protected]<mailto:[email protected]>
Subject: Re: [MonoTouch] Exceptions with no stack trace in my code
Hi,
It looks like you're using (async) web services. The processing is
automatically done on a separate thread, so it is expected that none of your
code shows up in the stack trace (you provided an event handler or a callback
which will be called when the processing is done, that's when your code will
show up).
In this case it looks like the connection to the server was interrupted, though
exactly how you should deal with that depends on your app.
Rolf
On Tue, Dec 13, 2011 at 4:35 AM, Dean Cleaver
<[email protected]<mailto:[email protected]>>
wrote:
Hi,
I am getting various exceptions from a web service in code trapped I believe by
the "AppDomain.CurrentDomain.UnhandledException", and then reported back to me.
System.Net.WebException: Error: ConnectFailure (interrupted) --->
System.Net.Sockets.SocketException: interrupted
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
Confusing thing is, there is no reference to any of my code at all. How can
this happen? Surely somewhere in every call regardless of the thread, there has
to be at least one function of mine - given I never directly create a thread
calling code other than mine.
Any ideas how to work out how this exception and other similar ones are
occurring?
Dino
_______________________________________________
MonoTouch mailing list
[email protected]<mailto:[email protected]>
http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch