[MonoTouch] App is crashing at random - the app completely freezes indefinitely
Sebastien Pouliot
sebastien at xamarin.com
Fri Mar 2 02:55:21 UTC 2012
On Thu, Mar 1, 2012 at 8:24 PM, MilkyJoe <leigh.bowers at curvenet.co.uk> wrote:
> Hi Sebastien.
>
> I only have a single instance of the UIWebView, so is this still something I
> need to consider/deal with?
It's less likely an issue - but still possible, e.g.
UIWebView wv = ... ;
// load splash screen
wv.LoadRequest (...);
... do a bunch of stuff ...
// load authentication form
wv.LoadRequest (...); // possible issue if the first one has not ended
> Is there a best practise example in MonoTouch of how to use the UIWebView
> "safely"?
Not that I know of and I don't think there's one for ObjectiveC
either. The same UI* thread rules applies (do everything on the main
thread except if the documentation tells you it's ok) and,
UIWebView-specific, serialize your usage of its API.
If you think it could be an issue (don't lose your precious time on
this otherwise) then you can adding a lock (or simply logging) around
it's usage - even if just for debugging and see if it changes/improve
things.
Sebastien
More information about the MonoTouch
mailing list