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

Crash App when change ControlTemplate and click item in Android App MAUI #22229

Closed
ChanNL-IT opened this issue May 6, 2024 · 3 comments
Closed
Labels
area-xaml XAML, CSS, Triggers, Behaviors legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working

Comments

@ChanNL-IT
Copy link

Description

I have a ControlTemplate in a CustomView, which will receive two StackLayout StaffLayout and AdminLayout.

When I click Staff Tab, it will assign ControlTemplate with StaffLayout and I click item in layout, it will normal. And then change to click Admin Tab, it will assign ControlTemplate with AdminLayout.
Error occur when I click again to Staff Tab , and then click to item in layout, the app is crashed and error comeout in debug section.

I place debug breakpoint in when assign ControlTemplate and see that ControlTemplate updated to another one, and Item in it changes when tab changes. But when I click in item, the error occur. And this error only happen in Android platform, this work normal on iOS platform.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.6 SR1

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 11 and up

Did you find any workaround?

No response

Relevant log output

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Maui.Platform.MauiTextView'.
@ChanNL-IT ChanNL-IT added the t/bug Something isn't working label May 6, 2024
Copy link
Contributor

github-actions bot commented May 6, 2024

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.

@PureWeen PureWeen added the s/needs-repro Attach a solution or code which reproduces the issue label May 7, 2024
Copy link
Contributor

Hi @ChanNL-IT. 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.

@PureWeen PureWeen added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 7, 2024
@jsuarezruiz jsuarezruiz added area-xaml XAML, CSS, Triggers, Behaviors platform/android 🤖 labels May 7, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label May 13, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-xaml XAML, CSS, Triggers, Behaviors legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants