Mworks issue from non-cleared directories

Hi Chris,

I did not bring this one up in our meeting because it is unrelated but would be nice to fix this one because it can cause bugs in an experimenters code in a way that is difficult to understand since it will run smoothly. It’s not at all urgent but I wanted to leave it with you before I forget about it.

The iOS MWClient should clear directories that are copied by resource from MWServer, because while stuff can be overwritten, extra stuff is not deleted, which leads to problems when inferring variables from contents of local cache directories.

E.g. I have a folder which contains 30 images that I wanted to use in my folder my_images. Later, I determine I only want to (or only can) use 20 of them, I delete some, keeping the folder name the same. In that case, the new order overwrites the original first 20 images when I load the task, but mworks still thinks there are 30 images in there to index into, and if I ask for all images in the folder to be loaded in my code, it will not reduce the number of images. If this exceeds the memory, the memory issue will appear even though you tried to reduce the number of images.

I have since moved on to a code version that does not depend on inferring variables from directories but I think it should still be fixed.

Alina

1 Like