KiCAD says file already open; not true

when I open a project and try to display the schematic, KiCad 5.1.10 displays a Warning “Schematic file .sch is already open”. The schematic in question is not open, however.

How can I fix this? Can I get into KiCad and change a flag somewhere? Is there a way to reset the open/closed status off files?

Best regards,

Peter

Does this happen after you reboot your computer? Could some other (not Kicad related) program have it open?

Can you give more details? Like Operating system, file system, …
Is it on a NFS or local?

Sounds similar to this even though different versions

thebigg, Thank you very much indeed! This was exactly the problem and it was an easy fix once you pointed me to it. JohnRob and johannespfister, thank you for helping as well.

The problem is now solved.

Best regards,

Peter

I suggested to the developers that they add a one sentence bread crumb on the Alert Box for “file is already open” of what can cause the box to come up in error. (the lock file)

One of the developers just discounted this as a problem that only happens really rarely. It would seem it’s not that incredibly rare. And it’s an easy problem to fix once you have some clue where the problem is.

One sentence at the bottom of a three or four sentence alert? Ah well I’ll choose my battles.

Another solution would be for KiCad to check if the purported locking process actually exists and delete the lock file and start normally if not.

Deleting the auto-deleting the lockfile is not a good idea. It might be there because a previous KiCad session crashed or got shutdown by power failure etc. A more helpful clue to where the lockfile is would help

But indicating where the lockfile is (usually at a standard path) does nothing useful either. If anything is to be done then the lockfile should record more information of the state before the abort or crash such as what project was open and KiCad should offer to do a consistency check on that project.

If you want, you can make a feature request here: https://gitlab.com/kicad/code/kicad/-/issues
Or you can make the changes to the code yourself and make a merge request.

I already put in the request on gitlab and was kind of dismissed. You could put in a comment on the issue if you want.

Maybe you should fill the complete issue. A bot closed it automatically because the issue is not complete.
As the bot says:

Please follow the required issue template when creating a new issue. You may re-open this issue after adding the required information.

It does kind of make sense to do something more intelligent with the lockfile and handle it in an elegant manner. The lockfile is checked on file startup because that’s what brings up the alert box. Doing the consistency check there when the file opens, seems like a good idea, if it can be done easily and not introduce other error states.

Otherwise just a location to the lock file is better than nothing for someone searching through a puzzling condition. But indeed to have this dealt with automatically if possible.

For what it’s worth, that is a user, not a developer who commented on the issue.

Now that you’ve reopened it with version info you may get some developer eyes on it :slight_smile:

Please don’t assume your request was dismissed until it is closed by someone else than the bot (yes, the bot may be frustrating at times). It sometimes takes time for us to reply to an issue, and we don’t always agree with each other.

I absolutely agree with you that this is a problem that needs to be fixed: it took me 20 minutes to find where the lock file is, and I found it only after reading the source code!

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