-
Notifications
You must be signed in to change notification settings - Fork 482
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
This is not an issue on Windows, MacCatalyst or Android.
When a MediaElement is present on a page then navigating pages using the shell menu causes a UIViewControllerHierarchyInconsistency crash on iOS 26.1 onwards. It works fine on 26.0.1 and below and fails on 26.1 and above so looks like it was introduced by some change in 26.1.
It works on the 1st navigation but happens on the 2nd navigation attempt regardless of which page you're navigating to. Once you've navigated the second time the Shell navigation becomes unresponsive.
Expected Behavior
Navigation should not become unresponsive after navigation between pages on iOS.
Steps To Reproduce
- Open and run the solution from the reproduction repository targeted at an iOS simulator
- Using the shell hamburger, navigate to Projects then navigate back to Dashboard
- Crashes and navigation is no longer responsive
Link to public reproduction project repository
https://bitbucket.org/KeithBoynton/media-element-shell-issue/src/master/
Environment
- .NET MAUI MediaElement: 7.0.0
- OS: iOS 26.1
- .NET MAUI: 10.0.31Anything else?
Crash looks like this (full dump attached):
Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer: Warning: Failed on changing current item
ObjCRuntime.ObjCException: Objective-C exception thrown. Name: UIViewControllerHierarchyInconsistency Reason: child view controller:<AVPlayerViewController: 0x194df4800> should have parent view controller:<Microsoft_Maui_Platform_PageViewController: 0x1081a69f0> but actual parent is:<Microsoft_Maui_Platform_PageViewController: 0x1081501d0>
Not sure whether it's relevant but this is the only "similar" issue I could find:
#1110