-
Notifications
You must be signed in to change notification settings - Fork 133
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
Config Bug: WinError 32 + WinError 2: Can't rename config file, error & The system cannot find the file specified #949
Comments
Can you check if this build improves the situation? https://github.com/mathiascode/nicotine-plus/actions/runs/490450158 |
The several times that I ran this build the only error produced now was:
And at max, two consecutive errors were shown in the log. After more testing, the error was happening every time with the cloud sync app open, but now isn't. Since this build, the syncer doesn't seem to try to immediately sync the config files as soon as Nicotine+ opens (not sure why that's different, maybe the way you're now writing the files). The error occurs sporadically, even though it was happening repeatedly at first with this new build. It's a bit hard to track down if there's an improvement, but WinError 2 hasn't occurred at least. Though error 32 is reported, as soon as Nicotine+ runs, I see |
Seems I spoke too early. For the first time in say 15 launches, WinError 2 occurred, and only because both the sync app and Nicotine+ were accessing it at the same time again. |
I changed the behavior to copy the "config" file to "config.old", instead of moving it and creating a new "config" file. Can you try this build? https://github.com/mathiascode/nicotine-plus/actions/runs/491468869 |
If I understand correctly, Nicotine+ was using atomic saving prior to this change. I have launched this build several times and I haven't seen the error once. It should be better using a copy now, at least for Windows. It's not easy to reproduce the error since the cloud syncing isn't predictable. Now that I haven't seen the error with this build, I'd say it's fixed. If I notice it again, I'll report it. |
Nicotine+ version: 2.3.0.dev1
Operating System/Distribution: Windows 10 20H2
Describe the bug
Expected behavior
I have both a
config
andconfig.old
existing at the attempted path. Theconfig
dir those two files exist in is a symbolic link to another location where I store config files (uploaded to the cloud), but I'm fairly certain I encountered this prior to symlinking them with version2.2.2
. Symlinks shouldn't be the cause, and the configs should always be readable/findable.Steps to reproduce the bug
Run the application.
The configs are automatically backed up to the cloud. I haven't encountered the backing-up software ever locking a file. I can delete a file being synced halfway through a sync for example.
I don't think it plays any role but I thought I'd mention it.Apparently it does.Since quitting the syncing app, I see no more errors. I think this is because Nicotine+ is deleting
config.old
and the cloud upload fails, then a lock of sorts is happening. If nicotine just overwrote the write rather than deleting it, this may not be an issue, assuming it's not already doing so.It's certainly a conflict between the cloud syncing app and Nicotine+, as when both happen to want access at the same time, the bug is occurring. I guess I'll have to manually backup Nicotine+ config files. This can be closed if deemed not a bug.
The text was updated successfully, but these errors were encountered: