Bug with -cache.lib in V5.1.10?

Today I opened the SON8 test project posted by piotr:

This project opens without problems:
image

However, if I then add a wire (just to be able to enable the save dialog) and save it, I get this error:
image

This project has a SON8-cache.lib.
After saving (and a redraw triggered by for example zoom in/out) both symbols are gone:
image

The size of the SON8-cache.lib is then also reduced from the original 897bytes to just 60 bytes.

The original link of the HVD72DRB schematic symbol is from a IcInOut library, which I obviously do not have.

Opening the project for the first time does not trigger the “rescue” mechanism, I assume this is because the symbol is found in the SON8-cache.lib.

To me it looks like a bug during saving of schematics with symbols that only exist in the [project]-cache.lib.
Is this correct, or am I missing something here?

The rescue dialog should have been triggered, as you do not have the library that contains the original symbol.

The cache lib does only come into play once the rescue decision was made as it is then taken as the backup source for the symbol data such that it can be put into the rescue lib.

So something in that project resulted in the rescue dialog being suppressed. I am not certain if there is a connection to the later fault regarding it being unable to update the cache lib.


I no longer have access to a version 5 of kicad so i can not really play around with the project myself.

If this was true, then the original HVD720DRB could not have been shown in Eeschema in the first place. It must have been taken from the [project]-cache.lib file.
A guess for what may have happened is that the rescue is triggered silently in the background, but the [project]-rescue.lib is not created.

Before I make a bug report I would like a confirmation that it’s not just a quirk of my setup. Anyone interested in a small test?

  1. Download the SON8.zip project linked above.
  2. Extract & open it in KiCad V5.
  3. Change something in the schematic. Save it.
  4. Do the dreaded [??] symbols appear?

The rescue dialog opened.
Aknowledging it and save.
Add a wire, and save again.
Close KiCad, open again, everything is o.k.
Add some more wires, o.k…
SON8-rescue.lib, sym-lib-table changed upon saving the first time, SON8-rescue.dcm added.
SON8.sch-bak, SON8-cache.lib, SON8.sch changed after second saving.

Application: Eeschema
Version: (5.1.10)-1, release build
Libraries:
    wxWidgets 3.0.5
    libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.73.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.71.0
    Compiler: GCC 10.2.0 with C++ ABI 1014

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

The rescue dialog appeared for me too

Can it be that you clicked on the “Never show again” button? I am not sure if the settings is effective per project or for all projects.

Closing and opening the project again worked as expected.

Application: KiCad
Version: (5.1.10)-1, release build
Libraries:
    wxWidgets 3.0.5
    libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.73.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.71.0
    Compiler: GCC 10.2.0 with C++ ABI 1014

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

Thank you very much der.ule.
After a delete and re-unzip to get a fresh copy I was able to re-trigger the rescue dialog with Eeschema / Tools / Rescue Symbols … and the button for Never Show Again was simply missing, so I went hunting for a way to re-enable that button.

I could not find a way to do this in any menu.
So finally I did a grep in KiCad’s configuration directory:

paul@medion:~/.config/kicad$ grep -i "rescue" *
grep: 3d: Is a directory
grep: 5.99: Is a directory
eeschema:RescueNeverShow=1
eeschema_Rick:RescueNeverShow=1
pcbnew:Color4DPCBLayer_Rescue=rgb(132, 0, 0)
pcbnew:ModEditColor4DPCBLayer_Rescue=rgb(132, 0, 0)
grep: sym-lib-table-backups: Is a directory

And there I reset the “RescueNeverShow” variables in both files to 0, extracted a fresh copy of the SON8 project and started KiCad again.
The Rescue process now works as expected again.
The old behavior was as if [Cancel] was pressed during the rescue process.

I do find it strange that the HVD72DRB symbol gets removed from the [project]-cache.lib file though. The [project]-cache.lib should cache all symbols, especially the ones that are not in other libraries.

I have never got understanding how cache.lib works. I just delete it any time I look into project directory with file manager (to send that project I made exception).
That way I am sure that I don’t have in my project any ‘old’ (not existing in my libraries) symbol. I hope that such ‘action’ will be possible in V6 where as I heard cache will be integrated into schematic file (I don’t have Win10 and didn’t installed Linux ever so I didn’t sow V6 yet).

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