sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
107 stars 63 forks source link

`Max-Buffer-Length: 1` crashes the outlet process #158

Open tstenner opened 2 years ago

tstenner commented 2 years ago

Sending LSL:streamfeed/110 \nmax-buffer-length: 1\r\n\r\n to the data port crashes the entire outlet process in debug builds:

$ examples/SendStringMarkers
2021-10-13 20:45:54.613 (   0.000s) [        364CFD80]         api_config.cpp:235   INFO| Loaded default config
2021-10-13 20:45:54.613 (   0.000s) [        364CFD80]             common.cpp:65    INFO| git:v1.15.2-59-gcafcb68a/branch:asio/build:Debug/compiler:GNU-11.1.0/link:SHARED
Now sending markers... 
now sending: Testtest
now sending: XXX
SendStringMarkers: /home/tristan/arbeit/lsl/LSL/liblsl/src/consumer_queue.cpp:15: lsl::consumer_queue::consumer_queue(std::size_t, lsl::send_buffer_p): Assertion `size_ > 1' failed.
Aborted (core dumped)

In release builds, everything works fine. Should this be assert(size_ >= 1);?

cboulay commented 2 years ago

Related to #156