Using SetDialogHandlers cause a application crash
Summary
Setting dialog handlers using SetDialogHandlers create an application crash in case there is an error in VLC
Minimal project and steps to reproduce
''' _libVLC = new LibVLC();
_libVLC.SetDialogHandlers((title, text) => Task.CompletedTask, (dialog, title, text, username, store, token) => Task.CompletedTask, (dialog, title, text, type, cancelText, actionText, secondActionText, token) => Task.CompletedTask, (dialog, title, text, indeterminate, position, cancelText, token) => Task.CompletedTask, (dialog, position, text) => Task.CompletedTask);
_mediaPlayer = new MediaPlayer(_libVLC);
_mediaPlayer.Play(new Media(_libVLC, "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/NOTEXISTINGURL.mp4", FromType.FromLocation));
'''
What is the current bug behavior?
Application crash with: Managed Debugging Assistant 'CallbackOnCollectedDelegate' : 'A callback was made on a garbage collected delegate of type 'LibVLCSharp!LibVLCSharp.Shared.DisplayErrorCallback::Invoke
What is the expected correct behavior?
not crashing
Does it work on other plaforms? Does it work with the official VLC apps?
Tested on Windows
Relevant logs and/or screenshots
crash: Managed Debugging Assistant 'CallbackOnCollectedDelegate' : 'A callback was made on a garbage collected delegate of type 'LibVLCSharp!LibVLCSharp.Shared.DisplayErrorCallback::Invoke
Environment
- OS: Windows
- Version 10
- Device: PC
- LibVLC: x64 3.0.8
- LibVLCSharp 3.4.0
Possible fixes
Trying to debug...still no fix found