XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] iOS app crashes after navigating back from page with MediaElement

Open tabachuk opened this issue 3 years ago • 7 comments

Description

iOS app crashes after navigating back from page that contains MediaElement.

Stack trace: image

VideoPlayerPage.xaml: image

VideoPlayerPage.xaml.cs: image

VideoPlayerVM: image

Steps to Reproduce

  1. Implement page with MediaElement inside.
  2. Navigate to this page.
  3. Navigate back to the previous page.

Expected Behavior

Navigating back works fine.

Actual Behavior

App crashes immediately after navigating.

Basic Information

  • Version with issue: 1.1.0
  • Last known good version: -
  • IDE: Visual Studio for Mac Community
  • Platform Target Frameworks:
    • iOS

tabachuk avatar Apr 21 '21 13:04 tabachuk

@tabachuk thanks for this report. Could you attach a small repro?

pictos avatar Apr 21 '21 23:04 pictos

I have already solved this problem by adding Source binding for MediaElement in XAML instead of assigning Source value in code behind. Now it works fine for me.

@pictos I can create a repo with a small test project if you still need it.

tabachuk avatar Apr 23 '21 10:04 tabachuk

@tabachuk if you can do it will be great, that way we can see if this behavior is a bug.

pictos avatar Apr 24 '21 00:04 pictos

@pictos https://github.com/tabachuk/VideoPlayerCrash

tabachuk avatar Apr 26 '21 06:04 tabachuk

Thanks @tabachuk! I'll take a look this week 👍

brminnick avatar May 06 '21 18:05 brminnick

Any news from this one? I'm having the same issue

huyvuskedulo avatar Feb 16 '22 04:02 huyvuskedulo

Hi @huyvuskedulo! Apologies, this issue completely slipped my mind.

I'm still unable to reproduce this.

https://github.com/tabachuk/VideoPlayerCrash

The link provided to a reproduction sample throws a 404 Not Found error.

Looking at the screenshots provided, it appears to be a problem when using Prism.

brminnick avatar Feb 25 '22 18:02 brminnick