New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on Android when hold app over 2 minutes in background #22284
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
Verified this issue with Visual Studio 17.10 Preview 6.0 (8.0.21), I can repro this error using a physical Android device (Samsung Android 13.0), but on the Android emulator it works fine. |
Can you attach a logcat file with your crash? |
@jaosnz-rep can you attach your repro please? |
I attached the Log and Output as follows I created a default .NET MAUI project to reproduce this error. The size is 96M and cannot be attached here. I can upload it to OneDrive if you need it. |
@jaosnz-rep You don't need to upload the bin/obj folders, you just need to upload the source code, preferably to a GitHub repo, as described in the note when making the issue. |
Also, if you could try doing what you're doing in a .NET Android app that doesn't implement that MAUI UI framework (You can create one using the CLI command |
I tried it on .NET Android project and it also reproduces on physical Android device. |
Description
Hi all,
Could you help to suggestion any solution for the crash issue on Android only ?
We detected this after hold app over 2 minutes in background. Then re-open the app, it was crashed.
This is log:
android.runtime.JavaProxyThrowable: [System.NullReferenceException]: Object reference not set to an instance of an object.
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at SPMobile.MAUI.App+<b__2_0>d.MoveNext(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at System.Threading.Tasks.Task+<>c.b__128_0(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at Android.App.SyncContext+<>c__DisplayClass2_0.b__0(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at Java.Lang.Thread+RunnableImplementor.Run(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at Java.Lang.IRunnableInvoker.n_Run(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(Unknown Source:0)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at mono.java.lang.RunnableImplementor.n_run(Native Method)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:31)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:942)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:226)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at android.os.Looper.loop(Looper.java:313)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8757)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
05-07 17:25:16.035 22354 22354 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.6 SR1
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
7.0.101
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
Not yet.
Relevant log output
The text was updated successfully, but these errors were encountered: