Communication stops

Forum for software developers to discuss BCI2000 software development
Post Reply
dianavertiz
Posts: 4
Joined: 16 May 2021, 19:47

Communication stops

Post by dianavertiz » 16 May 2021, 22:23

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

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Communication stops

Post by mellinger » 20 May 2021, 13:04

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

dianavertiz
Posts: 4
Joined: 16 May 2021, 19:47

Re: Communication stops

Post by dianavertiz » 22 May 2021, 07:58

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

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: Communication stops

Post by mellinger » 26 May 2021, 12:34

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests