Lock error trying to save a PCB

(apologies if this is in the wrong category)

I have been working on a PCB which saved fine yesterday. Made some minor tweaks today and on saving, I’m seeing the following:

Can I get some advice on how to proceed? There’s only myself using the software and file system so I know it hasn’t been grabbed by someone else. Files exist on a OneDrive folder and definitely exist on the local filesystem.

EDIT:
I saved a copy (ok), closed and then tried re-opening the PCB and got this error:

You didn’t say what version of KiCad this relates to . . . but, does any of this help ? (I know it’s about Schematics and you have an issue with PCB but the mechanism might be the same)

Sometimes OneDrive can cause problems with KiCad files (something about how often KiCad saves to disk and OneDrive being slow to sync can cause corruption). Does a backup file (copied to local disk and unzipped) show the same syntax error?

The “already open” error (in 7.0.6) is due to a lock file left in the project directory when KiCad doesn’t shut down properly. If you delete the .lck files, it should resolve that issue.

1 Like

Thanks - I’ve never had any problems with projects on OneDrive before but I’ve only recently (last 2 weeks) updated to V7. It may be an issue with time duration and OneDrive keeping only links local “after a period of time passes” - perhaps one of the files had been replaced with a link and KiCad couldn’t then parse it. In theory, if a file is accessed, OneDrive should download it transparently but, you know, bugs…

I deleted the lock file and that second problem went away, thanks. Following on from your info, to resolve the whole thing I:

  • Deleted the LCK file
  • Deleted the old PCB file
  • Renamed the saved copy PCB file to the original name
  • Re-opened the PCB and all was good.

I think the moral here is perhaps not leave the project open overnight - even if the computer is put to sleep.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.