Forum Xamarin.Forms

More reliable startup with better error reporting

PhilippSumiPhilippSumi USMember ✭✭✭

When looking through my hockey app crashes, I'm seeing all kind of weird startup errors that occasionally happen here in development (Android), and the data gives me zero pointers to work with - see examples below. This is basically impossible to debug, not the least because I fail to reproduce it reliably, and NullReferenceException typically point towards a missing check of sorts. Either the Android platform screws up here, or Xamarin does. If it's the latter, the startup code really needs improving in both quality, checks and error handling/reporting. I feel super uncomfortable releasing something like this.

Samples:

_ WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.UInt32 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext)
android.runtime.JavaProxyThrowable: **System.NullReferenceException: Object reference not set to an instance of an object **
Xamarin caused by: android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, uint millisecondsTimeout, bool hasThreadAffinity, bool exitContext)<478340f1d1f44f03875f1bc9134bec35>:0_

IPlatformLayout.OnLayout android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
Xamarin caused by: android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout(bool changed, int l, int t, int r, int b):0
Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout(bool changed, int l, int t, int r, int b):0
Android.Views.ViewGroup.n_OnLayout_ZIIII(IntPtr jnienv, IntPtr native__this, bool changed, int l, int t, int r, int b)<8b895df7fe9d45569ab4ece8423b3db1>:0

Tagged:

Rejected · Last Updated

If this is a change proposal, please use the correct format. if it's a bug report, this is not the right place...

This discussion has been closed.