Skip to content
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

[MAUI][.NET9] Searching on the “Search all recipes page” will cause the app to crash. #21033

Closed
jaosnz-rep opened this issue Mar 6, 2024 · 4 comments · Fixed by #21061
Closed
Assignees
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout csi-new fixed-in-9.0.0-preview.3.10457 i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working

Comments

@jaosnz-rep
Copy link

jaosnz-rep commented Mar 6, 2024

Description

Searching on the “Search all recipes page” will cause the app to crash.

Steps to Reproduce

1.Debug https://github.com/rachelkang/recipeSearch to Windows/Android/iOS/MacOS.
2. Enter some text on the search recipe and search to enter the ‘Search All Recipes’ page.
3. Searching for anything on the “Search all recipes page”.

Actual results:
The application will crash on the Android/iOS/Windows platform, but nothing happens after searching on the MacOS platform.

Windows:
WindowsCrash
Android:
AndroidCrash
iOS:
iOSCrash

Expected results:
Can search successfully.

Link to public reproduction project repository

https://github.com/rachelkang/recipeSearch

Version with bug

9.0.100-preview.2.24129.7

Is this a regression from previous behavior?

Yes, this used to work in .NET 9 Preview1 MAUI

Last version that worked well

9.0.0-preview.1.9973

Affected platforms

iOS, Android, Windows, macOS

@jaosnz-rep jaosnz-rep added t/bug Something isn't working platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 platform/android 🤖 platform/iOS 🍎 i/regression This issue described a confirmed regression on a currently supported version csi-new labels Mar 6, 2024
@rmarinho rmarinho linked a pull request Mar 6, 2024 that will close this issue
@rmarinho
Copy link
Member

rmarinho commented Mar 6, 2024

The workaround would be to add you csproj:

<MauiQueryPropertyAttributeSupport>true</MauiQueryPropertyAttributeSupport>

@PureWeen PureWeen added this to the .NET 9 Planning milestone May 15, 2024
@PureWeen PureWeen added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label May 15, 2024
@jonathanpeppers
Copy link
Member

MauiQueryPropertyAttributeSupport should have no effect when debugging:

<Target Name="_MauiPrepareForILLink" BeforeTargets="PrepareForILLink;_GenerateRuntimeConfigurationFilesInputCache">
<PropertyGroup>
<MauiEnableIVisualAssemblyScanning Condition="'$(MauiEnableIVisualAssemblyScanning)' == ''">false</MauiEnableIVisualAssemblyScanning>
</PropertyGroup>
<PropertyGroup Condition="'$(PublishAot)' == 'true' or '$(TrimMode)' == 'full'">
<MauiXamlRuntimeParsingSupport Condition="'$(MauiXamlRuntimeParsingSupport)' == '' ">false</MauiXamlRuntimeParsingSupport>
<MauiShellSearchResultsRendererDisplayMemberNameSupported Condition="'$(MauiShellSearchResultsRendererDisplayMemberNameSupported)' == ''">false</MauiShellSearchResultsRendererDisplayMemberNameSupported>
<MauiQueryPropertyAttributeSupport Condition="'$(MauiQueryPropertyAttributeSupport)' == ''">false</MauiQueryPropertyAttributeSupport>
<MauiImplicitCastOperatorsUsageViaReflectionSupport Condition="'$(MauiImplicitCastOperatorsUsageViaReflectionSupport)' == ''">false</MauiImplicitCastOperatorsUsageViaReflectionSupport>
</PropertyGroup>

private const bool IsQueryPropertyAttributeSupportedByDefault = true;

Was this being tested under NativeAOT or TrimMode=full?

@jonathanpeppers
Copy link
Member

Ok, I believe this is fixed in .NET 9 Preview 4, which is coming out "soon".

@jonathanpeppers jonathanpeppers added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label May 15, 2024
Copy link
Contributor

Hi @jaosnz-rep. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

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.

@dotnet-policy-service dotnet-policy-service bot removed this from the .NET 9 Planning milestone May 24, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout csi-new fixed-in-9.0.0-preview.3.10457 i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants