libplacebo icon indicating copy to clipboard operation
libplacebo copied to clipboard

mpv: hit program assert when using vf=libplacebo under Xcode debug mode

Open karelrooted opened this issue 1 year ago • 2 comments

Important Information

  • libplacebo version: git latest master
  • FFmpeg version: n6.1 git latest master
  • mpv version: 0.37.0 (libmpv) git latest master
  • MoltenVK version: v1.2.6 git latest master
  • Platform and Version: macOS 14.0
  • this bug is only triggered in Xcode debug mode, when starting the generated app normally without Xcode debug, the libplacebo filter works without signal abort

Reproduction steps

  1. create a player using libmpv
  2. enable vf=libplacebo
  3. using Xcode debug mode to run the player and playing any video file
  4. hit program assert is triggered immediately or after a while (usually less than 60s)

Expected behavior

libplacebo filter works

Actual behavior

hit program assert

Screenshot of the debug trace info

libplacebo-bt-1 libplacebo-bt2

karelrooted avatar Dec 05 '23 10:12 karelrooted

Hi, can you check if the vulkan validation layers report something here?

It sounds like the problem is a free() being called while the object is still in use, something that the VVL should be able to catch (and give us more info on).

haasn avatar Dec 05 '23 10:12 haasn

Hi, can you check if the vulkan validation layers report something here?

It sounds like the problem is a free() being called while the object is still in use, something that the VVL should be able to catch (and give us more info on).

try to use official Vulkan SDK (1.3.268.1 latest) and enable VVL, but libplacebo failed to initial vulkan device with error(following official document and add macOS/Framework/vulkan.framework to project):

[   1.715][v][lavfi] Configuring hwdec_interop=videotoolbox for filter graph: libplacebo
[   1.717][f][ffmpeg] libplacebo: Failed creating instance: VK_ERROR_INCOMPATIBLE_DRIVER
[   1.717][f][ffmpeg] libplacebo: Failed initializing vulkan instance
[   1.717][f][ffmpeg] libplacebo: Failed initializing vulkan device
[   1.717][e][ffmpeg] libplacebo: Failed creating Vulkan device!
[   1.717][e][ffmpeg] filter: Query format failed for 'filter': Generic error in an external library
[   1.717][f][lavfi] failed to configure the filter graph
[   1.717][e][vf] Disabling filter libplacebo.00 because it has failed.

this is the full mpv log

I'm a little new on this , last time the error triggered I just replace vulkan.framework with MoltenVK.xcframework , any advise on this ? or is there any other way to enable VVL without using official SDK

BTW: when using compiled mpv or ffplay under command line, libplacebo works without the above error, already try open debug app under command line, but still fail with same error

karelrooted avatar Dec 05 '23 16:12 karelrooted