Skip to content

[BUG] Application crashes on theme change after using Popup with AppThemeBinding under Android #1608

@ParkerzSoft

Description

@ParkerzSoft

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Under Android, if you display a popup that uses AppThemeBinding to display theme-related colours, the application will crash the next time you try to change the theme. There is no problem under Windows.

Expected Behavior

I don't expect the application to crash after a theme change.

Steps To Reproduce

  1. Build the solution and run the application under Android.
  2. Click the "change theme" button. The background will change from yellow to green.
  3. Keep clicking it. Each click will go from yellow to green or green to yellow. This shows there is no problem at this stage for changing the theme.
  4. Now click the show popup button. A popup will be displayed (its colour dependant on the theme).
  5. Click outside the popup to dismiss it.
  6. Now click the "change theme" button. The application will immediately crash.

Link to public reproduction project repository

https://github.com/ParkerzSoft/MauiPopupAppThemeBug

Environment

- .NET MAUI CommunityToolkit: 7.0.0
- OS:Android 10
- .NET MAUI: 8.0.3

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/viewsIssue/Discussion/PR that has to do with ViewsbugSomething isn't workingunverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions