Dyalog / link

Source code for Link – the built-in component that enables the use of text files as the primary storage mechanism for APL source code
https://dyalog.github.io/link
MIT License
19 stars 12 forks source link

Saving an edited APL object resulted in FILE ACCESS ERROR #667

Open aplteam opened 3 months ago

aplteam commented 3 months ago

This is almost certainly caused by Dropbox; my guess is that the moment Link tries to save the file, DropBox has opened it for a very short period of time in order to sync it.

I am guessing this because I use DropBox and I could not really reproduce the problem. However, I see it every now and then.

My suggestion is to put a trap around the write operation and, in case of such an error, wait a very small amount of time and then try again.

I am using that strategy myself elsewhere, and it has put a stop to this.

Of course the problem might be caused by any other sync services as well, not only DropBox.

dyavc commented 3 months ago

I have asked aplteam to give us a series of steps which makes this issue reproduce on his computer. I have asked him to turn on these flags: ⎕SE.Link.DEBUG←1 ⎕SE.Link.NOTIFY←1

After the FILE ACCESS ERROR, he can get a hang with )clear or )si, and I have logged that as 21562.