Edit symbol field problem 2

v
Hi everyone, I’ve been using KiCad and Altium for a long time but I’m new to the forum as this is the first time that, after hours of research, I can’t solve the problem.!

Last night, while everything was working fine, I left my pc with kicad open and probably something unsaved.
I put the pc in suspension but I noticed that there was a windows update notification and this morning I found the PC restarted without the notification anymore. I hate windows and its damn updates!

The problem: on the symbol fields section the values of “Value”, “Footprint” and “Datasheet” have disappeared:
IMG1
Even if on the individual components there are still these values correctly in the fields:
IMG2

Now, if in the symbol fields editor, I add any value on one of the 3 fields mentioned above, for example “Value”…
IMG3
…I get in the component a duplicate of “Value” but with the new value inserted:
IMG4

I seem to have understood that these fields have a unique id logic, but how did it happen that the references between the symbol properties and those in the symbol fields editor were lost?
Did I do something wrong?
Did I change any settings unintentionally?
Or maybe as others suppose, is it a problem with the interface language change? (in fact I had set Italian previously and I set English to try to solve the problem)

Thanks for your help

@Olo Since I saw that you originally encountered the problem, did you finally find a solution?

With the information provided, my guess is that you have missused the Value field. The field obviously states “Value”, but that is NOT what it actually is. The Value field is actually the Symbol name field, as can be seen by the screen grabs I’ve provided above.

My workaround is to use a field named “Value_n”. It should also be noted that added fields, can not be left blank; especially the last added field. Added fields that are left blank will be removed after the symbol is saved.

Deleted by mod. Off topic and we WILL get complaints so I was proactive. :wink:

/ Rant.


About those duplicated symbol fields (“Value”, “Datasheet”, “Footprint” all appear twice), Here is a thread from Leloup, who had the same issue a few months ago.

Do you have a link to a reference that @Olo also encountered this? I looked through his 21 posts, but did not spot it.

This may be worth a bug report on gitlab.

I don’t agree with “misuse” in:

For the schematic symbol libraries there is (or used to be) a requirement that the “Value” field to be set to the same text string as the symbol name. I regularly use strings such as “3k3” for a 3300 Ohm resistor (Even the integrated ngSpice seems to accept it properly). Using the “Value” field with a text string such as “1A 1000V” seems a perfectly normal use of this attribute.

Take a second look at the last screen grab that was posted by the OP.

The Diode SM4002PL, per the datasheet entry, has 2 (two) Value entries. One entry is 1A - 1000V, and the second entry is 111.

Bad things happened when I tried to duplicate the Value field in the past.

The fact is that I have not deliberately duplicated the “Value” field, simply, after a restart, I found the list of symbol fields empty, which until before was perfectly filled with the same values as I have in the fields of the individual components.
The problem is not only that the list has been emptied, that it would be enough for me to fill it again, the real problem is that if I do it, in the component fields, a new “Value” field appears with the new value that I entered through the symbol fields list.
Finding myself at the end with a double “Value” field of which only the last added is linked to the list of component fields.

In any case, thank you for the quick reply! :slightly_smiling_face:

So there are two issues here.

One issue is that apparently there is a bug in KiCad which causes those fields to be duplicated. Both Leloup’s (recent) and Olo’s (quite long ago) problems seem to have started by a language change (French and Polish) while your problems seem to have started by not saving and closing KiCad normally during a windows reboot.

If I had seen this a month ago, I would try to investigate further, and probably make (or at least search for) a bug report on gitlab, but at the moment I’m troubled again with concentration problems. It does seem worth it to make a bug report for this in my opinion.

The other issue is that you’re having troubles because of the corrupted file and duplicated fields (I never assumed you duplicated those fields yourself) and how to repair it so you can continue.

I have a habit of making a backup on each day I’ve done some significant work on a project. If you have such a backup, then I recommend to revert to that backup, and open a second instance of KiCad and then merge the changes you made in the now corrupt file into that backup and continue from there.

If you do not have a backup, then make one now to prevent further escalation of the problem, and then open the schematic in a text editor to see what it looks like (All of KiCad’s files are in readable ascii format). If the lines with the “111”, “222”, “333” are the added lines, then you can simply delete those lines (use the search function of your text editor). If however there is a more complicated mix up, such as the right values ended up in the duplicated added fields, and the original fields are corrupted, then it’s more work to repair.

With a bit of luck there is a “[project].sch-bak” file in your project. This is a simple copy of the schematic with the “-bak” added, and you can remove those last 4 letters from the filename and open it as a normal schematic. That file may have been overwritten if you saved the corrupt version after the fact though.

Fortunately, I have structured my work to make sure that MEGA keeps my projects folder synchronized with the one on the cloud, so I have the versioning of the files that I can always recover! :wink:

In fact, what I did was retrieve the .sch file from the night before (I have saved this file in a subfolder inside the project folder [NX_DPSU]\Backup\20210818_autosave-NX_DPSU.sch), I opened it and in fact there was my beautiful table of symbol fields filled as I had left it:

After that I thought I could copy all the missing “Value”, “Footprint” and “Datasheet” values in the next day’s symbol fields table.
I was obviously afraid it wouldn’t be useful because by pasting, I would write the values to the duplicate field of those “Value”, “Footprint” and “Datasheet” fields (as had happened by writing “111” in the “Value” field, and then finding those two “Value” fields in the symbol fields editor), but… unexpectedly, when I opened the broken .sch file, magically, when I then opened the symbol fields list, it was full without pasting anything!

With the text editor I tried to figure out if there was something wrong, but I didn’t notice anything.
Now, I think I have restored the situation, but what happened is really strange.

Restoring a backup is usually a better option indeed, compared to messin’ around with a text editor to try to fix the bugs and save your work.

When some behavior is the result of a bug or a program misbehaving, there usually is not much logic in the result, and it’s futile to try to find it.
The most use for trying to analyze anything about such a situation is for finding and fixing the bug, or to save and repair your damaged work

Do you still have the faulty file and are you willing to share your project with some of the developers, and spend some time in making a bug report on gitlab?

Spending some time on making a good bug report is one of the ways in which you can contribute to make the Free KiCad even better.

At the moment I’m a bit in dubio though.
Development effort is going into making KiCad-nightly V5.99 stable and release it as KiCad V6. It is unsure if there wil ever be a KiCad V5.1.11 which could have this bug fixed.

The schematics format for KiCad V6 has also completely changed. It’s now based on S-expressions with Lots of Superfluous Parentheses, just as in Lisp. This probably means that this bug won’t be in KiCad V6 anyway.

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