Matlab scripting box error

Come here to discuss about OpenViBE in general!
Post Reply
aizmeng
Posts: 14
Joined: Fri Apr 11, 2014 1:37 am

Matlab scripting box error

Post by aizmeng »

I just to use "/box-tutorials/matlab/tuto1-signal-filter.xml"provided by the latest OpenVibe version! And I configure "signal filter" ---Matlab working directory and Matlab working directory.
But there is an error
[ ERROR ] At time 0.000 sec <Box algorithm::Signal filter> Could not open the Matlab engine.
The matlab binary path was reasoned to be 'D:\matlab\bin\win32\'.
[WARNING] Box algorithm <Signal filter> has been deactivated because initialization phase returned bad status

How can i do? Give me more details,thanks !!!!!!!!!!!!!!!!!!!

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Matlab scripting box error

Post by jtlindgren »

::engOpen() call provided by MathWorks fails for some reason. It is not in OpenViBE's control what this third-party function does. Possibly the matlab bin path you specify does not please that function call. MathWorks can provide further information on how the function works. My suggestion would be to install matlab to a standard location such as "C:/Program Files (x86)/".

Matlab tutorial,

http://openvibe.inria.fr/tutorial-using ... -openvibe/

Esp. note that 64bit Matlab doesn't work together with OpenViBE.


Best,
Jussi

aizmeng
Posts: 14
Joined: Fri Apr 11, 2014 1:37 am

Re: Matlab scripting box error

Post by aizmeng »

I don't understand how to solve the error。
Tutorial : Using Matlab with OpenViBE
The tutorial can't solve my problem?
Someone can help me ???

jdk199
Posts: 3
Joined: Tue Nov 08, 2016 3:08 pm

Re: Matlab scripting box error

Post by jdk199 »

I am having the same problem as the user above and am having trouble resolving it. Has anyone else had this issue and figured out how to solve it?

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Matlab scripting box error

Post by jtlindgren »

I suppose there's a few things that could be tried.

1) Verify that your matlab is truly 32bit. Start it. In Help->About MATLAB, you should see '32-bit (win 32)'. Note that in the Matlab 2015b accessible to me, there is no longer a 32 bit installer at all. Hence we're using older versions at Inria with OpenViBE, that is the latest one we have access to that contains 32bit.

2) Check that there is 'matlab.exe' in the path that openvibe Matlab box error prints and that this .exe is the 32bit version (step 1 above).

3) Open command prompt 'cmd'. Type 'echo %PATH%'. Do you see any other matlab versions on the printed path? There should be absolutely no pointers to other matlab versions there. If there are, you can remove them from the Control Panel->System->...->Advanced System Settings->Environment Variables.

4) Download free 'process monitor' from Microsoft. Make it only show processes that have a name containing 'designer' (use filter). Start Designer. Press play in Designer with the matlab tutorial scenario open and look at the Process Monitor output. Search for 'libeng.dll' or 'matlab'. Do you see anything suspicious? It should mention trying to open 'libeng.dll' at the path specified you specified in the box config, and that this was the first place where this open was a success.

Note also that once Matlab has found any libeng.dll from somewhere, the subsequent changes to the PATH or the box config have no effect, even if that dll was unsuitable. You must restart Designer before a new path choice will have an effect. This is due to the way Windows keeps the old dll in memory and thinks that the dependency is satisfied and doesn't try to locate it again.

If you manage to solve the problem, let us know.

(why its this complicated is because Mathworks apparently provides no way to resolve problems with its engOpen() function, and what it does on Windows is to grab the first Matlab it can find from PATH, apparently -- what the openvibe box does is to pad the user-specified Matlab path to the PATH and launch the function and hope for the best)


Good luck,
Jussi

lbatistic
Posts: 5
Joined: Tue Aug 09, 2016 1:21 pm

Re: Matlab scripting box error

Post by lbatistic »

Hey Jussi,
It seems that I have the same problem, I installed Matlab2015a (32bit version) and I rebuilt OV. Now scripting box appears in OV (so I'm guessing that build was done successfully) but when I run it I get same error as mentioned above

[ ERROR ] At time 0.000 sec <Box algorithm::(0x000043a1, 0x00007d94) aka Tuto 1 : Signal filter> Could not open the Matlab engine.
The matlab binary path was reasoned to be 'C:\Program Files (x86)\MATLAB\R2015a\bin\win32\'.
[WARNING] Box algorithm <Tuto 1 : Signal filter> has been deactivated because initialize() function returned error

Here's the process monitor (filters are set on Process Name to contain "designer" and on Path to contain "matlab")
Image

Any idea what those Reg keys (that are not found) represent? And could it be problem with them?
Last edited by lbatistic on Wed Feb 01, 2017 8:22 am, edited 1 time in total.
Cheers,
Luka

lbatistic
Posts: 5
Joined: Tue Aug 09, 2016 1:21 pm

Re: Matlab scripting box error

Post by lbatistic »

Hmmm, it seems to be working now :shock: but the strange part is that I tried lots of different things so I am not yet certain which one of them worked, but when I install Matlab on another PC and get it to work with OpenVibe I will try to explain what exactly I did.
Cheers,
Luka

hamed
Posts: 15
Joined: Thu Feb 09, 2017 4:58 pm

Re: Matlab scripting box error

Post by hamed »

I have this problem too. my Matlab version is 2015b(32bit) and i have this warning

[WARNING] No 'plugin object descriptor' found from [C:/OpenVibe/dist//bin/openvi
be-plugins-matlab.dll] even if it looked like a plugin module

1- which version of matlab works with openvibe ?
and
2- we should define the path with / or \
because in openvibe defult path defines with /
C:/Program Files (x86)/MATLAB/R2011b/bin/win32/matlab.exe

but my matlab path is:
C:\Program Files (x86)\MATLAB\R2015b\bin

My scenario Path: C:\OpenVibe\dist\share\openvibe\scenarios\box-tutorials\matlab

Do you think i should install Matlab in another path without space ?

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Matlab scripting box error

Post by jtlindgren »

The warning you get means the Matlab plugin was not built during compilation time. If you're using prebuilt openvibe, you should not receive this warning. If you built yourself, you need to be sure Matlab is found during compilation time; the paths the compilation tries are defined in cmake-modules/FindThirdPartyMatlab.cmake. Take a careful note of the configuration step output: does it say Matlab was found or not? If not, the path in the script is not suitable.

In OpenViBE Designer, forward slashes ('/') should always be used for all paths. The backslash was unfortunately defined long time ago as an escape character for configuration token parsing (so to tell OpenViBE ${text} should not be interpreted as a token, \${text} is used).


Happy hacking,
Jussi

hannahrk
Posts: 3
Joined: Fri Oct 27, 2017 4:17 pm

Re: Matlab scripting box error

Post by hannahrk »

Hi,

I also had the same error message and have fixed it, so am posting my solution in case it helps others.

In Jussi's list of solutions, number 3 was where my problem was.
3) Open command prompt 'cmd'. Type 'echo %PATH%'. Do you see any other matlab versions on the printed path? There should be absolutely no pointers to other matlab versions there. If there are, you can remove them from the Control Panel->System->...->Advanced System Settings->Environment Variables.
I found two versions of matlab in the printed path. I deleted the previous version but was still left with the error message.

In the printed path, the mentions of matlab were: C:\Program Files (x86)\MATLAB\R2015b\runtime\win32;C:\Program Files (x86)\MATLAB\R2015b\bin; however there was no mention of \bin\win32. I added this and rearranged the order so the path now reads C:\Program Files (x86)\MATLAB\R2015b\bin;C:\Program Files (x86)\MATLAB\R2015b\bin\win32;C:\Program Files (x86)\MATLAB\R2015b\runtime\win32. This fixed the problem.

Best,
Hannah

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Matlab scripting box error

Post by jtlindgren »

Thank you Hannah, thats very helpful to know!

Cheers,
J.

Post Reply