sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running SendData.cpp example causes assertion failure

JYoung2123 opened this issue · comments

Running the SendData example causes the following output and error popup:
e6f659bd-6765-4c56-9e2d-d544d3414ff1

Did you build this yourself? Or is this worth a binary you downloaded from somewhere?

I'll try to replicate it. Which visual studio did you use?

Visual Studio 2022, 17.3.6
For reference, I imported the headers/lib files from liblsl-1.16.0-Win_amd64.zip

There isn't any problem with this repo, neither the library code, the release library archive, or the SendData.cpp source. Edit: SendData had a tiny bug.

I just did the following 3 tests, without issue:

  1. Cloned the liblsl repo, built the whole thing, including the examples, and ran SendData.cpp without issue
    • This is a bit different in that the linked lsl library is freshly-built.
    • Edit: Not sure why I didn't trigger the problem here.
  2. Downloaded the same liblsl release you linked above, cloned an application repo (labstreaminglayer/App-AudioCapture), configured its build to use the liblsl release, built and ran the AudioCapture app. (Also fixed an old error it had, unrelated). This also worked.
    • Unlike your project (at least from what I can infer), this used CMake and Qt.
  3. Used a fresh visual studio project.
    1. Create a new source file with its contents pasted exactly from a copy of SendData.cpp.
    2. Modified the project properties C\C++>General>Additional Include Directories to add the include directory in the extracted archive.
    3. Modified the project properties Linker>General>Additional Library Directories to add the lib directory in the extracted archive.
    4. Built the project.
    5. Manually copied lsl.dll into the same folder as the Project1.exe (i.e. Project1\x64\Release)
    6. Ran the executable without error.
    7. Edit: Also not sure why I didn't trigger the problem here. I'm starting to think I had a local branch with the fix?

Oh, maybe I spoke too soon, I was just able to trigger it. I'll continue looking.

OK, it's fixed now. 08aa186