shmdata2ndi segfaults when it receives a shmdata that has a video feed with the wrong format
This is the command I used to make it crash :
sat@berchta:~$ shmdata2ndi -v '/run/user/1000/switcher_switcher-ws_ea81f1e8-81f2-4cf0-b2a2-0bb9be24496e_5' -n 'ndiOutput1'
This is the error message just before the segfault :
error: incompatible shmdata: format not supported: Y42B
error: (format supported: I420, UYVY, YV12, NV12, BGRA, RGBA)
This is the stack trace :
#0 0x00007fa812e82960 in ?? () from /usr/local/nditoshmdata/lib/libndi.so
#1 0x00007fa812dbcaf5 in ?? () from /usr/local/nditoshmdata/lib/libndi.so
#2 0x00007fa812d78997 in ?? () from /usr/local/nditoshmdata/lib/libndi.so
#3 0x00007fa812d749c5 in NDIlib_send_send_video_scatter () from /usr/local/nditoshmdata/lib/libndi.so
#4 0x000055dfebe7e9ef in make_video_follower()::{lambda(void*, unsigned long)#1}::operator()(void*, unsigned long) const ()
#5 0x000055dfebe806fa in std::_Function_handler<void (void*, unsigned long), make_video_follower()::{lambda(void*, unsigned long)#1}>::_M_invoke(std::_Any_data const&, void*&&, unsigned long&&) ()
#6 0x00007fa812c9e996 in shmdata::Reader::on_buffer(shmdata::sysVSem*, unsigned long) () from /usr/local/lib/libshmdata-1.3.so.1
#7 0x00007fa812cc45ac in shmdata::UnixSocketClient::server_interaction() () from /usr/local/lib/libshmdata-1.3.so.1
#8 0x00007fa812cc5670 in std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<shmdata::UnixSocketClient::start(shmdata::UnixSocketProtocol::ClientSide*)::{lambda(shmdata::UnixSocketClient*)#1}, shmdata::UnixSocketClient*> >, void> >::_M_invoke(std::_Any_data const&) () from /usr/local/lib/libshmdata-1.3.so.1
#9 0x00007fa812c9d90d in std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) ()
from /usr/local/lib/libshmdata-1.3.so.1
#10 0x00007fa81266e4df in __pthread_once_slow (once_control=0x55dfec5acb58, init_routine=0x7fa812af40b0 <__once_proxy>) at pthread_once.c:116
#11 0x00007fa812cc3805 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<shmdata::UnixSocketClient::start(shmdata::UnixSocketProtocol::ClientSide*)::{lambda(shmdata::UnixSocketClient*)#1}, shmdata::UnixSocketClient*> >, void>::_Async_state_impl(std::thread::_Invoker<std::tuple<shmdata::UnixSocketClient::start(shmdata::UnixSocketProtocol::ClientSide*)::{lambda(shmdata::UnixSocketClient*)#1}, shmdata::UnixSocketClient*> >&&)::{lambda()#1}> > >::_M_run() () from /usr/local/lib/libshmdata-1.3.so.1
#12 0x00007fa812af5793 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007fa812665609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#14 0x00007fa812917133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The annoying thing with this bug is that it also affects the shmdata that you try to connect : I had sdflow running on /run/user/1000/switcher_switcher-ws_ea81f1e8-81f2-4cf0-b2a2-0bb9be24496e_5
and the sdflow just stopped.