You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Xamarin Android: System.NullReferenceException on any exception thrown inside Task #7102
If we try to throw any exception inside a Task and not catch it, the original exception is lost and NullReferenceException is raised instead. If we try to catch the exception, it works properly.
This behavior is not observed in VS2019, it works properly there with this same project.
Attached Screenshot provides all the necessary information.
Stack trace output:
at Android.Runtime.JNINativeWrapper._unhandled_exception (System.Exception e) [0x0000e] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:12
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V (_JniMarshal_PPL_V callback, System.IntPtr jnienv, System.IntPtr klazz, System.IntPtr p0) [0x0001d] in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:111
at (wrapper native-to-managed) Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(intptr,intptr,intptr)
Activity
jpobst commentedon Jun 16, 2022
Possible duplicate of #7085?
jonathanpeppers commentedon Jun 16, 2022
Yeah, I think this will be fixed by: #7103