File opening warning

Every time I open Kicad projects I see something like this:

There is no way to remove this annoying popup
I tried:

  • I closing Kicad nicely.
  • I removed the lock files ~boardname.kicad_sch.lck and ~boardname.kicad_pcb.lck
  • Restart the computer…

Nothing helps, this thing always comes back.

It is also annoying because the schematic/pcb does not load without clicking that stupid popup. Which is most of the time hidden since on Gnome it is attached to the main Kicad window not to the Eeschema or PCBNew.

Kicad should at least load the content of the locked file so we can see it without having a heart attack every time.

What it should prevent is the file being written not the file to be viewed in this case.

But there is something broken with this lock thing because things are locked 99% of the time.

Application: KiCad Schematic Editor x86_64 on x86_64

Version: 7.0.8-7.0.8~ubuntu23.04.1, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1
	libcurl/7.88.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.52.0 librtmp/2.3

Platform: Ubuntu 23.04, 64 bit, Little endian, wxGTK, ubuntu, x11

Build Info:
	Date: Sep 30 2023 13:54:00
	wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.88.1
	ngspice: 38
	Compiler: GCC 12.3.0 with C++ ABI 1017

Build settings:
	KICAD_SPICE=ON

I’m also getting (slightly) annoyed by the multiple popups. I am opening a lot of projects from other users and sometimes I have as many as 4 popups in a row (and then for example the 4th telling me that the schematic (or PCB?) does not even exist and it asks me if I want to create it).

But usually I can deduce the reason for the popups. Do you have this popup only with this project or also with other projects? One simple thing you can try is to:

  1. Move the project to somewhere else on your file system.
  2. Project Manager / Save As … and then save it back to it’s original location.

That may get rid of accumulated crud. If you have other files in your project (documentation, source code, etc) you probably have to manually copy that back too.

I am also getting this popup every time I open KICAD. :confused:
:mouse:

I just removed the lock (LCK) file for the project in my File Explorer, then opened Kicad and all was well so that solved it for me, nice and simply :partying_face:
:mouse:

1 Like

those files are usually removed when close the project; if the file are there, most likely KiCAD crash…
by deleted them, the message dissapear

2 Likes

Your right I did have a crash and thats never happened to me before so quite correct :partying_face:
:mouse:

+1.

Try using dropbox, it makes it 5x worse :smiley: I said this before and I say it again. Unless it is actually important (some are), popups are the devil.

I am not entirely sure why these files exists, though I can make a well educated guess. But can we not get a new setting for it in V8 not to use these lock files and let kicad… just work. I can imagine it is usefull if you work with multiple people on the same project. But aren’t most of us working on their projects alone? I think that I could live without this ‘feature’ and the accompanying popups.

Regards :coffee:

Bas

But can we not get a new setting for it in V8 not to use these lock files and let kicad… just work

I think making the lock file mechanism more robust is the better way. Otherwise we get 1024…16384 settings checkboxes for every minor aspect.
During my v7.99 tests I get much fewer “file already open” popups, so maybe the devs have already improved the lock-file mechanisms.
Admittedly I have no experience with dropbox or other cloud based projects and don’t know if that adds more popus.

I have no problem finding the reason for those popups. But this behavior is somehow broken by default. I can ignore the lock using the “Open Anyway”. I can also delete the lock file. But this is not going to help to fix this problematic behavior. People use Kicad on different projects at the same time. Kicad also encourages working this way since it now allows us to copy and paste things from within projects.

The problem is that this lock thing does not work and always come back.

Also, the lock should block from writing the files/project but not from reading it.
So if there is a lock it should open the project as read-only, and then we are going to see the project there. But this lock mechanism is deeply broken because even if I do everything right, I still continue seeing this popup. Maybe because my project is inside a Dropbox folder, who knows? But the issue is that it is not working right and it does not help anything the way it works.

it’s very likely due to the dropbox folder.
the file action (like creation) on a dropbox folder are a lot slower than on a real folder.
Due to this, the lock file is not created when it should and the software does not behave correctly.

After once the error appear and you have a stranded lock file, kicad never delete it. There I think it should delete the lock file if I click on open anyway.

I have used this way since Kicad 4. We are about to see Kicad 8.

There I think it should delete the lock file if I click on open anyway.

Oh, is it not doing that? That might be the issue then.

You should atleast get a warning and not be allowed to make changes. A simple write protect without warning would work against you. Imagine that you don’t know that your coworkers is not working on the project, he makes changes, you make changes and you can’t save because the board is already changed. So either you or your coworker would lose work.

Maybe it would be a good idea to “touch” (= update it’s access / save time) the lock file (by the instance that created it) every few minutes, combined with any other KiCad instance allowing to delete a lock file that is over 10 minutes old. But I recon there are sort of standardized (and proven correct) ways of doing this.

1 Like

The locking system has been improved in 7.99 nightlies and 7.0.x testing builds - I suggest you try it out and see if your problems are resolved.

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