Attempted to read or write protected memory when a non-main window closed. Libvlcsharp #5540
RickyYCheng
started this conversation in
General
Replies: 2 comments 1 reply
-
Sorry, I've found the problem, still i donnot know why. private void OnClosed(object sender, EventArgs e)
{
try
{
// Dont do that!
//_libVLC.Dispose();
//videoView.MediaPlayer!.Media!.Dispose();
//videoView.MediaPlayer!.Dispose();
}
catch { }
} I'll close the issue imediately. :) Sorry. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Sorry I found that i made the discussion but not pull a issue :(. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm tring to use libvlcsharp to show a video on the begin of the app according to some demand.
So i'm tring to add Opened Event on main view to open a new window to play video:
then i'm tring to build the video view window like this:
the .cs code of this xaml like this:
According to a issue, to close the window when the mediaplayer endreached, i used this slice of code to close:
Dispatcher.UIThread.InvokeAsync(Close);
after that, the Program.cs will throw an exception:
Attempted to read or write protected memory
Position:
here's the issue about the code:
donandren/vlcsharpavalonia#12
I wanna know if it'a a bug or i just use the wrong code. Have a good time! :)
PS: https://github.com/videolan/libvlcsharp
i just used nuget to install libvlcsharp to my pc, which also need vlc installed on the mechine.
Beta Was this translation helpful? Give feedback.
All reactions