Terminating SignalProcessing module

Forum for software developers to discuss BCI2000 software development
Locked
RobinWang
Posts: 26
Joined: 14 Nov 2011, 06:38

Terminating SignalProcessing module

Post by RobinWang » 07 Dec 2012, 06:21

Hi, I am using CursorTask and MatlabSignalProcessing,when I launch, MatlabFilter::Constructor: Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION occurs!
Could somebody help me fix this error?

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Terminating SignalProcessing module

Post by gschalk » 07 Dec 2012, 12:12

What version of Matlab are you using? What OS?

Gerv

RobinWang
Posts: 26
Joined: 14 Nov 2011, 06:38

Re: Terminating SignalProcessing module

Post by RobinWang » 07 Dec 2012, 20:26

gschalk wrote:What version of Matlab are you using? What OS?

Gerv
I use 3.0.5 version of BCI2000.
OS: win7

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Terminating SignalProcessing module

Post by gschalk » 08 Dec 2012, 12:11

What version of Matlab?

RobinWang
Posts: 26
Joined: 14 Nov 2011, 06:38

Re: Terminating SignalProcessing module

Post by RobinWang » 09 Dec 2012, 20:02

gschalk wrote:What version of Matlab?
Matlab:7.10.0 (R2010a)

admin
Site Admin
Posts: 5
Joined: 27 Jan 2003, 04:30

Re: Terminating SignalProcessing module

Post by admin » 10 Dec 2012, 11:40

Hi,

the current SVN HEAD revision of BCI2000 is broken, and will be fixed ASAP. For now, please stick to the SVN revision that corresponds to the latest binary release (3.0.5) rather than the broken HEAD revision.

Sorry for the inconvenience,
Jürgen

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Terminating SignalProcessing module

Post by boulay » 18 Mar 2013, 04:13

I'm also getting this error using the latest binary distribution or the latest source code compiled for Release Win32 in VS2010 Express.
I tried launching with MatlabDemo_SignalGenerator.bat
Windows 7 64-bit.
Matlab: 7.14.0.739 (R2012a) 64-bit
This is the first time I've tried to use MatlabSignalProcessing.

Code: Select all

2013-03-18T16:44:56 - BCI2000 Started
2013-03-18T16:44:56 - Started "SignalGenerator"
2013-03-18T16:44:56 - Started "MatlabSignalProcessing"
2013-03-18T16:44:56 - Waiting for configuration ...
2013-03-18T16:44:56 - MatlabFilter::Constructor: Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Terminating SignalProcessing module.
2013-03-18T16:44:56 - Started "FeedbackDemo"
2013-03-18T16:44:56 - Script error: D:\downloads\BCI2000\batch\MatlabDemo_SignalGenerator.bat, line 35: Wait aborted
2013-03-18T16:44:56 - Waiting for configuration ...
I tried to build the latest MatlabSignalProcessing source with VC2008 Express hacked for x64 (I have compiled other non-BCI2000 64-bit projects with this configuration).
4 successful 1 failed. I received the following error:

Code: Select all

QtCore.lib(tmp_obj_release_static_qcoreapplication.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
Please let me know if this is specific to any version of Matlab because I will probably be updating versions within 30 days.

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

Re: Terminating SignalProcessing module

Post by mellinger » 19 Mar 2013, 11:44

Hi,

you cannot use a 32 bit-compiled MatlabSignalProcessing with a 64 bit Matlab installation. It seems that the LoadLibrary() Windows API call does not test for matching machine architecture, so the code thinks it has succeeded in loading the library, but crashes as soon as a function from the library is actually executed.

Also, you cannot build a 64 bit executable against the static Qt libraries coming with BCI2000, though CMake won't warn you in this case. I'll add a test, so CMake won't let you set up such a configuration in the future.

Regards,
Juergen

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Terminating SignalProcessing module

Post by boulay » 19 Mar 2013, 21:08

Of course. I forgot about the dynamic Qt bit. Thanks!

Edit: err... not dynamic, but different static.

tjzeyl
Posts: 2
Joined: 08 Nov 2013, 16:40

Re: Terminating SignalProcessing module

Post by tjzeyl » 20 Mar 2014, 10:56

I am facing similar issues trying to get matlab signal processing to work with my setup:

Windows 7, 64 bit
BCI2000 latest binary release (3.0.5), 32 bit
Matlab 2013a, 32 bit

I also have a 64 bit installation of Matlab on my computer, but I've removed the corresponding directories from the windows path. When I call matlab from the command line I get the 32 bit version. I've also run matlab /regserver as an administrator, but I still get the following when I try to run MatlabDemo_SignalGenerator.bat

Code: Select all

2014-03-20T10:45:28 - BCI2000 Started
2014-03-20T10:45:28 - Started "SignalGenerator"
2014-03-20T10:45:28 - Waiting for configuration ...
2014-03-20T10:45:28 - Started "MatlabSignalProcessing"
2014-03-20T10:45:28 - MatlabFilter::Constructor: Unhandled Win32 exception 0xc0000005: ACCESS_VIOLATION
Terminating SignalProcessing module.
Could it be that the 2013a version of Matlab is too new to be recognized by BCI2000?

Thanks,
Tim

boulay
Posts: 382
Joined: 25 Dec 2011, 21:14

Re: Terminating SignalProcessing module

Post by boulay » 20 Mar 2014, 21:26

I don't know enough to give you an answer, but you can try compiling the MatlabSignalProcessing module --linked against the new libraries -- on your own to see if that fixes the problem. And, if you do that, you can compile a 64-bit version of the MatlabSignalProcessing module to work with 64-bit Matlab if you would prefer to get rid of your 32-bit matlab install.

Compiling BCI2000 on Windows is not that hard. Follow the directions here. I recommend getting the 32-bit compile to work first because there's a little bit of trickery needed to get the 64-bit compile to work, though it's not too bad.

tjzeyl
Posts: 2
Joined: 08 Nov 2013, 16:40

Re: Terminating SignalProcessing module

Post by tjzeyl » 21 Mar 2014, 10:39

Thanks for your reply.

I was finally able to get the 32-bit binary version to work with Matlab. All I needed to do was add the following to the windows path:

C:\Program Files (x86)\MATLAB\R2013a\bin\win32;

The previous path consisted only of the following:

C:\Program Files (x86)\MATLAB\R2013a\runtime\win32;
C:\Program Files (x86)\MATLAB\R2013a\bin;

Locked

Who is online

Users browsing this forum: No registered users and 21 guests