Zapit-Optostim / zapit

General purpose optostimulation system
GNU Lesser General Public License v2.1
6 stars 1 forks source link

There is a rare memory leak #21

Open raacampbell opened 1 year ago

raacampbell commented 1 year ago

There is a memory leak that happens seemingly at random. I don't know what triggers it or where it's happening. Last time it happened was after sending samples. One possibility is that it is related to the camera. If so, a workaround is to disable the camera feed during experiments:

>> hZP.cam.stopVideo
>> hZP.cam.startVideo

Whether the camera is running can be determined by hZP.cam.isrunning.

If you experience this issue, please reply here on whether the above works.

raacampbell commented 1 year ago

This has not happened in a long time.

raacampbell commented 1 year ago

Still not seen it again.

raacampbell commented 1 year ago

Close for now.

raacampbell commented 1 year ago

This is happening when I run the stressTest. Depending on how reproducible this is and how often it happens, we will need to fix before leaving beta.

raacampbell commented 5 months ago

This again did not happen in some time, but on NM's rig in particular it is happening often. So we need to look into what the source is.

raacampbell commented 5 months ago

We believe the leak is related to the camera because we generally see the camera feed freeze when the memory leaks occur and because in at least one case, removing the camera cable caused the memory to release. In other instance, the memory remained locked even when MATLAB closed. This was on NM's rig, where the memory was being locked by a Dell process.

So likely the next thing to try is to look into which driver is being used for the camera. Can we use a different one? Contact the manufacturer.

raacampbell commented 3 months ago

It is likely this associated with the camera: #126