unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.17k stars 238 forks source link

Crash when close media with AccessViolationException #551

Open dingoberry opened 3 years ago

dingoberry commented 3 years ago

Crash when close media

I integrate ffme.player from nuget, and my environment is .net framework4.7.2. This project create multiple mediaelement while use to play rtmp stream and local video, the condition is that change rtmp to local and local to rtmp, this will crash on some windows machine.

Issue Categories

Version Information

Steps to Reproduce

  1. Create video wall or multiple video
  2. Frequently switch rtmp to local and local to rtmp to play
  3. Sometime crash, then open windows event log console

Expected Results

Crash log

Framework 版本: v4.0.30319 说明: 由于未经处理的异常,进程终止。 异常信息: System.AccessViolationException 在 Unosquare.FFME.Container.MediaComponent.CloseComponent() 在 Unosquare.FFME.Container.MediaComponent.Dispose(Boolean) 在 Unosquare.FFME.Container.MediaComponentSet.RemoveComponent(Unosquare.FFME.Common.MediaType) 在 Unosquare.FFME.Container.MediaComponentSet.Dispose(Boolean) 在 Unosquare.FFME.Container.MediaContainer.Dispose() 在 Unosquare.FFME.Commands.CommandManager.CommandCloseMedia() 在 Unosquare.FFME.Commands.CommandManager+<>c__DisplayClass47_0.b__0() 在 System.Threading.Tasks.Task`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke() 在 System.Threading.Tasks.Task.Execute() 在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) 在 System.Threading.Tasks.Task.ExecuteEntry(Boolean) 在 System.Threading.ThreadPoolWorkQueue.Dispatch()

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mariodivece commented 3 years ago

I hvae also experienced this and I tried investigating without success. I really don't know what's going on. I will look into this when I get some time.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.