"Failed to override read-only file" errors
-
- CodeLite Expert
- Posts: 152
- Joined: Fri Jul 15, 2011 2:49 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
"Failed to override read-only file" errors
Windows 10 (64-bit) / Codelite 11.0.5
Starting with Codelite 11.0.5, I'm seeing a lot of "Failed to override read-only file" when trying to save an edited file in Codelite. I can't reproduce this issue at will, but it seems most likely to occur if ctrl+S is used immediately after making an edit.
To make matters worse, the situation seems not recover ie typing ctrl+s again a few seconds later still shows the same error message.
The only course of action I've found so far is
[1] Copy the contents of the edited file into (eg) Notepad
[2] Exit codelite and do not try and save the edited file
[3] Start codelite and paste in the edited file from Notepad
[4] Hopefully the file can now be saved *but even this doesn't always succeed*
Does anyone know why this is happening and any ways to prevent it? As things stand I'm having to rollback to codelite 11.0.4.
Thanks, Colin
Starting with Codelite 11.0.5, I'm seeing a lot of "Failed to override read-only file" when trying to save an edited file in Codelite. I can't reproduce this issue at will, but it seems most likely to occur if ctrl+S is used immediately after making an edit.
To make matters worse, the situation seems not recover ie typing ctrl+s again a few seconds later still shows the same error message.
The only course of action I've found so far is
[1] Copy the contents of the edited file into (eg) Notepad
[2] Exit codelite and do not try and save the edited file
[3] Start codelite and paste in the edited file from Notepad
[4] Hopefully the file can now be saved *but even this doesn't always succeed*
Does anyone know why this is happening and any ways to prevent it? As things stand I'm having to rollback to codelite 11.0.4.
Thanks, Colin
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
Do you get anything in CodeLite log file?
%appdata%\CodeLite\codelite.log
Increase the log verbosity: settings->preferences->misc->Log->Debug
There was a problem when attmpting to write an unsaved file, but issue was fixed...
I don't think I change alot in that area... in the last versions. But I can check
%appdata%\CodeLite\codelite.log
Increase the log verbosity: settings->preferences->misc->Log->Debug
There was a problem when attmpting to write an unsaved file, but issue was fixed...
I don't think I change alot in that area... in the last versions. But I can check
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
One thing that comes to mind:
Do you have clang code completion enabled?
If you do, then it's possible that this is the cause of the problem. On Windows, libclang locks the file and you can't write to it until clang complete its parsing
To check if you have clang CC enabled: settings->code completion->clang->enable clang code completion
Turning this OFF should fix your problem
Do you have clang code completion enabled?
If you do, then it's possible that this is the cause of the problem. On Windows, libclang locks the file and you can't write to it until clang complete its parsing
To check if you have clang CC enabled: settings->code completion->clang->enable clang code completion
Turning this OFF should fix your problem
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 152
- Joined: Fri Jul 15, 2011 2:49 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
Eran, thanks for the speedy response.
I've set the codelite log verbosity to debug and re-created the problem; log file is attached.
I haven't changed anything else yet, but I can confirm that clang code completion is (currently) enabled.
Thanks, Colin
I've set the codelite log verbosity to debug and re-created the problem; log file is attached.
I haven't changed anything else yet, but I can confirm that clang code completion is (currently) enabled.
Thanks, Colin
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
Disable clang code completion ... and you should be OK
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 152
- Joined: Fri Jul 15, 2011 2:49 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
Eran, before disabling clang, I looked at the clang search paths and saw that the list contained a huge list of old (and mostly deleted) directories.
I've removed those directories from clang's search paths and with clang code completion still *enabled*, I haven't been able to recreate the "failed to override read-only file" issue.
Early days to say for certain, but perhaps tidying up clang's search paths is maybe a fix for this?
Thanks for your help, Colin
I've removed those directories from clang's search paths and with clang code completion still *enabled*, I haven't been able to recreate the "failed to override read-only file" issue.
Early days to say for certain, but perhaps tidying up clang's search paths is maybe a fix for this?
Thanks for your help, Colin
-
- CodeLite Expert
- Posts: 152
- Joined: Fri Jul 15, 2011 2:49 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
As Eran suggests, better to disable clang code completion if you see this error.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
The proper solution will be to pass to libclang a temporary file to parse. this way, the real file is never locked
I will look into this
I will look into this
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
I have committed this change: CodeLite will now create a temporary file to pass to libClang instead of passing the real file
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 152
- Joined: Fri Jul 15, 2011 2:49 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: "Failed to override read-only file" errors
That sounds like a fine solution.
Thanks, Colin
Thanks, Colin