LibVLCSharp issueshttps://code.videolan.org/videolan/LibVLCSharp/-/issues2020-02-10T02:45:58Zhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/123Fatal error when I subscribe to the MediaPlayer.Vout event2020-02-10T02:45:58ZStéphane MitermiteFatal error when I subscribe to the MediaPlayer.Vout eventHello,
If I subscribe to the MediaPlayer.Vout event, when the end of the video is reached (or if I call the MediaPlayer.Stop() method), I get a fatal error that kills my app.
You can test with [this project](https://github.com/kakone/L...Hello,
If I subscribe to the MediaPlayer.Vout event, when the end of the video is reached (or if I call the MediaPlayer.Stop() method), I get a fatal error that kills my app.
You can test with [this project](https://github.com/kakone/LibVLCSharp.Forms.MediaPlayerElement). When the end is reached, the app explode :)
Cordially,
Stephane.https://code.videolan.org/videolan/LibVLCSharp/-/issues/231Create Xamarin.Android sample for Linux devs using Rider2019-10-05T08:18:17ZMartin FinkelCreate Xamarin.Android sample for Linux devs using RiderXamarin.Android seems officially supported on Linux through the Rider IDE.Xamarin.Android seems officially supported on Linux through the Rider IDE.https://code.videolan.org/videolan/LibVLCSharp/-/issues/375Support newer Uno versions2020-10-11T13:45:40ZMartin FinkelSupport newer Uno versions### Problem to solve
Updating LibVLCSharp.Uno to latest Uno releases fails the Android build.
### Intended users
LibVLCSharp.Uno Android users
### Proposal
```
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(17,71,17,84): error...### Problem to solve
Updating LibVLCSharp.Uno to latest Uno releases fails the Android build.
### Intended users
LibVLCSharp.Uno Android users
### Proposal
```
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(17,71,17,84): error CS0103: The name 'ContextHelper' does not exist in the current context
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(18,29,18,48): error CS0029: Cannot implicitly convert type 'LibVLCSharp.Platforms.Android.VideoView' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(116,11,116,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Border' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(174,11,174,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Grid' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(63,76,63,184): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(63,76,63,184): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(68,76,68,174): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(68,76,68,174): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(63,76,63,178): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(63,76,63,178): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(2630,11,2630,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Grid' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(16,30,16,50): error Uno0001: Windows.System.Display.DisplayRequest is not implemented in Uno
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(26,13,26,41): error Uno0001: Windows.System.Display.DisplayRequest.RequestActive() is not implemented in Uno
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(34,13,34,42): error Uno0001: Windows.System.Display.DisplayRequest.RequestRelease() is not implemented in Uno
2>Done building project "LibVLCSharp.Uno.csproj" -- FAILED.
```
repro https://code.videolan.org/mfkl/LibVLCSharp/-/commit/fe77824fadfadcd1cbb31848d9e66fbbe2767c61
### Documentation
<!-- What kind of documentation is needed for this feature? -->https://code.videolan.org/videolan/LibVLCSharp/-/issues/406Using SetDialogHandlers later results in a segmentation fault on Android x86/...2021-12-22T15:01:28ZRobert GouletUsing SetDialogHandlers later results in a segmentation fault on Android x86/x64 only### Summary
Using SetDialogHandlers to override "Question" for the case of overriding the dialog for insecure HTTPS connections results in a segmentation fault.
### Minimal project and steps to reproduce
1. Open "LibVLCSharp.Android.S...### Summary
Using SetDialogHandlers to override "Question" for the case of overriding the dialog for insecure HTTPS connections results in a segmentation fault.
### Minimal project and steps to reproduce
1. Open "LibVLCSharp.Android.Sample" in the Samples directory.
2. Add the call to SetDialogHandlers in the code. The example below should be good enough to repro the problem.
````
....
_libVLC = new LibVLC(enableDebugLogs: true);
_libVLC.SetDialogHandlers((title, text) => Task.CompletedTask,
(dialog, title, text, username, store, token) => Task.CompletedTask,
(dialog, title, text, type, canceltext, firstactiontext, secondactiontext, token) => Task.CompletedTask,
(dialog, title, text, indeterminate, position, canceltext, token) => Task.CompletedTask,
(dialog, position, text) => Task.CompletedTask);
_mediaPlayer = new MediaPlayer(_libVLC)
{
EnableHardwareDecoding = true
};
....
````
3. Change the URL to point to a "https" site that has a certificate that is not signed by a trusted CA. You don't have to have it actually serve up any media file because it never gets that far. This example should work without having to stand up a web server:
````
using var media = new Media(_libVLC, new Uri("https://self-signed.badssl.com/"));
````
### What is the current *bug* behavior?
Segmentation fault occurs
### What is the expected *correct* behavior?
No crash. If I put a breakpoint on the lambda I'd expect to hit that. I can't override the function to accept the dialog because it crashes.
### Does it work on other plaforms? Does it work with the official VLC apps?
I have only tested on Android. This is likely only applicable to libvlcsharp. The official VLC app works fine.
### Relevant logs and/or screenshots
````
11-15 06:33:02.629 D/VLC (19867): [d39e3030/4d9b] libvlc input: Creating an input for '(null)'
11-15 06:33:02.632 D/VLC (19867): [d39e3030/4db1] libvlc input: using timeshift granularity of 50 MiB
11-15 06:33:02.632 D/VLC (19867): [d39e3030/4db1] libvlc input: using default timeshift path
11-15 06:33:02.632 D/VLC (19867): [d39e3030/4db1] libvlc input: `https://self-signed.badssl.com/' gives access `https' demux `any' path `self-signed.badssl.com/'
11-15 06:33:02.632 D/VLC (19867): [e80e2830/4db1] libvlc input source: creating demux: access='https' demux='any' location='self-signed.badssl.com/' file='(null)'
11-15 06:33:02.632 D/VLC (19867): [e80e28d0/4db1] libvlc demux: looking for access_demux module matching "https": 6 candidates
11-15 06:33:02.633 D/VLC (19867): [e80e28d0/4db1] libvlc demux: no access_demux modules matched
11-15 06:33:02.633 D/VLC (19867): [e80e2970/4db1] libvlc stream: creating access: https://self-signed.badssl.com/
11-15 06:33:02.634 D/VLC (19867): [e80e2970/4db1] libvlc stream: looking for access module matching "https": 24 candidates
11-15 06:33:02.634 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: looking for tls client module matching "any": 1 candidates
11-15 06:33:02.634 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: using GnuTLS version 3.5.19
11-15 06:33:02.638 D/Mono (19867): DllImport searching in: 'libvlc' ('libvlc.so').
11-15 06:33:02.638 D/Mono (19867): Searching for 'libvlc_media_release'.
11-15 06:33:02.638 D/Mono (19867): Probing 'libvlc_media_release'.
11-15 06:33:02.639 D/Mono (19867): Found as 'libvlc_media_release'.
11-15 06:33:02.666 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: loaded 137 trusted CAs from system
11-15 06:33:02.666 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: using tls client module "gnutls"
11-15 06:33:02.667 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: resolving self-signed.badssl.com ...
11-15 06:33:02.738 D/HostConnection(19867): HostConnection::get() New Host Connection established 0xe9aa1370, tid 19890
11-15 06:33:02.745 D/HostConnection(19867): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
11-15 06:33:02.755 I/ConfigStore(19867): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
11-15 06:33:02.756 I/ConfigStore(19867): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
11-15 06:33:02.757 I/OpenGLRenderer(19867): Initialized EGL, version 1.4
11-15 06:33:02.757 D/OpenGLRenderer(19867): Swap behavior 1
11-15 06:33:02.765 D/eglCodecCommon(19867): setVertexArrayObject: set vao to 0 (0) 0 0
11-15 06:33:02.765 D/EGL_emulation(19867): eglCreateContext: 0xe9a854e0: maj 2 min 0 rcv 2
11-15 06:33:02.767 D/EGL_emulation(19867): eglMakeCurrent: 0xe9a854e0: ver 2 0 (tinfo 0xe9a83c30)
11-15 06:33:02.803 D/HostConnection(19867): createUnique: call
11-15 06:33:02.804 D/HostConnection(19867): HostConnection::get() New Host Connection established 0xe9aa15f0, tid 19890
11-15 06:33:02.808 D/HostConnection(19867): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_async_unmap_buffer GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_2
11-15 06:33:02.808 E/eglCodecCommon(19867): GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
11-15 06:33:02.816 D/EGL_emulation(19867): eglMakeCurrent: 0xe9a854e0: ver 2 0 (tinfo 0xe9a83c30)
11-15 06:33:02.828 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: TLS handshake: Resource temporarily unavailable, try again.
11-15 06:33:02.878 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: TLS handshake: Success.
=================================================================
Native Crash Reporting
=================================================================
Got a SEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
No native Android stacktrace (see debuggerd output).
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0xf0e4833c):
11-15 06:33:02.878 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: - safe renegotiation (RFC5746) enabled
11-15 06:33:02.878 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: - false start (RFC7918) enabled
0xf0e4832c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0xf0e4833c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0xf0e4834c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0xf0e4835c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................11-15 06:33:02.878 E/VLC (19867): [d3890eb0/4db1] libvlc tls client: Certificate verification failure: The certificate is NOT trusted. The certificate issuer is unknown.
11-15 06:33:02.879 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: 1 certificate(s) in the list
11-15 06:33:02.879 D/VLC (19867): [d3890eb0/4db1] libvlc tls client: no known certificates for self-signed.badssl.com
11-15 06:33:02.886 F/libc (19867): Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xf0e4833c in tid 19889 (config_GetGener), pid 19867 (ompanyname.app2)
````
### Environment
- OS: Android
- Version Pie 9.0
- Device: Android TV (Emulator in Visual Studio)
- LibVLC version and architecture LibVLC.Android 3.2.0
- LibVLCSharp version 3.4.9
### Possible fixes
Unknownhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/616Log callback interop for Android simulator2023-06-26T07:19:26ZwinkmichaelLog callback interop for Android simulator### Summary
Xamarin Forms app, running _libVLC.Log += LibVLC_Log; overload which contains nothing will crash. private void LibVLC_Log(object sender, LogEventArgs e) {} The overload contains no code.
### Minimal project and steps to re...### Summary
Xamarin Forms app, running _libVLC.Log += LibVLC_Log; overload which contains nothing will crash. private void LibVLC_Log(object sender, LogEventArgs e) {} The overload contains no code.
### Minimal project and steps to reproduce
https://github.com/winkmichael/LogTestlibVLC
Immediately crashes once initialized, no errors.
Remove _libVLC.Log += LibVLC_Log; and there is no crash.
Same issue occurs with; private void OnLogReceived(object sender, LogEventArgs e)
### What is the current *bug* behavior?
Crashes the Android App.
### What is the expected *correct* behavior?
Log overload should allow log handling by application.
### Does it work on other plaforms? Does it work with the official VLC apps?
[libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30 in tid 23185 (e.logtestlibvlc), pid 23185 (e.logtestlibvlc)
That is the only log.
### Relevant LibVLC logs and/or screenshots
N/A
### Environment
Android Pixel 5 - API 30 Emulator
LibVLCSharp.Forms 3.7.0
VideoLAN.LibVLC.Android 3.5.3
### Possible fixes
No idea