`FluidBufNMF` crashing the server on Linux
Hello flucomers!
The basic example of FluidBufNMF is crashing my sc server:
// =============== decompose some sounds ===============
// let's decompose the drum loop that comes with the FluCoMa extension:
~drums = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
// hear the original mono sound file to know what we're working with
~drums.play;
// an empty buffer for the decomposed components to be written into:
~resynth = Buffer(s);
// how many components we want FluidBufNMF to try to decompose the buffer into:
~n_components = 2;
// process it:
FluidBufNMF.processBlocking(s,~drums,resynth:~resynth,components:~n_components,resynthMode:1,action:{"done".postln;});
Here's the gdb backtrace:
#0 0x000055806be128c8 in ?? ()
#1 0x00007f7d0ff95d0f in fluid::client::impl::NonRealTime<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> >, fluid::client::FluidSCWrapper<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> > > >::NRTCommand::sendReply(char const*, bool) ()
from /home/francesco/.local/share/SuperCollider/Extensions/FluidCorpusManipulation/Plugins/FluidBufNMF.so
#2 0x00007f7d0ffaaa60 in fluid::client::impl::NonRealTime<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> >, fluid::client::FluidSCWrapper<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> > > >::CommandNew::stage2(World*) ()
from /home/francesco/.local/share/SuperCollider/Extensions/FluidCorpusManipulation/Plugins/FluidBufNMF.so
#3 0x00007f7d0ffb696c in fluid::client::impl::NonRealTime<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> >, fluid::client::FluidSCWrapper<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> > > >::runAsyncCommand<fluid::client::impl::NonRealTime<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> >, fluid::client::FluidSCWrapper<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> > > >::CommandProcessNew>(World*, fluid::client::impl::NonRealTime<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> >, fluid::client::FluidSCWrapper<fluid::client::NRTThreadingAdaptor<fluid::client::ClientWrapper<fluid::client::bufnmf::NMFClient> > > >::CommandProcessNew*, void*, unsigned long, char*)::{lambda(World*, void*)#1}::_FUN(World*, void*) () from /home/francesco/.local/share/SuperCollider/Extensions/FluidCorpusManipulation/Plugins/FluidBufNMF.so
#4 0x00007f7d18144faf in ?? () from /usr/lib/libscsynth.so.1
#5 0x00007f7d1812d79a in ?? () from /usr/lib/libscsynth.so.1
#6 0x00007f7d17ed62f3 in std::execute_native_thread_routine (__p=0x55806b78c080)
at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7 0x00007f7d17c9f8fd in ?? () from /usr/lib/libc.so.6
#8 0x00007f7d17d21a60 in ?? () from /usr/lib/libc.so.6
Couldn't test this on other distros, I'm currently on Arch 6.0.12
I have rebuilt SC from scratch basing it on develop, and it now works. The version I had the problem with was 3.12.2.
My guess is that this is related to the fact that currently FluCoMa needs to be built against the same version of boost as SC. This was mentioned in a few Issues/PR discussions but I don't think it's explicitly documented. See #149 for related discussion.
Hey, I'm having a similar issue with FluidBufNMF. I'm running the most recent stable FluCoMa build with SuperCollider 3.10.0 in Ubuntu 20.04.
I was just trying to get this example working:
~drums = Buffer.read(s,FluidFilesPath("Nicol-LoopE-M.wav"));
~resynth = Buffer(s);
~n_components = 3;
FluidBufNMF.processBlocking(s,~drums,resynth:~resynth,components:~n_components,resynthMode:1,action:{"done".postln;});
(
fork{
~n_components.do{
arg i;
"decomposed part #%".format(i+1).postln;
{
PlayBuf.ar(~n_components,~resynth,BufRateScale.ir(~resynth),doneAction:2)[i].dup;
}.play;
(~drums.duration + 1).wait;
}
};
)
The NMF process seems to complete but trying to play the populated ~resynth buffer back throws this gem:
FAILURE IN SERVER: Command not found Command not found
Any help appreciated - I will try and test it on another Linux device in the meantime. Cheers.
have you managed to make it work? indeed SC is changing boost, so now we're compiling against the tip of main in the nightly. Can you try with that? if that fails, let me know which version of SC and which version of FluCoMa you are using and I'll get digging