sccn / liblsl

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

Stream transmission broke off #82

Closed jdevoldere closed 3 years ago

jdevoldere commented 3 years ago

So I have like 6 different outlets in Unity interfacing through LSL.cs from the liblsl-Csharp repo.

Everything works fine when I use the 1.13 DLL however when using the 1.14 DLL instead I get the following error when trying to read the streams in python or using LabRecorder: Stream transmission broke off (The received test-pattern samples do not match the specification. The protocol formats are likely incompatible.); re-connecting...

This error then repeats itself over and over.

cboulay commented 3 years ago

This should be fixable.

When did you download 1.14, or which point release? There was an earlier version of 1.14 that had that bug in it, but it was fixed in v1.14.0b3 as far as I know.

If you are using v1.14.0b3, then can you please try to isolate one of the streams creating this problem and let me know what its data type is? (this bug can be reproduced with a single stream, it shouldn't be necessary to have multiple outlets running at the same time).

jdevoldere commented 3 years ago

@cboulay I am using v1.14.0b3. I've isolated the issue to the following outlet:

liblsl.StreamInfo streamInfo = new liblsl.StreamInfo("Unity.BooleanActions", "booleanActions", 3, 0, liblsl.channel_format_t.cf_string, "booleanactions-unity");
liblsl.XMLElement chans = streamInfo.desc().append_child("channels");
chans.append_child("channel").append_child_value("label", "Action");
chans.append_child("channel").append_child_value("label", "Input");
chans.append_child("channel").append_child_value("label", "State");
_booleanActionOutlet = new liblsl.StreamOutlet(streamInfo);

If you change the channel_count in the StreamInfo from 3 to 1, without actually changing the number of channels I'm pushing, then the issue no longer occurs.

tstenner commented 3 years ago

I found the error, it was related to one of my refactorings. The fix is in 3de8daba510d0c39312778d310c5225d5329eabf, the builds should appear in the next minutes on the release page.

cboulay commented 3 years ago

Thanks @tstenner ! @jdevoldere you can find the download on the 1.14.0b4 release. I'm going to close this issue but please don't hesitate to reopen if this doesn't work for you.