'Collision in State Offset' message

Forum for software developers to discuss BCI2000 software development
Locked
salterd
Posts: 2
Joined: 18 Jul 2011, 15:17

'Collision in State Offset' message

Post by salterd » 04 Aug 2011, 11:24

Hello,

I'm developing a BCI application in BCI2000 using BCPy2000 and I've run into a message I don't understand. Every time I start my app, it gives me this in the iPython console:

Code: Select all

Collision in state EventOffset : Oldvalue: 524   New Python Value: 528   New BCI Value: 0
It feels like a warning, so if it signals a problem I'd like to go in and fix it except I don't understand it completely. Could someone explain the meaning of this to me?

Thanks in advance,
David

jhill
Posts: 31
Joined: 17 Nov 2009, 15:15

Re: 'Collision in State Offset' message

Post by jhill » 08 Aug 2011, 11:39

State values can only be written once per sample-block in the BCPy2000 framework. A "collision" in a state means that an attempt has been made to write to the state more than once per sample-block, with the result that the first value (524 in your example) will be overwritten by 528 in the .dat file.

The EventOffset state is set automatically by the framework whenever a phase transition occurs (see http://bci2000.org/downloads/BCPy2000/P ... chine.html ).

Therefore, my interpretation is that two phase transitions are happening, the second occurring too fast after the first for the framework to be able to record both in the file.

The first two reasons I can think of are: (1) the phase duration, defined in your Phases() method and/or cut short by an explicit call to self.change_phase(), really is too short, or (2) sample-blocks are being delivered very late or unevenly (check the VisualizeTiming window).

jhill
Posts: 31
Joined: 17 Nov 2009, 15:15

Re: 'Collision in State Offset' message

Post by jhill » 08 Aug 2011, 11:53

Slight correction: looking at the error message again, I see that it is the value 0 that is conflicting with the value 528. A transition occurred, causing the value 524 to be set. One sample-block later, the framework automatically tries to set EventOffset back to 0 (because EventOffset messages are meant to be transient, in this way): this resetting to 0 is coincides with the new transition.

The diagnosis is still the same: transitions are too close together. They should be at least two sample-blocks apart.

Locked

Who is online

Users browsing this forum: No registered users and 2 guests