Page 1 of 1

Communication stops

Posted: 16 May 2021, 22:23
by dianavertiz
Hello,
I've implemented a signal source module for a biopotential amplifier, following this tutorial:
https://www.bci2000.org/mediawiki/index ... rce_Module
The module is working, I can see the signals from my amplifier, but sometimes the signals freeze and I have to close
the program and restart, sometimes it happens immediately, sometimes after many minutes, in debug and release mode.
In debug mode, after the signals freeze, when I pause the debugging process, it stops in Atomic.h in class Compare.
I don`t know if this happened to anyone else, any help would be really appreciated.

Regards,
Diana

Re: Communication stops

Posted: 20 May 2021, 13:04
by mellinger
Hi,

if the debugger takes you to Atomic::Compare, it is likely that you are trying to lock an already locked spin lock. Does your code use any spin locks?

Regards,
Jürgen

Re: Communication stops

Posted: 22 May 2021, 07:58
by dianavertiz
Hello, thanks for your answer,

I'm not sure what spin locks are so I guess I'm not using one.
A while could be an example of using a spin lock? if that's the case, then I'm using one.

Regards,
Diana

Re: Communication stops

Posted: 26 May 2021, 12:34
by mellinger
OK, so it seems you are not using any spin lock. If you post your code I may have a suggestion what the problem might be. Send me a private message with the code attached if you don't want your code to be publicly visible.