dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 91 forks source link

Protobuf duplicate library causes mlt to crash #185

Open mattfbacon opened 4 months ago

mattfbacon commented 4 months ago

Copied from mltframework/mlt#973

Running melt with the problematic frei0r-plugins causes the following crash:

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1709185148.241526  152974 descriptor_database.cc:633] File already exists in database: versions.proto
F0000 00:00:1709185148.241551  152974 descriptor.cc:2122] Check failed: GeneratedDatabase()->Add(encoded_file_descriptor, size)
*** Check failure stack trace: ***
fish: Job 1, 'melt' terminated by signal SIGABRT (Abort)

If I manually remove frei0r-plugins with pacman -Rdd frei0r-plugins, melt works perfectly.

Based on https://forums.gentoo.org/viewtopic-t-1166547-start-0.html I was able to determine that the issue is caused by a duplication of the protobuf library that causes the versions.proto file to be inserted twice. I don't know much more than that, but I know that removing frei0r-plugins (despite it being marked as a dependency of mlt) fixes it.

jaromil commented 4 months ago

@mattfbacon facedetect includes protobuf runtime twice, just deactivate that plugin. we may have a flag that says protobuf_loaded in the plugin or a runtime check of sorts.

mattfbacon commented 4 months ago

I have no idea how to deactivate a plugin, I am about three levels deep in transitive dependencies just to report this bug. Regardless this seems like a bug that needs to be fixed directly

jaromil commented 4 months ago

@mattfbacon plugins are shared library files loaded at runtime (dlopen). it is enough to delete the .so file named facedetect from the frei0r library folder.