radek-k / FFMediaToolkit

FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
MIT License
362 stars 56 forks source link

Visual Studio Debugger :MediaFile.Open causes app to crash with code 1080890248 #138

Open No1e opened 2 months ago

No1e commented 2 months ago

Hi folks,

I just created simple console app to test FFMediaToolKit. The application simply loads video, gets frame and saves it as JPEG.

I am using the following versions: FFMediaToolKit: 4.5.1 ffmpeg: ffmpeg-n6.1-latest-win64-gpl-shared-6.1 (https://github.com/BtbN/FFmpeg-Builds/releases) - Autobuild from today.

If I run application out of Visual Studio it works. If I try do debug, it crashes at the following line of code: MediaFile file = MediaFile.Open(videoPath)

I tried both .Net Framework 4.8 and .NET 8.

In windows event logs, I was able to find the following: Faulting application name: VideoFrame.exe, version: 1.0.0.0, time stamp: 0x65410000 Faulting module name: KERNELBASE.dll, version: 10.0.22621.3958, time stamp: 0xfbc3a4f6 Exception code: 0x406d1388 Fault offset: 0x000000000005fabc Faulting process id: 0x0x1860 Faulting application start time: 0x0x1DAFADBC2BB50C4 Faulting application path: E:\PoC\VideoFrame\VideoFrame\bin\x64\Debug\net8.0-windows7.0\VideoFrame.exe Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll Report Id: 2dc83f13-c0b4-4a03-a83a-412799d4e28a Faulting package full name: Faulting package-relative application ID:

Any suggestions?

Best regards, Nole

erig312 commented 2 months ago

Hello, @No1e

I have encountered same issue. Using different build from different source helped:

https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-6.1.1-full_build-shared.7z

No1e commented 2 months ago

Hi @erig312,

thank you so much. It works perfectly