Questions & Answers

Studio 5 to work with NAS shares PLEASE!!!!

+4 votes
467 views
asked Jul 2, 2021 in Hardware Integration / Remote Control by matthewburbridge (240 points)

This is actually a BUG but the support engineer suggested I post here as well! https://support.presonus.com/hc/en-us/requests/683966

Full description of the issue a root cause analysis is here: See https://my.presonus.com/support/ticketdetail/664676

Summary : When saving on a NAS share when I remove unused files using the "Removing Unused Files (Delete Files Permanently)" option I get a error: "Some files could not be deleted" Unknown Error. However, I can delete the file using Finder (iMac) with no issue. On the mac I use AFS and CFIS/SMB and both produce the same result.

I have proved that the error is not due to the permissions or credentials of the NAS share:
1) Studio One is able to successfully delete another wave file with the same permission in the same folder (see the unlink call from the dtrace output). This shows that Studio One is able to delete files from the share so the permissions/credentials are valid.


2) There is no unlink call for the file that produces the error which means that Studio One is generating the error BEFORE attempting to delete the file. Therefore it is not the delete/unlink that is causing the error: It is some logic that is generating the error before the calling the unlink system call.


3) The SMB wireshark traces confirm that there is no attempt to delete the file. The wireshark trace clearly slows the other file being deleted successfully but not the one producing the error.

Furthermore, the deletions of the two files occur at different times: The failing one when attempting to remove unused files, the successful one: when the song is closed. I suspect (being a software engineer myself) is that this is therefore two separate areas of the code.

As for speed of the link: I am using a 1G ethernet link which gives a directional speed or over 100MB/s with a total throughput of over 200MB/s. A wave file requires a stream rate of about 10MBs. Ignoring the affects of file caching and read ahead there is amble bandwidth. Additionally, The hard disk in the mac is capable of 120MB/s. Actually it is specified at 160MB/s but realistically you wont get anywhere near that due to file system overheads and seek times etc so the nas share is not that much slower.

This is what I believe is happening: 

When I remove unused files (when the song is stored on the harddisk) the file goes into the Trash. To do this StudioOne must be calling trashItemAtURL (not exactly sure which API StudioOne uses but I will assume it is using the standard APIs). This moves the file to the trash.

On a NAS share there is no trash so trashItemAtURL will fail and that this the unknown error that we are seeing. For a share the function removeItemAtURL should be called which deletes the file immediately with out it going through the trash.

This is the equivalent of using the Finder "Delete Immediately" function or "Option + Command + Delete"

I am assuming that the file that I see being deleted (unlinked) is using removeItemAtURL as this is some temporary buffer file and thus is not required to go the the trash.

No sure why anything needs to be put in the trash anyway (This is true for both MacOS and windows)

...