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?
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.
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.
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.
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.
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!