Maui
Maui copied to clipboard
[BUG] Basic MediaElement crashes when targetting iOS 17.4 yet works fine on 17.2
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] 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
Simply having a MediaElement on a ContentPage crashes on startup when the project is targetting iOS 17.4 yet it works just fine when targetting 17.2.
Here is the interesting part of the stack trace:
Managed Stacktrace:
at <unknown> <0xffffffff>
at ObjCRuntime.Messaging:IntPtr_objc_msgSend <0x00098>
at AVKit.AVPlayerViewController:.ctor <0x00096>
at CommunityToolkit.Maui.Core.Views.MediaManager:CreatePlatformView <0x0003e>
at CommunityToolkit.Maui.Core.Handlers.MediaElementHandler:CreatePlatformView <0x000fc>
at Microsoft.Maui.Handlers.ViewHandler`2:OnCreatePlatformView <0x0008a>
at Microsoft.Maui.Handlers.ViewHandler:OnCreatePlatformElement <0x0001e>
at Microsoft.Maui.Handlers.ElementHandler:CreatePlatformElement <0x0001e>
Full Output attached.. ApplicationOutput_SampleProject.txt
Expected Behavior
I expect the solution to run without crashing.
Steps To Reproduce
- Clone and load the attached sample project
- Run it and target it at any simulator based on iOS 17.4
- Observe the crash immediately
- Run it and target it at any simulator based on iOS 17.2
- Observe it run successfully with no crash
Link to public reproduction project repository
https://bitbucket.org/KeithBoynton/media-element-crash/src/master/
Environment
- .NET MAUI CommunityToolkit.Maui.MediaElement: 3.1.1
- OS: macOS Sonoma 14.4.1
- .NET MAUI: 8.0.21
Anything else?
No response
do you use xcode 15.3 in order to support newer versions of the iOS sdk? 15.3 isn't supported yet, as far as I know, resulting in lots of crashes - this could be entirely unrelated to the toolkit.
Yes thanks @MitchBomcanhao also see https://github.com/dotnet/maui/issues/21057
Can you please confirm @KeithBoynton ?
Yes thanks guys, I am indeed using 15.3... I've subscribed to 21057 so I can see when that is resolved and hopefully this IS unrelated to the toolkit.. fingers crossed
MediaElement running on 17.4 iOS emulator using Xcode 14.3 using Mac Build host from Windows 11. Using current main. @vhugogarcia
Sample Video:
https://github.com/CommunityToolkit/Maui/assets/4167863/6565da98-68e0-4475-9fe4-d008a1cd85b4
Thanks @ne0rrmatrix for helping us to run some tests. I'm closing this issue, we can reopen it again in case the issue appears again.