OpenViBE forum

The OpenViBE community
It is currently Sat Sep 22, 2018 11:23 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Sep 02, 2018 12:01 pm 
Offline

Joined: Tue Aug 28, 2018 12:31 pm
Posts: 5
Hi,

I've seriously tried everything, yet I can't figure out what is the problem.

The matlab tutorials works fine, that means that there is no problem with the matlab engine calling, yet when I try to write a basic scenario the whole system crash.

Please help.

here are the matlab code (since I can't attach them as files):

Code:
function box_out = OV_EFP1_Initialize(box_in)
   
   disp('Matlab initialize function has been called.')


   box_out = box_in;
   
end

function box_out = OV_EFP1_Process(box_in)

   
 for i = 1: OV_getNbPendingInputChunk(box_in,1)
 
   [box_in, start_time, end_time, matrix_data] = OV_popInputBuffer(box_in,1);
       
   box_in = OV_addOutputBuffer(box_in,1,start_time,end_time,matrix_data);
      
 end
 
   
    % Pass the modified box as output to continue processing
    box_out = box_in;
        
end

function box_out = OV_EFP1_Uninitialize(box_in)
   disp('Matlab uninitialize function has been called.')

   box_out = box_in;

end


Many thanks,
Yael


Attachments:
tryout1.xml [14.19 KiB]
Downloaded 2 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 04, 2018 8:46 am 
Offline

Joined: Tue Aug 28, 2018 12:31 pm
Posts: 5
Hi,

So when I attach my code onto tutorial 2 code it works, but when I delete the parts of the tutorial that I don't need the system crash again. meaning the openvibe designer shutdown.

please what am I doing wrong?

Many thanks,
Yael


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 05, 2018 2:53 pm 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 751
Location: INRIA Rennes, FRANCE
Hello Yael,

Designer shouldn't crash - if it does, thats a bug. I'll take a look. I first thought it could be the changed function names, but then these can be specified in the box config...


Cheers,
Jussi


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 05, 2018 3:41 pm 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 751
Location: INRIA Rennes, FRANCE
Ok, getting back on this, the problem is that your code is missing the assignment of the header -- in OV all streams must have one. You need to add the following to the part of Process() where you iterate over the inputs,

Code:
      box_in.outputs{1}.header = box_in.inputs{1}.header;


The crash on the other hand was a C++ bug in the Matlab box, I'll fix that in git.

Thanks for the report!

Best,
Jussi


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.