Skip to content

[BUG] MediaElement 7.0.0 and 8.0.0 causes crash on iOS 26.1 when navigating shell pages #3066

@KeithBoynton

Description

@KeithBoynton

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

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

  1. Open and run the solution from the reproduction repository targeted at an iOS simulator
  2. Using the shell hamburger, navigate to Projects then navigate back to Dashboard
  3. 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.31

Anything 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

MediaElementCrash.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions