tvOS crashes when listening to MediaPlayer events on device build
What is the current bug behavior?
tvOS app crashes when listening to MediaPlayer events (or any event coming from LibVLCSharp) on device build, for example, OnTimeChanged event.
What is the expected correct behavior?
The app should not crash.
Relevant logs and/or screenshots
System.ExecutionEngineException: Attempting to JIT compile method '(wrapper native-to-managed) void LibVLCSharp.Shared.MediaPlayerEventManager:OnTimeChanged (intptr)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_delegate_to_ftnptr(object)
at (wrapper managed-to-native) LibVLCSharp.Shared.EventManager+Native.LibVLCEventAttach(intptr,LibVLCSharp.Shared.EventType,LibVLCSharp.Shared.EventCallback,intptr)
at LibVLCSharp.Shared.EventManager.AttachNativeEvent (LibVLCSharp.Shared.EventType eventType, LibVLCSharp.Shared.EventCallback eventCallback) [0x0000c] in <39c5ff9aca5246f28f6e67d4683b1d22>:0
at LibVLCSharp.Shared.EventManager.Attach (LibVLCSharp.Shared.EventType eventType, System.Int32& registrationCount, System.Action managedSubscribe, System.Func`1[TResult] setCallback) [0x00013] in <39c5ff9aca5246f28f6e67d4683b1d22>:0
at LibVLCSharp.Shared.MediaPlayerEventManager.AttachEvent[T] (LibVLCSharp.Shared.EventType eventType, System.EventHandler`1[TEventArgs] eventHandler) [0x002a6] in <39c5ff9aca5246f28f6e67d4683b1d22>:0
at LibVLCSharp.Shared.MediaPlayer.add_TimeChanged (System.EventHandler`1[TEventArgs] value) [0x00006] in <39c5ff9aca5246f28f6e67d4683b1d22>:0
Environment
- OS: tvOS
- Version 12 and 13
- Device: Apple TV
- LibVLC version and architecture: tvOS 3.2.0
- LibVLCSharp version 3.2.2