-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
App crashes when navigating after the app has been in the background #12553
Comments
Hi @Martinchr82. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@Martinchr82 so if your app is built in debug mode it doesn't crash? |
@PureWeen That is correct. In debug mode it doesn´t crash. |
Hi @Martinchr82. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@rachelkang I have now updated my initial post with more details and added a GitHub repo, which reproduces the issue |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Will this be fixed in .Net 7? Seems similar to an issue fixed in .Net 8. #11259 This is a huge change from Xamarin to not allowing the main page to change in the background. |
Description
App crashes when navigating to another page, after the app has been in the background, on Android in Release.
Steps to Reproduce
Create a new project (.NET MAUI APP) with .NET 7.0
Visual Studio 2022 17.4.3
MSBuild version 17.4.0+18d5aef85 for .NET
Add a second page to the project and create a tabBar in AppShell.xaml with the two pages.
Open app -> set app in background -> when pressing SecondPage(the second tab) in the tabBar, the app crashes and the splash screen is shown, and we are sent to MainPage.
If the above is done for a second time, then the app crashes again, but this time it does not come to splash screen.
After this, when opening the app again, everything works.
GitHub repo: https://github.com/Martinchr82/ShellBackgroundCrash
It only happens when build for Release.
I am setting it to Release, and running this in Developer PowerShell:
dotnet publish -f:net7.0-android -c:Release /p:AndroidSigningKeyPass=PasswordHere /p:AndroidSigningStorePass=PasswordHere
I have removed the password and the keyStore file from the Github repo.
After building for release, I install com.companyname.shellbackgroundcrash-Signed.apk on my real device, which is a Samsung Galaxy S8, running Android 9
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 9 and 10 (Has not tried other versions)
Did you find any workaround?
No
Relevant log output
I am getting two different crashes, one for when the app crashes completely and one for when the app is restarted with the splash screen.
The text was updated successfully, but these errors were encountered: