Closed KasperSommer closed 3 months ago
The log message about broadcast manager can be ignored. As to the crash I will look into that today. For now a workaround to keep testing is remove the handler disconnect for now. I should have a fix today or tomorrow to test.
Thank you very much, sounds good. I can remove the disconnect in the above simple test, however, I also use toolkit IPopupService in my real app which results in the same crash.
Can you also call disconnect in the Closing of a Popup?
I am sorry, it might not be due to the popup. It might actually be just by going to and back from the page without the disconnect.
Ok this is a big issue. Easy workaround though. Add an image as Artwork will prevent crash. Fix will be out later today!
Example workaround:
<toolkit:MediaElement
WidthRequest="500"
HeightRequest="400"
MetadataArtworkUrl = "https://lh3.googleusercontent.com/pw/AP1GczNRrebWCJvfdIau1EbsyyYiwAfwHS0JXjbioXvHqEwYIIdCzuLodQCZmA57GADIo5iB3yMMx3t_vsefbfoHwSg0jfUjIXaI83xpiih6d-oT7qD_slR0VgNtfAwJhDBU09kS5V2T5ZML-WWZn8IrjD4J-g=w1792-h1024-s-no-gm"
Source="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" />
@KasperSommer can you test this PR against your project https://github.com/CommunityToolkit/Maui/pull/2144 It should be fixed now in this PR.
I have fixed the right bug this time I think? The previous listed bug was for a CTD in windows. Sorry about the confusion. The issue listed above was app exiting and not actually crashing. The destroy method was being called on page exit and it had a command to exit app. That was a poor decision by me to put that their. I have removed all of that. Now it will only close the service and not shut the app down.
Wow, thank you for very quick action, amazing 😊 It seems to work perfectly in my project now, also with/without popups. Do you have any idea when it will be available on Nuget?
Thanks again!
AndroidX.LocalBroadcastManager.Content.LocalBroadcastManager not supported on Android 13 and above] While this does not cause a crash, it does spam the log, and it would be nice if it went away. After testing for half an hour, I now have 200+ occurrences of this in the log.
AndroidX.LocalBroadcastManager.Content.LocalBroadcastManager not supported on Android 13 and above] While this does not cause a crash, it does spam the log, and it would be nice if it went away. After testing for half an hour, I now have 200+ occurrences of this in the log.
Latest version on Main has those log messages removed. It will be out on next nuget.
@ne0rrmatrix do you know when next nuget will be? Our project is stuck on this exit on mediaelement error and we cannot move ahead. It was fixed 3 weeks ago. Thanks.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
I have created a new Maui project. Added Community Toolkit and Community Toolkit MediaElement (following https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/mediaelement?tabs=android#clean-up-mediaelement-resources)
Created a new page (Test.xaml) with the mediaElement. When the media element is started or stopped the following error is causing an exception:
MediaManager: Error: AndroidX.LocalBroadcastManager.Content.LocalBroadcastManager not supported on Android 13 and above.
Added clean up from same link above:
This causes the entire app to crash with exception:
Expected Behavior
Well, just being able to play and stop video and also leaving the page without the app to cause exceptions and crash.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/KasperSommer/MediaElementIssue
Environment
Anything else?
I have mentioned it here as well: https://stackoverflow.com/questions/78894331/maui-community-toolkit-mediaelement-crashing?noredirect=1#comment139101057_78894331
I really hope I have done this correctly :)