Hello!
I encounter the following error each time KiCad tries to update .PRO file: "Failed to update user configuration file". It creates a temporary file in project directory with a content of new PRO file content. If I close KiCad and overwrite the file manually it looks like it works this way.
KiCad version 4.0.0 (tried both 32 and 64 bit). I did overwrite PATHs in KiCad itself and in PCBNEW to installation paths subfolders. Operating system is Windows7. KiCad installation folder is "c:/programs/kicad-4.0.0".
Could one, please, recommend me how to overcome this trouble?
Store your projects in another folder… either on an extra drive or in the user/blahblah/… folder of your account.
Once you got familar with that… place a shortcut (admin access needed) into c:/programs/kicad-4.0.0 that points to that folder you have your projects in. You’ll need it once you make a new project or change them in KiCAD, as it will always drop you off in c:/programs/kicad-4.0.0
Thank you! I’m sorry, but I don’t understand what exactly I should do.
You said 1) store projects in another folder. I tried many different folders for my projects with the same result.
And 2) place a shortcut to my projects directory into c:/programs/kicad-4.0.0. What should be shortcut’s name? Any one? And what do I need admin access for? (“programs” is not “Program Files”).
Could you, please, provide some more details or use simpler words?
Hm…
On my windows 7 64Bit KiCAD (64Bit) is located in: C:\Program Files\KiCad
Right in that folder I have a shortcut that points to the folder where I have all my projects stored, called Data_KiCAD on another drive. When I want to open an exisiting project or make a new one KiCAD drops me off in C:\Program Files\KiCad - thus I then just click on that shortcut and I’m where I want to be withoutout much navigating in the little explorer window.
My configuration files for KiCAD are stored in: C:\Users\Joan\AppData\Roaming\kicad, those have no extension.
A file called kicad.pro, which is a template file for a project is located in C:\Program Files\KiCad\share\kicad\template. To change it I have to use administrative access.
Thank you for the detailed reply! It is clear for me that for your installation (as it is located in “Program Files”) one needs administrative privileges. But project file (not template (!!!) and not configuration (!!!)) is not located in “Program Files” - it is located in current project folder (let’s say “c:/projects/my_project/my_project.PRO”), isn’t it?
I feel there is a sort of misunderstanding. The problem is KiCad is unable to apply settings change to my project file (say “aaa.PRO”) - not it’s configuration file “AppData/Roamin/kicad”.
In other words when I change anything in project settings and click “OK” it shows me error message: “failed to update user configuration file”. And it means project configuration file - not a file in “AppData/Roamin/kicad”. I know that because it deletes my project file (say “aaa.PRO”) and creates temporary file (say “kicadA56D.tmp”). And if I close KiCad and change temp file’s name to my “aaa.PRO” and reopen KiCad my changes apply.
So since some moment in time work consists of “close”-“rename”-“open” sequences.
But I must say that this problem exists only on a computer with Windows7. On Linux everything works as before (with 2013-07-07 version).
yes, that’s correct.
If you have trouble getting kicad to save to the project folder… did you check permissions on that one? Maybe it’s just the project file itself that got the permissions wrong?
I don’t know how picky (your) windows is about having stuff going on in C:
Do you have another drive you can - for test - save a project to?
This smells like some kind of windows/permission mishap…
The first thing when trying to solve a problem is not to make assumptions, and don’t jump to conclusions!
And it means project configuration file - not a file in
“AppData/Roamin/kicad”. I know that because it deletes my project file
(say “aaa.PRO”) and creates temporary file (say “kicadA56D.tmp”).
You don’t “know” that, you are guessing. The file in AppData/Roaming/Kicad stores the last used project files, so it is quite possible it is trying to write to that file, and aborting part way through writing the project file.
You have permissions to c:\projects, it is a normal user folder, so logic suggest that is not the problem. The error message is also telling you the source of the problem, but you are assuming that is wrong based on faulty assumptions. The problem most likely is to do with AppData/Roaming.
A google for “problem writing to appdata/roaming” finds several problems relating to that, so it might be a general Windows problem instead of a specific problem with Kicad.
Dear all! Thank you very much for your advices! It must be you are right. I’ll try to work with folder permissions.
(I actually made such an assumption because the problem appeared just after I upgraded KiCad. And as Windows and computer remained the same I made a conclusion that the part which changed (e.i. KiCad) caused the problem. Previous KiCad version worked for years on the same computer and in the same folder without any troubles.)
Anyway, thank you again for pointing me in the right direction!
Older versions of KiCad kept user config in the Registry, but this has been moved to regular files, which is probably a good idea, but can bring new problems.
I looked through the latest source code, but I didn’t find an error message like “Failed to update user configuration file”, so I can’t give you any further clue what the code is trying to do at that point.
Thank you for your help!
If it matters I pasted error details from this error window below:
12:00:17 PM: Failed to copy the file ‘C:\projects\lcu03.git\electrical\lcu03\lcuF20C.tmp’ to ‘C:\projects\lcu03.git\electrical\lcu03\lcu03.pro’ (error 0: the operation completed successfully.)
12:00:17 PM: File ‘C:\projects\lcu03.git\electrical\lcu03\lcuF20C.tmp’ couldn’t be renamed ‘C:\projects\lcu03.git\electrical\lcu03\lcu03.pro’ (error 0: the operation completed successfully.)
12:00:17 PM: can’t commit changes to file ‘C:\projects\lcu03.git\electrical\lcu03\lcu03.pro’ (error 0: the operation completed successfully.)
12:00:17 PM: Failed to update user configuration file.
Please, see the very bottom message. It repeats the window title: “Failed to update user configuration file”.
If one ignores the part saying “error 0: the operation completed successfully” then as I understand it creates temporary file “lcuF20C.tmp”, removes original “lcu03.PRO” but can’t copy that “lcuF20C.tmp” in place of “lcu03.PRO”. I afraid making any conclusions after your warning but as I can see it really removes original PRO file and really creates TMP but can’t rename TMP into PRO. And it is what I have to do manually.
Unfortunately, I didn’t examine the source yet so I don’t know where the problem comes from exactly.
Well I guess I owe you an apology because your initial idea was correct. KiCad uses the wxWidgets library to handle the PRO file, which wx calls the “user configuration file”. You can see where the error occurs in this file https://github.com/wxWidgets/wxWidgets/blob/master/src/common/fileconf.cpp#L1029
The puzzling thing is that the message “error 0: the operation completed successfully” is the Windows error message, but says there is no error!
You need to pause Dropbox syncing. I can reproduce this “Failed to update user configuration file” problem at will by pausing/restarting syncing. I don’t know if Google Drive and others result in the same issue.