OpenViBE forum

The OpenViBE community
It is currently Fri Dec 15, 2017 9:48 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Matlab Box Memory Leak
PostPosted: Mon Oct 09, 2017 12:33 pm 
Offline

Joined: Thu May 11, 2017 9:37 pm
Posts: 3
Hello guys,

I have a question concerning the matlab box. I use it to process my signal. But after a while OpenVibe always crashed. I have looked into it and found out, that the memory usage of OpenVibe increases extremely during the operation. I was using time-based-epoching before the box, and it seemed like all epochs were saved in memory?!

Now I am doing the epoching myself in the matlab box, so the memory usages increases slower. But still, after some hours also this would lead to a crash.

This can be also observed in the FFT-Matlab Tutorial.

My code in the simplest version producing the problem looks like this:
Code:
function box_out = adaptive_process(box_in)

for i = 1: OV_getNbPendingInputChunk(box_in,1)
    [box_in, start_time, end_time, matrix_data] = OV_popInputBuffer(box_in,1);
end

box_out = box_in;
end


Am I doing something wrong? Is there a solution for this?

Thanks,

Simon


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 09, 2017 2:16 pm 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 601
Location: INRIA Rennes, FRANCE
Hello Simon, which openvibe version are you using and on what OS? What Matlab version? We can try to confirm and fix.

Edit: Indeed, it seems that OV1.3.0 Matlab box leaks memory pretty badly. Can you try this attached replacement and tell us if it works better for you? Its for Windows OV 1.3.0.


Cheers,
Jussi


Attachments:
matlab-plugin-memory-leak-fix.zip [101.2 KiB]
Downloaded 7 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 09, 2017 5:44 pm 
Offline

Joined: Thu May 11, 2017 9:37 pm
Posts: 3
Hey Jussi,

thanks for the very quick help!! I didn't have a lib folder anywhere in my OpenVibe directory so I put the lib folder from the zip-file just directly in the OpenVibe directory, is that correct?

On a quick try it seems like this fixed it, I'll do more testing and get back to you, if I run into more problems.


Thanks a lot,
Simon


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 10, 2017 7:37 am 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 601
Location: INRIA Rennes, FRANCE
Great to hear that it works so far, and thanks a lot for the report. It seems a rather major bug, so I'm surprised no one reported it before. Maybe they use less data and/or have huge amount of RAM.

The lib/ content might indeed be unneeded runtime on Windows.

Don't hesitate to let us know if you encounter issues with it (or ov in general, of course).


Cheers,
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.