-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[NET 10 regression, Android] Back button crashes the app #32458
Copy link
Copy link
Closed
Labels
area-navigationNavigationPageNavigationPagei/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/androidregressed-in-10-preview1s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
In net9 when navigating to another page Navigation.PushAsync(new SecondPage()); and then clicking back button at the bottom of the screen (Android navigation bar) the SecondPage would be popped from the NavigationStack. In net10 instead of popping the app is closed.
Recording done with net 10:
Screen_Recording_20251109_140902_One_UI_Home.mp4
Also somehow I didn't notice it before but after clicking back button I get this error so maybe it's in fact a crash.
11-09 14:21:50.860 D/AndroidRuntime(28666): Shutting down VM
11-09 14:21:50.867 E/AndroidRuntime(28666): FATAL EXCEPTION: main
11-09 14:21:50.867 E/AndroidRuntime(28666): Process: com.companyname.net10issues, PID: 28666
11-09 14:21:50.867 E/AndroidRuntime(28666): android.runtime.JavaProxyThrowable: [System.ObjectDisposedException]: Cannot access a disposed object.
11-09 14:21:50.867 E/AndroidRuntime(28666): Object name: 'IServiceProvider'.
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException + 0x0(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService + 0x8(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Maui.MauiContext+WrappedServiceProvider.GetService(/_/src/Core/src/MauiContext.cs:87)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Maui.MauiContext+WrappedServiceProvider.GetService(/_/src/Core/src/MauiContext.cs:87)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService + 0x28(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService + 0xb(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Maui.MauiContextExtensions.GetDispatcher(/_/src/Core/src/MauiContextExtensions.cs:33)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Maui.Controls.Platform.Compatibility.ShellFragmentContainer.OnDestroy(/_/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFragmentContainer.cs:43)
11-09 14:21:50.867 E/AndroidRuntime(28666): at AndroidX.Fragment.App.Fragment.n_OnDestroy(C:\a\_work\1\s\generated\androidx.fragment.fragment\obj\Release
et10.0-android\generated\src\AndroidX.Fragment.App.Fragment.cs:2465)
11-09 14:21:50.867 E/AndroidRuntime(28666): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw + 0x11(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod + 0x86(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod + 0x65(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Android.App.Activity.OnDestroy + 0x0(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Microsoft.Maui.MauiAppCompatActivity.OnDestroy(/_/src/Core/src/Platform/Android/MauiAppCompatActivity.cs:49)
11-09 14:21:50.867 E/AndroidRuntime(28666): at Android.App.Activity.n_OnDestroy + 0xe(Unknown Source)
11-09 14:21:50.867 E/AndroidRuntime(28666): at crc6488302ad6e9e4df1a.MauiAppCompatActivity.n_onDestroy(Native Method)
11-09 14:21:50.867 E/AndroidRuntime(28666): at crc6488302ad6e9e4df1a.MauiAppCompatActivity.onDestroy(MauiAppCompatActivity.java:59)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.Activity.performDestroy(Activity.java:9850)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1559)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:6990)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:7035)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:52)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:63)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:169)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:101)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3150)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.os.Handler.dispatchMessage(Handler.java:110)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.os.Looper.loopOnce(Looper.java:273)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.os.Looper.loop(Looper.java:363)
11-09 14:21:50.867 E/AndroidRuntime(28666): at android.app.ActivityThread.main(ActivityThread.java:10060)
11-09 14:21:50.867 E/AndroidRuntime(28666): at java.lang.reflect.Method.invoke(Native Method)
11-09 14:21:50.867 E/AndroidRuntime(28666): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
11-09 14:21:50.867 E/AndroidRuntime(28666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
An unhandled exception of type 'Android.Runtime.JavaProxyThrowable' occurred in Mono.Android.Runtime.dll
An error occurred in the vsdbg debug session of project 'C:\Users\ovrbt\source\repos\Net10Issues\Net10Issues\Net10Issues.csproj': An unhandled exception of type 'Android.Runtime.JavaProxyThrowable' occurred in Mono.Android.Runtime.dll
Steps to Reproduce
- Navigate to any page
- Click back button
Link to public reproduction project repository
https://github.com/OvrBtn/Net10Issues
Version with bug
10.0.0-rc.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.110 SR11
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-navigationNavigationPageNavigationPagei/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/androidregressed-in-10-preview1s/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done