-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to write to file xxxx file in use, locked or lacking permissions (Windows 10) #16274
Comments
Duplicate of #14339 Do you have an antivirus running? |
@Zylann Yes, I'm using Avast and Malwarebytes. |
I'm pretty sure it saves all the files that are not in the message (sometimes they're saved even when they are in the message). |
@vnen Couldn't it be possible for more than 1 file to be locked at once? The popup is not going to show you all the files currently locked. (I could be wrong) Though I've had issues where I was using a gdscript for player then switched to a visual script tried to save and godot still thought I was using a gdscript for player. I had to eventually restart godot :( |
I have the same issue using AVG as my antivirus (Win10 Fall Creator's update). This has been an issue in Godot 3 builds for months (back to the alpha versions), so it's not a recent commit that created it. This usually happens either when saving a scene or when starting the game. |
baseless assumption tho, and I have no time to check atm sorry :p |
I recall they turned out correct though I'm nobodies friend, except akiens maybe, but he doesn't accept me... |
I've had this happen on Windows 10 without any antivirus (and Windows Defender disabled). I haven't tested it since December 2017 since I'm on Linux now, but I figure it still happens. |
I'm almost sure Godot is locking the files at least in some cases. Then i observed something strange: I tried this a few more times on different machines all running Windows 10, no antivirus and no Windows Defender enabled and this was 100% reproduceable. |
That's quite interesting. It wouldn't be the first time that the EditorProgress bar causes weird issues. |
This happens to me when i have a MEGASync running in that folder on 3.0 stable |
Please fix this, I've tried so many things and Godot has genuinely become unusable for me, this is what I've tried:
It's gotten even worse now for no good reason, with the editor locking up anytime it happens. |
I installed Godot on my tower, made a small sample project that imports a texture, has a sprite node with some code that is an instantiated scene. Edit: After having restarted my laptop in safe mode, then diagnostics and back to normal I'm not getting the issue atm. When it comes up again I'll try to slowly kill processes and services to see what it might be. Edit 2: It actually did come back in the end, I haven't found a correlation yet |
@TomDobbelaere I second this. Godot is also unusable for me as well because of this issue. I have tried disabling 3rd party Antiviruses and Window defender and still get this issue. |
As far as I understand, this affects only Windows 10 users? Would need an experienced Windows 10 dev to profile the file accesses and see what Godot can do to workaround Windows' restrictions. |
I do think it's Godot that's locking the files. I have seen this with the thumbnails if I save the scene twice in a row. Probably the editor is trying to access the file before the last run has released the handle. |
Can confirm, usually happened for me when it said something about generating/saving Thumbnail. |
For anyone willing to contribute, the file in question is file_access_windows.cpp, in particular the if (rename_error && close_fail_notify). The comments mention paranoid antiviruses causing the issue by checking even non-executable files when writing them, though I doubt whether this is true since disabling my antivirus didn't help. |
Okay, I haven't fixed the file renaming issue, but someone didn't think while writing the 'retry' code. I'll reference a commit in just a moment. This gets rid of the annoying errors while still telling you if it didn't save correctly. |
Fixed by #17869, thanks @TomDobbelaere 🎉 |
I just wanted to say I'm still occasionally getting this problem in Godot 3.1 Alpha 1 (with and without Mono). It's possible that I have an underperforming computer that has problems keeping up with the filesystem access. Usually I have no problems if I make sure to save again right after the error window pops up, and this problem is nowhere near as bad as it was a few months ago. System InformationOS: Windows 10 Home 64-bit |
Does it still occur when disabling Avast temporarily? |
I have no AV running, including any that Windows has out of the box, and I still get this issue (slightly different location than that of the OP's image) Deleting the entire Godot folder in OS: Windows 7 Pro 64-bit |
I am getting this too almost everytime I save in Godot 3.1 alpha1, on a computer that has no antivirus installed other than the default Windows one. Windows 10 64 bits With this error in the console:
Interestingly, that's the same computer model as mine, but I don't remember getting the problem on mine. |
I have this issue in v3.1.stable.official trying to save a gdscript. I'm on Windows without antivirus or version control. |
Think I'll try Unity until this issue with Windows 10 is fixed. I'm using Godot with Steam installation. |
I just want to place in here that I at least don't get this error anymore (with Win10 64 bit April Update, using AVG as the anti-virus software). So this bug doesn't affect near as many setups now, but it looks like this is still ongoing with a few people. |
Hi, I'm also still experiencing this in version 3.1.1, sporadically, and I believe especially with larger files, or when the computer is already busy reading/writing. |
For anyone still encountering this: Make sure your debugger has stopped! I was banging my head on the desk over a mysteriously locked scene until I realized my game had a bug such that closing the game window didn't actually kill the process. Stopping the debugger released the file, and I switched to banging my forehead on my palm. |
Getting this with beta 4 on my Windows 10 machine EDIT: @mcbits is correct, you can fix this by hitting the stop button on the top right |
If this is confirmed then we should re-open the issue 😛 |
@nathanfranke There's already an open issue about the same problem: #6393 |
that was a bruh moment 🤦 |
I'm Still having this issue. Windows 10, no antivirus running. |
I have this issue in Godot 4.0 on Win 10 when running scenes in one of the 3d projects. Other projects are fine. AV disabled. Tried running as admin to no avail. |
Issue still exists on v4.1.2 on windows 10, please re-open this ticket. No antivirus and running Godot as admin does not fix the issue. |
Please open a new issue with a minimal reproduction project attached, as the exact cause is likely different nowadays compared to the original issue. |
Apologize if there's an issue for this already.
Godot version:
3.0 stable
OS/device including version:
Windows 10, Nvidia GTX 1070
Issue description:
I get this extremely annoying popup that says "Unable to write to file xxx file in use." This happens very frequently but not everytime. This issue is very tedious for Windows users.
I am using both Avast and Malwarebytes.
Steps to reproduce:
I get this issue trying to open up or save files.
The text was updated successfully, but these errors were encountered: