dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.04k stars 1.73k forks source link

Maui.Controls.Compatibility.StackLayout; add children, chidlren.clear, re-add children -> System.ArgumentNullException: 'Value cannot be null. (Parameter 'view') #22702

Open HoGo72 opened 4 months ago

HoGo72 commented 4 months ago

Description

When using Microsoft.Maui.Controls.Compatibility.StackLayout

running on iOS: Click "update"-Button in App -> System.ArgumentNullException: 'Value cannot be null. (Parameter 'view')' running on Android: using recommended workaround DisconnectHandler -> OK If I don't add m_SearchView to Children it works.

When using Microsoft.Maui.Controls.StackLayout iOS: without workaround ok Android without workaround ok

Steps to Reproduce

Click "Update"-Button in App

Link to public reproduction project repository

https://github.com/HoGo72/MauiCompatibilityStacklayoutCrash.git

Version with bug

8.0.40 SR5

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 17.5

Did you find any workaround?

No response

Relevant log output

No response

github-actions[bot] commented 4 months ago

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Zhanglirong-Winnie commented 4 months ago

Hi, @HoGo72 We want to repro your problem, but we don't have permission to view the sample project. Could you release the permissions or provide it again? Thanks.

HoGo72 commented 4 months ago

Hi, @HoGo72 We want to repro your problem, but we don't have permission to view the sample project. Could you release the permissions or provide it again? Thanks.

Done

Zhanglirong-Winnie commented 4 months ago

Verified this issue with Visual Studio 17.11.0 Preview 1.0(8.0.40 & 8.0.21 & 8.0.3)&17.6.12(Build410). Can repro on iOS platform with sample project. image