libossia icon indicating copy to clipboard operation
libossia copied to clipboard

mutliplex protocol thread safety: stop_expose_to and parameter push_value segfaults

Open x37v opened this issue 4 years ago • 2 comments

Here is an example test that causes the crash:

https://github.com/Cycling74/libossia/blob/xnor/multiplex-test/tests/Network/MultiplexTest.cpp#L143-L227

When I run some code in a debugger I see a segfault when I push_value and the multiplex protocol iterates its protocols.

x37v avatar Apr 04 '22 21:04 x37v

Hey @jcelerier I think you said you were going to add some notes here to maybe point someone (me) in the right direction as far as resolving this issue and contributing back to the project?

x37v avatar Jun 22 '22 22:06 x37v

BTW.. the c docs claim that ossia_protocol_multiplex_expose_to is MT safe.. it pushes to a vector which is also accessed from other threads.. the docs from std::vector AFAIK don't indicate that push_back is thread safe..

x37v avatar Jul 25 '22 21:07 x37v