-
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
Going back using 'Shell.Current.GoToAsync("..")' causes a crash, but only when using a Mouse on an Android. #19461
Comments
Checked on a physical android device with a mouse, and it crashes the same. Is there a way to avoid this? |
Hi @Realinspirer. 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. |
Do you have a full stack trace as well? |
I added a public repository for the people. Also, I am unable to fetch the exception stack trace, maybe because it's caused internally, or I don't know. |
@Realinspirer if you grab a logcat after the crash that should have it |
Hi @Realinspirer. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. 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. |
Okay, here's the logcat logs right after the crash: Time Device Name Type PID Tag Message
|
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
Hi, I have the same issue with WSA. The system trace is below. at Microsoft.Maui.Controls.Platform.PointerGestureHandler.OnHover(View control, MotionEvent e) in D:\a_work\1\s\src\Controls\src\Core\Platform\Android\PointerGestureHandler.cs:line 26 This issue should be addressed now rather than pushing it to backlog because it prevents developers from testing the MAUI Android using WSA. It slows down the development cycle dramatically. |
I don't recall having this issue in dotnet 7. Kindly look into this issue. Thanks. |
I think it always crashed because of the hover thing on Android. I know I could be wrong about this hover thing, but that's the obvious thing I can think of. I also feel like it's more of a development problem of not being able to use a mouse to test android app, but also, on a physical device, that means that user cannot use mouse to operate a few buttons, that just makes it so much worse. I mean did have a high tag. Let's see. |
OK. I did not encounter any crash on WAS in dotnet 7. |
Using the latest version, this issue still persists with Windows Subsystem with Android. |
Description
...and due to a completely out of the world reason. At least that's what I am assuming.
So, I have a secondary back button in the
ContentPage
, which callsGoToAsync("..")
to go back. Please note that I was using Windows Subsystem for Android™️ for this testing, but I do believe this might be reproducible on any Android device with a connected mouse (though not tested).The button works perfectly when I tap it with my finger, but when I use the cursor to click the button, it crashes, and throws a
NullReferenceException
. I think what actually happens is MAUI tries to send aonhover
call after the back button is clicked, but the reference is cleared, and it crashes as a result, whereas in a tap, it doesn't have to send that hover event.Here's a video demonstration:
43gg.mp4
Or I might be completely wrong about this, because it seems that abnormal.
Steps to Reproduce
Shell.Current.GoToAsync("..")
NullReferenceException
.Link to public reproduction project repository
https://github.com/Realinspirer/tempcheck
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13 (others not checked)
Did you find any workaround?
A cheap workaround, kind of obvious, but may not work at times, is - disabling the back button before the page transition, so that the after events doesn't get into account.
Relevant log output
The text was updated successfully, but these errors were encountered: