I am trying to load a schematic made last year in KiCAD 5, in KiCAD 5 still, however am encountering an error on opening:
Error loading schematic file "...".
invalid symbol library definition in input/source
"..."
line 1411, offset 2
Inspecting the file, line 1411, offset 2, is a line calling a fuse device:
EESchema Schematic File Version 5
...
$Comp
L Device:Fuse <-- Line 1411
U 1 1 63417752
P 5150 6200
AR Path="/63417752" Ref="" Part="1"
AR Path="/63417752" Ref="F1" Part="1"
F 0 "F1" V 5347 6200 50 0000 C CNN
F 1 "F100m" V 5256 6200 50 0000 C CNN
F 2 "" V 5080 6200 50 0001 C CNN
F 3 "~" H 5150 6200 50 0001 C CNN
1 5150 6200
0 -1 -1 0
$EndComp
...
$EndSCHEMATC
Making some crude file edits, I can see that if I comment a component (add leading ‘/’ symbols to component lines), the next component turns up with the same error on the equivalent line. Completely removing all components prior to $EndSCHEMATC
, and the file opens albeit with many missing components.
I can’t imagine a Device:Fuse
being problematic, and it almost feels like there is a component limit issue…
Any ideas?
NB: The misspelling in $EndSCHEMATC
does not appear to be a typo on my part.
Further Information:
It appears that anything that isn’t a ground node, power node or label node does not want to show up. When deleting components and successfully opening the file, these are the only objects left. When I edit the file and add a Device:Fuse
, the addition is successful.
Further Information 2:
The issue seems to come from two areas:
- The symbol name not being saved to the
$Comp$
definition and - the same definition having two lines:
AR Path="/634188CD" Ref="" Part="1"
AR Path="/634188CD" Ref="F2" Part="1"
Adding a component name and removing the AR Path directive makes the file openable.
$Comp
L Device:Fuse F2 / Added 'F2' name
... / Eliminate `AR Path` lines
$EndComp
If I have to manually repair the file this will take some time. Is there any good reason why these errors have occurred and how can I avoid them in future?