Crash when trying to get multiple thumbnails from video
Summary
Multiple consecutive calls to media.GenerateThumbnailAsync results in crash.
Minimal project and steps to reproduce
Run the unit test in the project. https://github.com/andreas-eriksson/VideoRepro/
What is the current bug behavior?
The test is aborted as a crash occurs.
What is the expected correct behavior?
It should work to generate multiple thumbnails from the same video.
Relevant LibVLC logs and/or screenshots
The active test run was aborted. Reason: Test host process crashed : [000002e685358ca0] main libvlc debug: VLC media player - 4.0.0-dev Otto Chriek
[000002e685358ca0] main libvlc debug: Copyright © 1996-2023 the VideoLAN team
[000002e685358ca0] main libvlc debug: revision 4.0.0-dev-26405-gd6ffd5bc35
[000002e685358ca0] main libvlc debug: configured with /builds/videolan/vlc/extras/package/win32/../../../configure '--enable-update-check' '--enable-lua' '--enable-flac' '--enable-theora' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-libass' '--enable-schroedinger' '--enable-shout' '--enable-goom' '--enable-sse' '--enable-libcddb' '--enable-zvbi' '--disable-telx' '--enable-nls' '--host=x86_64-w64-mingw32' '--with-contrib=../contrib/x86_64-w64-mingw32' '' '--enable-live555' '--enable-dca' '--enable-dvdread' '--enable-debug' '--enable-qt' '--enable-skins2' '--enable-caca' 'build_alias=' 'host_alias=x86_64-w64-mingw32' 'target_alias=' 'CFLAGS= -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 ' 'CPPFLAGS= -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0601 -DWINVER=0x0601' 'CXXFLAGS= -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 ' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig:/usr/lib/x86_64-w64-mingw32/pkgconfig'
[000002e685358ca0] main libvlc debug: using performance counters as clock source
[000002e685358ca0] main libvlc debug: frequency: 10000000 Hz
[000002e685358ca0] main libvlc debug: searching plug-in modules
[000002e685358ca0] main libvlc debug: loading plugins cache file C:\Users\AndreasEriksson\source\repos\VideoRepro\Video.Test\bin\x64\Debug\net7.0\win-x64\libvlc\win-x64\plugins\plugins.dat
[000002e685358ca0] main libvlc warning: cannot read C:\Users\AndreasEriksson\source\repos\VideoRepro\Video.Test\bin\x64\Debug\net7.0\win-x64\libvlc\win-x64\plugins\plugins.dat: No such file or directory
[000002e685358ca0] main libvlc debug: recursively browsing `C:\Users\AndreasEriksson\source\repos\VideoRepro\Video.Test\bin\x64\Debug\net7.0\win-x64\libvlc\win-x64\plugins'
[000000ee5d33d840] main generic error: cannot load plug-in C:\Users\AndreasEriksson\source\repos\VideoRepro\Video.Test\bin\x64\Debug\net7.0\win-x64\libvlc\win-x64\plugins\video_output\libplacebo_vk_plugin.dll: The specified module could not be found. (error 126)
[000002e685358ca0] main libvlc debug: plug-ins loaded: 553 modules
[000000ee5d33db28] main generic debug: looking for logger module matching "any": 2 candidates
[000000ee5d33db28] main generic debug: using logger module "console"
[000000ee5d33db68] main generic debug: looking for tracer module matching "none": 0 candidates
[000000ee5d33db68] main generic debug: no tracer modules matched with name none
[000002e685358ca0] main libvlc debug: translation test: code is "C"
[000000ee5d33dae8] main generic debug: looking for keystore module matching "memory": 1 candidates
[000000ee5d33dae8] main generic debug: using keystore module "memory"
[000002e685358ca0] main libvlc debug: CPU has capabilities SSE2 SSE3 SSSE3 SSE4.1 FPU
[000002e682511e60] main input debug: Creating an input for thumbnailing 'ElephantsDream.mp4'
[h264 @ 000002e6832d4380] Reinit context to 1280x720, pix_fmt: yuv420p
[000000ee5d4bf378] main generic debug: looking for image encoder module matching "any": 4 candidates
[000000ee5d4bf378] main generic debug: using image encoder module "png"
[000000ee5d4bf378] main generic debug: looking for video converter module matching "any": 22 candidates
[000003271c4c3af0] swscale filter debug: 1280x720 (1280x738) chroma: I420 colorspace: BT709 -> 200x112 (200x112) chroma: RV24 colorspace: BT709 with scaling using Bicubic (good quality)
[000000ee5d4bf378] main generic debug: using video converter module "swscale"
[000003271c4c3af0] main filter debug: removing "video converter" module "swscale"
Assertion failed: prev, file /builds/videolan/vlc/extras/package/win32/../../../include/vlc_atomic.h, line 71
Environment
- OS: Windows
- Version 11
- Device: CPU Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
- LibVLC version and architecture VideoLAN.LibVLC.Windows 4.0.0-alpha-20231107
- LibVLCSharp version 4.0.0-alpha-20231108-7267