5.0.2 Schematic remap bug?


#1

I’ve recently upgraded from 4.0.7, still only few of my projects have been “remapped” to new 5.0.2 library system.
Today I’ve noticed a strange issue: attempted to open “virgin” 4.0.7 schematic (i.e. not previously migrated to 5.0.2). Standard “Remap” dialog kicked-in. Remap feature found proper symbols in my libraries, and schematic opened properly - so far, so good.
Problems started when I closed schematic WITHOUT saving it.
Now when I attempted to open it again, the “Remap” dialog kicks-in (OK, if I did not saved the updated files…), but this time the Remap feature does not find my Symbols and “Rescues” them instead! Seems like a bug to me. Or I’m doing something wrong?
If I recover original 4.0.7 project from my backup, it works fine (does a proper remap), but if I don’t save the schematic after automatic remap, the problem strikes again (so I can easily reproduce the bug).
Is it fixed in the 5.1 candidate?


#2

One thing i noticed is that kicad creates a project symbol library table even if you do not save after remap. Maybe this is the reason it does not work out for you. (Try to delete the symbol library table that got created and check if remap works then.)


#3

Where should I look for the library table? The only file which have been “tampered” by KiCad’s rempap is the *.pro file (remaining files keep their original file system timestamps).


#4

In the project directory there might be a sym-lib-table file created after remap.

Also there should be a backup folder that should contain all the original files.


#5

OK, so the culprit is the *.pro file itself.
After first Remap, the whole “[eeschema/libraries]” section is removed from the project file which prevents it from locating proper libraries during the second run.
This means, the process is inconistent and when interrupted may lead to problematic state. Fortunately the workaround seems simple (just recover the *.pro file from the rescue-backup folder).


#6

Does the 5.1.0 rc behave the same way?


#7

I hope not, but I’m not sure if the this was ever filed as bug report.


#8

Is this not what the text says when starting the re-map process? Is there a better way to word it?


#9

Not in my opnion. There’s just note what will happen if you skip automatic remapping (OK - if I cancel the remap, I will have to remap manually and that’s fine).
If things should be left as they are (not recommended, since I’m sure more users will fall into that pitfall) there should be an explit note that it’s crucial to save the schematic right after remap will be done, to complete the changes, and that’s the only chance to have the project “openable” without hassle.
So instead of the library table mumbo-jumbo, there should be minimal and precise info on how to proceed. Even better, after completed remap there should be a dialog asking the user if updated files should be saved, otherwise risking manual symbol remapping.
Other (IMO better) solution would be to make any permanent changes to the files only after the user will save the schematic file (so unless the user will consciously save remapped files, no changes to the original project files will be done).