-
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
NullReferenceException with a platform-specific GestureRecognizer #24900
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:
|
Would you also be able to test with the latest available .NET MAUI version? 8.0.90, small chance, but maybe we fixed it there already? |
This issue has been verified and can repro using Visual Studio 17.12.0 Preview 2.0(8.0.90 & 8.0.70), but not repro on 8.0.61. |
there's no default, hence the null ref. but it should no-op, and not fail. Does this happens on release builds as well ? |
I can confirm this. it fails on both Debug ans Release |
- fixes #24900 Co-authored-by: Stephane Delcroix <[email protected]>
Description
On Windows (didn't check the other platforms), a NullReferenceException occurs when adding a GestureRecognizer that is conditioned by an OnPlatform, such as no GestureRecognizer is defined in the current (Windows) platform:
Un-commenting the WinUI part above makes the NullReferenceException disappear.
Attached the complete reproduction project, which is basically a empty MAUI App project with the XAML definition from above.
GestureRecognizerCrash.zip
Steps to Reproduce
Result: crash with a NullReferenceException
Link to public reproduction project repository
No response
Version with bug
8.0.70 SR7
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.61 SR6.1
Affected platforms
Windows
Affected platform versions
Windows 10.0.19041.0
Did you find any workaround?
Un-commenting the lines in the XAML extract above fixes the crash.
Downgrading both dependencies (maybe one is enough?) below from version 8.0.70 to version 8.0.61 also fix the crash:
Relevant log output
The text was updated successfully, but these errors were encountered: