Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How about the "Library files could not be written" dialog ? (Read 1425 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How about the "Library files could not be written" dialog ?

Hi, here's the dialog. I get it EVERY TIME I close foobar.
Often I have to click two or three times on "Try again" until it finally works and I can quit foobar properly.
AFAIK I've had it since foobar 1.4 (now I'm in 1.4.1 and the problem persists).
I'm running Windows 7 SP1 x64.
Any thoughts ?

Re: How about the "Library files could not be written" dialog ?

Reply #1
Have you tried, quoting Case here, "making sure the 'Use transacted filesystem for saving configuration' setting is disabled under Preferences -> Advanced -> Tools", and making sure your Foobar directory isn't included in your monitored library?  That is what he suggested to the poster with the same issue on this thread:
https://hydrogenaud.io/index.php/topic,117034.0.html

Re: How about the "Library files could not be written" dialog ?

Reply #2
Yes, the setting is absolutely disabled (which is the default BTW). I have just re-checked.
My foobar folder (portable install) is on C:, my libraries are either on D: or E:.

Re: How about the "Library files could not be written" dialog ?

Reply #3
Since you have the problem every time please provide Process Monitor log. Details how to do that can be found in Appendix C here.

Re: How about the "Library files could not be written" dialog ?

Reply #4
Thanks Case. Here's the log file.
I've cleared it up a bit from some apps (antivirus, firefox, rainmeter, etc.).
You'll easily find all the foobar stuff and the reported errors.

Having checked several times today, I need to add that in fact the error is not systematic. Actually I thought it was, because maybe it tends to happen "all the time" or "most of the time" when foobar has been running for at least some minutes (usually I leave it running for hours). But just starting foobar and quitting it after a few seconds seems to trigger the error less often.

I don't know what more to add. Feel free to ask for more tests of course.

Re: How about the "Library files could not be written" dialog ?

Reply #5
The log file didn't show why access was denied. One potential culprit could be the anti-virus you filtered away. File operations in foobar2000 generally retry operation if the file is locked by a stubborn anti-virus, but I think it only knows to do that when access is denied with sharing violation error. Access denied generally means that user has no permission and there's no reason to retry as permissions don't just suddenly change. But I think he'll have to make the retry work for this case too.

Re: How about the "Library files could not be written" dialog ?

Reply #6
Sorry, I can provide a new log with the antivirus if you want. Just let me know.

That being said, please note that this problem started happening (a lot) when I upgraded to 1.4.0 a few months ago.
With my previous version (1.3.9) it never happened, not even once.
And my antivirus has remained the same during that time (Webroot SecureAnywhere).

Re: How about the "Library files could not be written" dialog ?

Reply #7
OK, here's a new log file, with ALL processes.
Due to its size (80 MB), I had to host it on WeTransfer. Here's the link : https://we.tl/t-tgfltwfEqq
Please acknowlege reception so I can erase it from my HDD.

This log file should be useful, since when the error dialog appeared, i had to click EIGHT TIMES on "Try again" before it actually worked and exited foobar.

Thanks for your help with this.

Re: How about the "Library files could not be written" dialog ?

Reply #8
Just curious. Do you have the same trouble using (hold shift key) File menu > Save configuration? Case, does that use the same procedure as when shutting down?

Re: How about the "Library files could not be written" dialog ?

Reply #9
The full log doesn't appear to show anything new. Anti-virus activity is probably hidden behind Microsoft's filter drivers. From the logs everything appears to be in order apart from the error. All foobar2000 handles to the old library dir are closed. Dir is stored away by appending .old to its name. But when new dir is going to take its place by being renamed to the now available original name, it stops with the error.

Save operation performed on close or commanded from the menu appear to do the exact same actions.

PS: you could have compressed the logfile. Even with simple Zip its size was reduced to about 9 MB. With something more powerful like 7-Zip or RAR it would have gotten even smaller.

Re: How about the "Library files could not be written" dialog ?

Reply #10
"Save configuration" uses the same procedure as when shutting down.
Microsoft Windows: We can't script here, this is bat country.

Re: How about the "Library files could not be written" dialog ?

Reply #11
Workaround added for the next foobar2000 update, thanks for reporting.
It is likely that enabling transacted filesystem option (which is disabled by default) could mitigate this problem for now.
Microsoft Windows: We can't script here, this is bat country.

Re: How about the "Library files could not be written" dialog ?

Reply #12
PS: you could have compressed the logfile. Even with simple Zip its size was reduced to about 9 MB. With something more powerful like 7-Zip or RAR it would have gotten even smaller.
Silly me ! I didn't even think about it. I'll make sure to do it next time.

Workaround added for the next foobar2000 update, thanks for reporting.
It is likely that enabling transacted filesystem option (which is disabled by default) could mitigate this problem for now.
Thank you all. I'm happy to have reported something and that a workaround can be found. Looking forward for the next update.