Library definitions in project file stay forever stuck in there

Bug #1838185 reported by Rene Poeschl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Wayne Stambaugh

Bug Description

If one for some reason gets library definitions into the project file like it was in v4 but the schematic has been remapped or never needed to be remapped then these definitions are still read in and can not be removed from within kicad. Only workaround is to remove them using a text editor.

The attached project has a non existing lib added to the project file. One gets an error every time the schematic is opened.

Tags: eeschema
Revision history for this message
Rene Poeschl (poeschlr) wrote :
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

I have been affected by this.

Changed in kicad:
importance: Undecided → Medium
milestone: none → 5.1.4
status: New → Triaged
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Rene, do you know how this happened? The only way I can think of is that the project was opened with v4 of KiCad and then a new library was added using the old library list method. I didn't think it was possible to open a schematic in v4 once it was remapped. That is why I don't check for rogue library list entries after a schematic is remapped. I can add a check but I want to make sure there isn't some other code path that added a library to the old library list.

tags: added: eeschema
Revision history for this message
Rene Poeschl (poeschlr) wrote :

I am not sure how it happened. I used the same project for quite some time for checking library contributions and never had this issue. The original libs that where in the project included one lib that was renamed shortly before v5 got released so it must have been a late pre v5 nightly that added this lib. (Or at least some version of kicad that had knowledge of this shortlived lib.)

What i am confused about is that it seems the ubuntu version of kicad did ignore this problem while the fedora 30 version suddenly complained. One possible explanation would be that the library somehow survived in ubuntu without me knowing about it. I can no longer check that as i kind of deleted the project during my experiments. If that was the case then the lib was still invisible to every tool other than the "are all lib files findable" check. (As i never noticed that lib even thought i worked on symbols that are in that would also appear in that lib. Meaning the symbol filter would have shown them to me.)

---

One easy example how this can happen to anyone is by using version control and forgetting to commit the project file after a remap operation. (For example because it was set to assume unchanged as to not push personal settings to other users. I remember quite a few users on the forum who suggested this.)

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Rene, the project file in the sample project archive you provided does not contain any library list entries. Did you accidentally include the manually modified one? I can certainly add a dummy library but I would prefer to see the original project file if possible.

Revision history for this message
Rene Poeschl (poeschlr) wrote :

The project file should have one lib in it:
   [eeschema/libraries]
   LibName1=none_existing_lib_in_pro_file

When opening the schematic you should be greeted with a message that this library is missing. (Or is my version behaving strangely here?)

---

The original had many more libs. One of them was the Connector_Specialized lib that we got rid of before the v5 release. (This is why i am sure that i had this lib in there for quite some time but kicad never complained. Only now with a fully fresh install did it complain.)

The reason i started over was because this is my main project for reviewing library stuff and i really needed it up and running fast. Only after that did i get the idea to report this as a bug. This is why the attached project file is manually made to show the problem i found. Sadly it seems all my other projects are clean. (Only some rescue backups show the problem i had with the original project.)

Revision history for this message
Rene Poeschl (poeschlr) wrote :

Additional info: This project never had a schematic or layout. It was always only used to check footprints and symbols. Sometimes symbols or footprints got placed into the schematic/layout to take screenshots of multiple ones. Especially on the footprint side to check 3d model alignments.

I might have also deleted the schematic file and pcb file multiple times as a fast way to start from a clean slate. (After adding a huge number of assets for screenshots.)

So this project was quite misused and the original problem could stem from that.

But as i wrote above there will for sure be normal ways to get a project into this state (The version control route i detail above is one that came to mind but i am sure there are other routes outside of kicads control that will result in such a project state. The question is: should kicad be able to deal with this or not.)

Changed in kicad:
status: Triaged → In Progress
assignee: nobody → Wayne Stambaugh (stambaughw)
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 8789ab9265fc92c87ff81d768457a86f819f23d9
https://git.launchpad.net/kicad/patch/?id=8789ab9265fc92c87ff81d768457a86f819f23d9

Changed in kicad:
status: In Progress → Fix Committed
Changed in kicad:
milestone: 5.1.4 → 5.1.5
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.