Global Symbol Library not initialized properly if first project opened is an existing project with project specific libraries

Bug #1809769 reported by drojf
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Wayne Stambaugh

Bug Description

Normally, after you install kicad, and create a new project, then open the schematic editor, you'll get the "Configure Global Symbol Library Table" dialog. This will then initialize your symbol library table to the defaults.

Expected Behavior:

If you open a project with project specific libraries after installing Kicad, and choose to copy default libraries, the Global Symbol Library Table should contain the default libraries.

Actual Behavior:

If you open a project with project specific libraries after installing Kicad, the Global Symbol Library Table will contain the "Project Specific Libraries" from the first project you open. None of default libraries are copied.

If you open a project without project specific libraries, it seems to work OK

EDIT:
I just noticed that the project specific libraries are stored in a file called "sym-lib-table" in the project directory. I managed to reproduce the issue even if there are no project specific libraries in the project, as long as you have a "sym-lib-table" in your project folder containing no entries in it. So I'm guessing Kicad is copying this file and using it as the global defaults.

Reproduction instructions:

- With a working copy of Kicad, create a schematic project which has at least one Project Specific library. I have provided two example projects which cause the problem, just in case it's something to do with my setup specifically. In my examples, the project specific library is located adjacent to the project files (if that makes a difference).

- Delete or rename your 'global libraries' folder to simulate a fresh install of Kicad. I'm on windows, so I delete the folder `C:\Users\drojf\AppData\Roaming\kicad`. (Alternatively, do a fresh install of Kicad on a machine which hasn't ever had Kicad installed.)

- Open the schematic project which was created earlier. This should cause the 'Configure Global Symbol Library Table' dialog to pop up. Choose the default option, "Copy default global symbol library table (recommended)".

- Now if you check the "Global Libraries", it will contain the "Project Specific Libraries" from the project you just opened, instead of the "default" Global Libraries. The global libraries will remain this way, even after closing and opening Kicad again or making a new project.

NOTE: I delete the 'global libraries' folder to simulate having installed Kicad from scratch, but I've seen it happen numerous times before when installing Kicad the first time 'for real'.

I remember this happening in previous Kicad versions, I don't think it was introduced in this particular build of Kicad.

Version Information:

Application: kicad
Version: (5.0.2)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
drojf (drojfjord) wrote :
description: updated
Revision history for this message
drojf (drojfjord) wrote :

These are the example projects which cause the problem. Somehow the attachments didn't add.

description: updated
drojf (drojfjord)
description: updated
Changed in kicad:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Wayne Stambaugh (stambaughw)
milestone: none → 5.1.0
status: Triaged → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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