evaera / RbxSync

[ARCHIVED] Third party IDE support for Roblox Studio.
GNU General Public License v3.0
31 stars 12 forks source link

[Fix coming in version 2] EBUSY when files are saved #4

Closed MemoryPenguin closed 6 years ago

MemoryPenguin commented 7 years ago

In some cases, Node will throw an uncaught EBUSY error when you save a file. Restarting RSync fixes this occasionally, but not often. The changes replicate back to Studio fine, but subsequent changes will not be replicated until you close the dialog box. This is probably caused by a race conditional - the server is trying to read the file while it's still being written to by the editor. This can be fixed by using an asynchronous read with error handling here and retrying the read until err != EBUSY.

Using latest RSync on Windows 10 x64 v1607 (Anniversary Update).

evaera commented 7 years ago

@MemoryPenguin Can you tell me what editor you are using? I think the issue might be that the editor isn't unlocking the file.

MemoryPenguin commented 7 years ago

Using Sublime Text 3 build 3126; no installed packages interact with file saving to my knowledge.

evaera commented 7 years ago

hm, weird. I use the same editor and I can't get it to happen for me, I will check on Windows 7 in a little bit

mastermarkus commented 7 years ago

Same problem, I use Sublime Text 3- Build 3126, Here's how you can REPRODUCE "EBUSY" ERROR

1.Create Space anywhere in your file by pressing Spacebar. 2.Save file By pressing CTRL + S and it throws error. 3.When pressing backspace at the same location where you created space and save it, throws error again, but if you save again it doesn't throw error anymore.