1

我有一个 ContentPage(称为 VideoPage),我在其中添加了一个 MediaElement,没有自动播放,也没有显示播放控件。

我使用 Navigation.PushAsync(new VideoPage()) 从另一个 ContentPage(称为 MainPage)导航到此页面

有时,当我使用默认的 shell 后退导航从 VideoPage 导航回 MainPage 时,MainPage 变得完全冻结/无响应。

情况并非总是如此,只是有时会发生这种情况,但如果我尝试几次,我会设法重现错误行为。

我使用 Xamarin Forms 4.7.1080。

这只发生在 iOS 上,在 Android 上我没有这个问题。

此行为与是否开始播放 MediaElement 中的 mp4 无关。

可以在此处找到示例应用程序:https ://wetransfer.com/downloads/c0cb60b8520c8fda40882a263c12574120200724125634/938ab9

这是我在测试应用程序中得到的故障转储:

Native Crash Reporting

==================================================== =============== 在执行本机代码时获得了 segv。这通常表示单声道运行时或您的应用程序使用的本机库之一中存在致命错误。

==================================================== =============== 本机堆栈跟踪:

```0x100bb0885 - /Users/gbladmin/Library/Developer/CoreSimulator/Devices/C16ED7B8-CA8C-4D19-967C-FF3E2218F340/data/Containers/Bundle/Application/7F89C9DB-08DC-40E3-802E-DF85C390EE7D/testmediaelement.iOS.app/testmediaelement.iOS : mono_dump_native_crash_info
0x100ba53e5 - /Users/gbladmin/Library/Developer/CoreSimulator/Devices/C16ED7B8-CA8C-4D19-967C-FF3E2218F340/data/Containers/Bundle/Application/7F89C9DB-08DC-40E3-802E-DF85C390EE7D/testmediaelement.iOS.app/testmediaelement.iOS : mono_handle_native_crash
0x100bb717b - /Users/gbladmin/Library/Developer/CoreSimulator/Devices/C16ED7B8-CA8C-4D19-967C-FF3E2218F340/data/Containers/Bundle/Application/7F89C9DB-08DC-40E3-802E-DF85C390EE7D/testmediaelement.iOS.app/testmediaelement.iOS : mono_sigsegv_signal_handler_debug
0x7fff51c005fd - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
0x7fff51bdda55 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_malloc.dylib : malloc
0x7fff258f25a3 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework/Foundation : NSKeyValueWillChangeWithPerThreadPendingNotifications
0x108a44a24 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/AccessibilityBundles/AVFoundation.axbundle/AVFoundation : -[AVPlayerAccessibility willChangeValueForKey:]
0x7fff2095ec53 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation : -[AVPlayer setRate:withVolumeRampDuration:playImmediately:rateChangeReason:]
0x7fff2095f01a - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation : -[AVPlayer setRate:]
0x100dd3949 - /Users/gbladmin/Library/Developer/CoreSimulator/Devices/C16ED7B8-CA8C-4D19-967C-FF3E2218F340/data/Containers/Bundle/Application/7F89C9DB-08DC-40E3-802E-DF85C390EE7D/testmediaelement.iOS.app/testmediaelement.iOS : xamarin_dyn_objc_msgSend
0x107b6c5c2 - Unknown
0x118b0db83 - Unknown
0x118b0d043 - Unknown```

==================================================== =============== 基本故障地址报告

本机指令指针(0x7fff50ba75f1)周围的内存:0x7fff50ba75e1 08 5b 41 5e 41 5f 5d c3 48 85 ff 7e 09 48 8b 07 .[A^A_].H..~.H.. 0x7fff50ba75f1 8a 40 1c 24 01 c3 3 c3 48 85 ff 74 17 78 1d .@.$..1..H..tx 0x7fff50ba7601 48 8b 07 48 85 c0 74 0d 48 89 c7 是 01 00 00 00 H..H..tH ..... . 0x7fff50ba7611 e9 a0 d4 00 00 48 8d 05 5b 1c 02 00 c3 48 89 f8 .....H..[....H..

==================================================== =============== 托管堆栈跟踪:

  ```at <unknown> <0xffffffff>
  at ObjCRuntime.Messaging:void_objc_msgSend <0x000e1>
  at AVFoundation.AVPlayer:Pause <0x00122>
  at Xamarin.Forms.Platform.iOS.MediaElementRenderer:Dispose <0x00253>
  at Foundation.NSObject:Dispose <0x00074>
  at Xamarin.Forms.Platform.iOS.DisposeHelpers:DisposeModalAndChildRenderers <0x0030f>
  at Xamarin.Forms.Platform.iOS.Platform:HandleChildRemoved <0x000d2>
  at Xamarin.Forms.Element:OnDescendantRemoved <0x00120>
  at Xamarin.Forms.Element:OnDescendantRemoved <0x001a2>
  at Xamarin.Forms.Element:OnDescendantRemoved <0x001a2>
  at Xamarin.Forms.Element:OnChildRemoved <0x00182>
  at Xamarin.Forms.ShellSection:OnChildRemoved <0x00372>
  at Xamarin.Forms.ShellSection:RemovePage <0x000d7>
  at <Xamarin-Forms-IShellSectionController-SendPopping>d__21:MoveNext <0x00522>
  at MoveNextRunner:InvokeMoveNext <0x000ab>
  at System.Threading.ExecutionContext:RunInternal <0x00585>
  at System.Threading.ExecutionContext:Run <0x00092>
  at MoveNextRunner:Run <0x001aa>
  at System.Threading.Tasks.AwaitTaskContinuation:InvokeAction <0x00093>
  at System.Threading.Tasks.AwaitTaskContinuation:RunCallback <0x00153>
  at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run <0x0013a>
  at System.Threading.Tasks.Task:FinishContinuations <0x00e0b>
  at System.Threading.Tasks.Task:FinishStageThree <0x0015a>
  at System.Threading.Tasks.Task`1:TrySetResult <0x0022a>
  at System.Threading.Tasks.TaskCompletionSource`1:TrySetResult <0x00092>
  at NavDelegate:DidShowViewController <0x00222>
  at <Module>:runtime_invoke_void__this___object_object_byte <0x001fa>
  at <unknown> <0xffffffff>
  at UIKit.UIApplication:UIApplicationMain <0x00254>
  at UIKit.UIApplication:Main <0x000b2>
  at UIKit.UIApplication:Main <0x00132>
  at testmediaelement.iOS.Application:Main <0x00092>
  at <Module>:runtime_invoke_void_object <0x00198>```

==================================================== ================

4

0 回答 0