Terminating SignalProcessing module

Forum for software developers to discuss BCI2000 software development
jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Terminating SignalProcessing module

Post by jewatts » 28 Jan 2016, 06:25

I am having an issue running my online BCI experiment. The offline runs fine so I think the issue is the signal processing. This is my setup:
windows 7 64bit
matlab 2013a 32bit
latest BCI2000 install
BCILAB 1.0 (and 1.01, both required due to difficutlies with newer versions)

The experiment is started from a regular batch file, here are the combination of errors I get:
Scenario 1. If I start by setting the matlab path to Program Files\MATLAB\R2013a_32\bin\matlab.exe it fails at the first hurdle and cannot run signal processing, giving the error;
MatlabFilter::Constructor: Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Terminating SignalProcessing module


Scenario 2. setting the path to Program Files\MATLAB\R2013a_32\bin\win32 as suggested in an old thread here seems to work but I still get issues later on. After starting MatlabSignalProcessing and directing the path to bcilab-1.0\code\online_plugins the experiment can start but within a few seconds I get the error;
Matlab function "bci_Process": Subscripted assignment dimension mismatch.
Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Terminating SignalProcessing module.


Scenario 3. Using the same matlab path but this time specifying bcilab-1.01\code\online_plugins\BCI2000 along with the signal processing leads to the odd error of;
Matlab function "bci_Construct": Undefined function 'quicklog' for input arguments of type 'char'.


On most occassions the signal processing module seems to fail and I have no idea why. I am using a 32bit version of matlab so that it would be compatible but something is playing up. Regserver has also been used and paths point to the 32bit version.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 28 Jan 2016, 11:15

Jewatts,

to rule out that this is caused by errors in your MATLAB code, can you please test the behavior on a MATLAB function that just copies the input to the output?

Also, does the issue persist with the latest BCI2000 v3.6 beta version (see [1] for download)?

Regards, Peter

[1] http://www.bci2000.org/phpbb/viewtopic.php?f=1&t=2955

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 29 Jan 2016, 08:13

Thanks for the reply,

I'll try v3.6 when I'm next in the lab. As for the matlab functions, I haven't written any of them they are either from bci2000 or bcilab. The batch file effectively loads up bcilab and signal processing before allowing you to set the config from bci2000. I'll try various versions of bcilab too.

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 02 Feb 2016, 05:36

Well I've narrowed the issue down to the bci_process function within bcilab now. I can now load up bci2000 from my small batch file, this also loads bcilab 1.0 (or 1.01, both have the same issue) and matlab command window. Once all loaded I can click 'set config' and it still continues to set up fine. Then I start the experiment and the first stimulus is shown, it is here that the problem occurs. Around 10 seconds in I get the error below which in turn crashes signal processing.
Matlab function "bci_Process": Subscripted assignment dimension mismatch.
Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Terminating SignalProcessing module.


Given that it is after the first stimulus is presented I assume it might be related to the prediction being made. As for the function though, it's from a fresh copy of bcilab so I wouldn't have thought its code was the problem.

ps - I am using an Emotiv Epoc with all the relevant extra files required for it in bci2000. The offline data collection works fine, this calls 'dummy signal processing' and does not use bcilab which makes me suspect there is a matlab signal processing and bcilab communication problem somewhere.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 02 Feb 2016, 10:12

Jewatts,

thanks again for isolating the issue. Can you do one more thing to make things easier for us to debug the issue? Specifically, can you please create a minimum working example that exhibits the issue. In other words, use the SignalGenerator source module instead of the Emotiv source module and a minimum MATALB code. Add a readme.txt describing how to issue shows up and zip that package and send me a dropbox link to it.

Thanks!

Regards, peter

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 03 Feb 2016, 11:40

pbrunner wrote:Jewatts,

thanks again for isolating the issue. Can you do one more thing to make things easier for us to debug the issue? Specifically, can you please create a minimum working example that exhibits the issue. In other words, use the SignalGenerator source module instead of the Emotiv source module and a minimum MATALB code. Add a readme.txt describing how to issue shows up and zip that package and send me a dropbox link to it.

Thanks!

Regards, peter
Thanks,
Here are the files. I've isolated the only files that need to be added to a fresh copy of BCI2000 3.0.5 and bcilab 1.01. I put a link in the readme file if you don't have that version of bcilab. Hopefully everything needed to reproduce the error is in the zip and readme.

https://www.dropbox.com/s/piamha30if4cw ... s.zip?dl=0

Thanks again.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 03 Feb 2016, 11:44

Jewatts,

do you mind zipping everything that is necessary, including BCI2000 and BCILAB. That ensures that I am looking at exactly the same software as you.

Regards, Peter

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 03 Feb 2016, 12:28

No problem, here it is. I was going to do that originally but thought it would be too big a file.

https://www.dropbox.com/s/94v3un3nf2sprwz/BCI.zip?dl=0

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 05 Feb 2016, 18:04

Jewatts,

I wanted to give you an update on the issue that you have experienced. I have started to look at the MatlabSignalProcessing module within BCI2000 and have isolated the first bug. We will tackle this within the next two weeks, to get the MATLAB functionality back up and working. Once the core functionality is working, we can look at the integration with BCILAB.

http://www.bci2000.org/tracproj/ticket/183

Regards, Peter

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 06 Feb 2016, 12:49

pbrunner wrote:Jewatts,

I wanted to give you an update on the issue that you have experienced. I have started to look at the MatlabSignalProcessing module within BCI2000 and have isolated the first bug. We will tackle this within the next two weeks, to get the MATLAB functionality back up and working. Once the core functionality is working, we can look at the integration with BCILAB.

http://www.bci2000.org/tracproj/ticket/183

Regards, Peter
Thank you for the help.
I notice that in the ticket it mentions removing the size check, could I do this as a work around? I don't need the system to fully work just yet, but was looking to test its integration with an external device.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 06 Feb 2016, 18:08

Jewatts,

you can give it a try. Just remove the two lines of code and recompile.

Regards, Peter

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 08 Feb 2016, 15:33

pbrunner wrote:Jewatts,

you can give it a try. Just remove the two lines of code and recompile.

Regards, Peter
A rather novice question but, what program do you use to edit and recompile the executable file?

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 08 Feb 2016, 15:39

Jewatts,

please follow the detailed instructions on in the BCI2000 v3.6 beta thread under "BCI2000 v3.6 - source code - compile and debug instructions - December 10th, 2015" to download and install the toolchain to download, edit, make and build BCI2000 from the source code.

http://www.bci2000.org/phpbb/viewtopic.php?f=1&t=2955

Regards, Peter

jewatts
Posts: 15
Joined: 28 Jan 2016, 06:09

Re: Terminating SignalProcessing module

Post by jewatts » 20 Feb 2016, 09:50

Not entirely sure I know what I'm doing. I commented the lines out but not sure how the build process is working. Think I'll wait for a beta release, the ticket mentions it's fixed in R5241

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Terminating SignalProcessing module

Post by pbrunner » 22 Feb 2016, 13:22

Jewatts,

please see the BCI2000 v3.6 beta page below to download the newest beta (R5253).

http://www.bci2000.org/phpbb/viewtopic.php?f=1&t=2955

Gruss, Peter

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests