[mono-android] Troubleshooting an ANR - Global Exception Handler?

Miljenko Cvjetko mcvjetko at holisticware.net
Sun Feb 26 20:02:16 UTC 2012


Hi

Few weeks ago there was discussion about that...
For Android to make long story short:

System.AppDomain.CurrentDomain.UnhandledException +=
+= new UnhandledExceptionEventHandler(AppDomain_Handler);

Android.Runtime.AndroidEnvironment.UnhandledExceptionRaiser +=
new 
EventHandler<RaiseThrowableEventArgs>(AndroidEnvironment_UnhandledExceptionRaiser);

should catch a lot, but not all Exceptions (even on desktop this is not 
allways possible)

regards

mel

On 2012.02.25 16:35, devbuzz wrote:
> My application is crashing occasionally and I'm having a difficult time
> tracking down the error.
>
> The app uses an in-process service which synchronizes data in the
> background.
>
> The crashes seem pretty random and I'm I'm unable to reproduce it with any
> consistency.
>
> At time the app will run for 12 hrs straight and other times it will crash
> after 20 minutes.
>
> When it crashes it locks up the app and the service and I get an ANR dialog.
>
> Is there a Global Exception Handler that I can handle to write unhandled
> error information to?
>
> In .NET CF I have used the Global Exception Handler like this:
>
> AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
>
> to successfully isolate errors and I'm wondering if there is something like
> that in MfA?
>
> I've got Log.Debug statements all over in my code but there doesn't seem to
> be a pattern to the crashes.
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/Troubleshooting-an-ANR-Global-Exception-Handler-tp5515296p5515296.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid


-- 
Miljenko Cvjetko dipl.ing. ET
	Direktor/CEO
	Projektant rješenja/Solution Architect	
	Razvojni programer/Senior developer
	Voditelj projekta/Project Manager

IX južna obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: mcvjetko at holisticware.net
w: http://www.holisticware.net



More information about the Monodroid mailing list