EEschema: Losing custom symbols in Nightly

Bug #1816312 reported by Barry Buelow on 2019-02-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Undecided
Unassigned

Bug Description

FYI - I have an oddly number/lettered connector and have made a couple of custom symbols. They were placed in the schematic ok. The next day, they are gone as the schematic shows a block with "??"

I've no clue what is going on, but will try another Nightly a few days newer. Reporting this may help if others see funny things with symbols.

Application: kicad
Version: (5.1.0-rc1-11-g076499f3a), 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 7 (build 7601, Service Pack 1), 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_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

Rene Poeschl (poeschlr) wrote :

Did you somehow consciously touch the project_name-cache.lib? Does that file exist in the project directory? Did kicad ask for rescuing the symbol(s) in question when you opened the schematic?

The cache lib should ensure that the symbols do not vanish or change no matter what happens to the library. (It should ensure that you do not get question marks even if the symbols somehow vanished. So this might be a second bug that would be even worse than kicad somehow not correctly saving custom symbols.)

---

Regarding your symbols vanishing: Are they in a personal library of yours or did you add them to a system library?

If it is a personal lib:
Does the file still exist in the file system? Is it in the library table? Does it contain your symbols? (open it with the symbol editor and check)

If it is a system lib:
Placing personal symbols in a system library is asking for trouble. The next update to the libraries will delete your personal stuff in that case (Most installers offer not to update libraries but that really relies on you remembering to never update the lib.)
You might want to take a look at my library management tutorial for hints on how a well made setup could look like: https://forum.kicad.info/t/library-management-in-kicad-version-5/14636

On 2/18/2019 5:54 AM, Rene Poeschl wrote:
> Did you somehow consciously touch the project_name-cache.lib?

No I did not touch the cache.lib

> Does that file exist in the project directory?

Unfortunately I have destroyed the evidence by recreating the 2
components I lost.

> Did kicad ask for rescuing the symbol(s) in question when you opened the schematic?

No there was no Rescue prompt?

>
> The cache lib should ensure that the symbols do not vanish or change no
> matter what happens to the library. (It should ensure that you do not
> get question marks even if the symbols somehow vanished. So this might
> be a second bug that would be even worse than kicad somehow not
> correctly saving custom symbols.)

I was unaware of the value of cache.lib

> ---
>
> Regarding your symbols vanishing: Are they in a personal library of
> yours or did you add them to a system library?

Symbols were in my custom Lib.  I did open the file with a text editor
and the symbols were gone.

>
> If it is a personal lib:
> Does the file still exist in the file system? Is it in the library table? Does it contain your symbols? (open it with the symbol editor and check)

The personal lib does exist and was only missing those 2 symbols.

>
> If it is a system lib:
> Placing personal symbols in a system library is asking for trouble. The next update to the libraries will delete your personal stuff in that case (Most installers offer not to update libraries but that really relies on you remembering to never update the lib.)

No I've not changed or added to any of the system libs.

> You might want to take a look at my library management tutorial for hints on how a well made setup could look like: https://forum.kicad.info/t/library-management-in-kicad-version-5/14636
>
I recognize that the mostly likely event was that I did something wrong
or stupid, but I had created the symbols days ago and was actively
working on the schematic. It was quite odd that they disappeared days
later.  The next time something odd happens, I'll try to copy off all
the files so I can examine them.

Also, do you plan to attend KiCon in Chicago?  I will be there and will
be speaking. Thank you for all your efforts to support KiCad.

Barry

Seth Hillbrand (sethh) wrote :

Hi Barry- Thanks for following up. I'm going to set this to incomplete so that it times out if the issue doesn't recur. If it does, please report here and we'll reset the status.

I look forward to hearing your talk at KiCon

Changed in kicad:
status: New → Incomplete
Rene Poeschl (poeschlr) wrote :

When opening the file with a text editor, did you perhabs do that while kicad was still open? Some text editors do not detect changes to files if they happen externally. (Meaning if you have the file open and then save from kicad you might not see the changes. Saving from the text editor after this will then seemingly delete the sybols.)

The other way round would also be a possibility. Adding something with a text editor to a lib while kicad is running might mean that kicad misses the changes to the files. (There are only certain actions that trigger a reparsing of the library files.) Again saving from kicad would then put the lib back to the stat as it was when it got parsed (probably with the state from the time when you opened the library editor.)

Barry Buelow (iabarry) wrote :

I don't think I was editing the file at all during this time.

Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers