Aliases deletion Error in Symbol Editor

Bug #1810768 reported by Piotr Gałka on 2019-01-07
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
High
Jeff Young

Bug Description

Windows nigtly form 1.1.2019
In Symbol Editor deleting aliases deletes not the intended ones and then KiCad at symbol tree showes aliases before deletion (even after reopening KiCad) but symbol properties window showes only one and not the one I left.

Screenshots in zip:
01 - Exporting Symbol R1005 to new lib: Test.lib
02 - Aliasys list of that symbol in Test.lib
03 - after deleting (using basket symbol) all aliases except 10k
04 - after closing (with OK) Symbol Properties window it showes that only 47 alias was changed (to be saved)
05 - after Ctrl+S
06 - after [-] and [+] at Test lib and opening Symbol Properties
07 - after reopening Symbol Editor
If I close the whole KiCad and then open it and open Symbol Editor I have the same situation - at tree I see 5 aliases, and in Symbol Properties only one and not the one I left (I left 10k, but 47 was left)

I bagan to make these screenshots because I get some Error window during manipulation in aliases list. While trying to repeat it I got into what I described here. But there is also some other bug. Don't know if I will find it once more.

Application: kicad
Version: (6.0.0-rc1-dev-1455-g4b7ef22ec), 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

Piotr Gałka (piotrgalka) wrote :
Piotr Gałka (piotrgalka) wrote :

I think worth of noticing is that I have left the last alias in Symbol Properties dialog box and KiCad left the last in tree list but these are different lasts.

By the way - I spend time ordering libraries in Manage Symbol Libraries to have them in order to help me future work (most often used at the beginning) and it looks my order is then totally ignored :)

Piotr Gałka (piotrgalka) wrote :

I have got once more the Assertion error but then I thought I know the way so once more with screenshots and this time I didn't get it. I tried several times without result. So I have done it once more to finish screenshots (so 01..03 are from first try, and 04..06 from the last but I believe they are right like from one try).

01 - start situation after exporting R1005 from R1 lib to Test lib
02 - after clicking the [+] button
03 - after editing the value
and here is the key moment - now I click at 10k and I am 95% sure that during first try I here got Assert error but during next try I got:
04 - 10k disappears and changes to 6k8 (with description from not named alias)
05 - click at not_named - has a value 6k8
06 - click at 6k8 - has the same value but this time the description as 10k had

Piotr Gałka (piotrgalka) wrote :

I change stategy. If I have error window I just screenshot it.
It is not the error window I have seen before.
This one I get following way:

C1005 had one alias called 100n.
I have deleted that alias, but after OK closing Symbol Properties dialog box the 100n is still in symbol tree.
I clicked at 100n and got window as in attached png.

When I closed KiCad and opened again it looks that 100n is still there but now it is not an alias but KiCad made from it the new symbol.

So I deleted it. And wonted to change 100n_50 (an alias in C1608) to 100n. After I changed the name of alias and closed the window with aliases the 100n_50 was still in tree view and no 100n there.
I saved C lib, closed Symbol Editor and opened it once more. Now I see 100n as alias (OK) and 100n_50 as separate part (surprice).

Jeff Young (jeyjey) wrote :

@Piotr, are you still using the nightly from 1/1? I think this last one was fixed recently.

Piotr Gałka (piotrgalka) wrote :

@Jeff,
I was using 5.0.2 (I am preparing my work-stand so I am in symbol and footprint editor).
I just wonted to check if in 5.1 there will be possible in PCB Export to selectively switch on/off Value and Reference (what will influence my footprint design):
https://bugs.launchpad.net/kicad/+bug/1775206
So 2.01.2019 I installed (at second PC) the last nightly version. As I noticed there interested update in footprint editor (compared to 5.0.2) I decided to install it also at my work PC with plan to use this version till 5.1 release (so - Yes, I still use nightly from 1/1).
When I went to make order in my symbol libraries I noticed what I have written here.
When you write the title of bug report the bug system showes you a list of bugs that can be the same as yours. There were some bugs which titles looked as it could be the same but:
- they all were old ones (may be an year old),
- they all were fixed.
Don't remember if I see there date of fixing, but I assumed that they have to be fixed before 5.0.0 release.
As I didn't noticed any recent bug like mine I assumed that during last few days noone had any reason to work in that area and I didn't checked the last version.
Now I should show myself at home (20:00 here), but tomorrow I will start from installing the last version and checking it.

Piotr Gałka (piotrgalka) wrote :

@Jeff
I have installed todays Windows: kicad-r12117.b0da1e19e-x86_64.exe

May be the aliases behavious was changed but there are certainly still something to change.

Step by step:
1. I have installed KiCad on clear PC (User\UpData\...\kicad deleted).
2. Run KiCad, and opened pic_programmer.pro (copied previously (month ago) to some my dir). It is only because KiCad don't allows to run Symbol Editor if no .pro is opened. I think it should be allowed as I wont to work in my global libraries then no one .pro has nothing to it.
3. Run Symbol Editor. I agree for something it asked (library copying..) and then it has a problem as can't find logic_74xx.lib I am used to see that error so I just accept it.
4. Find in Device.lib the R symbol and riht-click it and Export symbol. I accept the nam: r.lib and put it on my D:\Tmp.
5. Here I'm not sure but probably without reopening Symbol Editor the symbol tree is correctly updated.
6. I find in tree the r libary, extend it to see R in it, select R and opened Edit Symbol Properties from toolbar.
7. In Aliases tab I added 3 aliases: 47 220 1k. Order is important - I tried to get the oposit order to what it gets when alfabetic sorted but I later sow he sortes not absolutelly alfabetic.
8. Close that window by [OK]
9. Ctrl+S to save library changes.
10. Open the Edit Symbol Properties once more - here it is 01.png
11. Click basked two times to delete 47 and 220 aliases - see 02.png
12. 1k left as expected but it has Value 47 !!!
13. After [OK] in that window we see 47 and R to be saved - 03.png
14. Reopening Symbol Properties and I see 47 left (my intention was to left 1k) - 04.png
15. I reopened the Symbol Editor to see if tree is updated, but no.
16. I double clicked 1k (I'm sure) in tree and you see 05.png. In tree the 220 becomed selected, The R got value 220 but in aliases I see this time 1k.

Really I captured screen shots during my second yourney this way (after first I deleted r.lib and remowed it form lib list). During first I think that point 16 I got the error like I showed yesterday.

Piotr Gałka (piotrgalka) wrote :

May be it is important. In point 4. I also accepted my r.lib to be in global library list.

Rene Poeschl (poeschlr) wrote :

Regarding your logic_74xx lib: this one was removed quite some time ago (before the v5 release canditates came out)
So i would guess your library table is quite a bit out of date.

Use the lib manager to clean it up and potentially add libs to it that have been added in the meantime.

---

Regarding the problem documented here, i can recreate it using todays nightly of ubuntu. See attached screencast

Piotr Gałka (piotrgalka) wrote :

@Rene
I don't know if here I can make my post being additionally send to you.

Have you read my point 1?
I have uninstalled KiCad and deleted directory C:\Users\Piotr\AppData\Roaming\kicad then installed last nightly and then see that error.
I see it any time I install KiCad since 5.0 on "clear" PC.
Of course if I install KiCad on my work PC with my library list I don't get that error.

Jeff Young (jeyjey) on 2019-01-10
Changed in kicad:
status: New → Confirmed
assignee: nobody → Jeff Young (jeyjey)
milestone: none → 5.1.0
importance: Undecided → High
Piotr Gałka (piotrgalka) wrote :

I think mixing aliases with "normal" symbols in symbols tree is one, may be the biggest, of the sources of problems.
Me, myself, I would have nothing against if aliases in library tree were showed as next lower level of tree (under symbol they are defined).

Jeff Young (jeyjey) on 2019-01-10
Changed in kicad:
status: Confirmed → In Progress
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Piotr Gałka (piotrgalka) wrote :

I've installed todays kicad-r12136.81a0ab4d7-x86_64.exe and repeated my procedure from #7.

Is it intended behaviour that after deleting 47 and 220 aliases from symbol R the new symbol 47 is added to library with one alias (220)?
I understand that it allows to disconnect aliases from symbol they are in not loosing their description ,....
And it is not big problem to delete this new symbol in library, but it is surprising that after deleting two aliases they still are in library.

I don't understand it as a bug but only as surprising behaviour in some rare used function which from other point of view has some advantages.

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

Other bug subscribers