Verified by live test: created a fresh schematic via MCP, result shows
format version 20250114, 0 _TEMPLATE_ hits, 0 (lib_id -100) hits, 24
real components placed cleanly.
--- Format version bump (20230121 KiCAD 7 -> 20250114 KiCAD 9) ---
Files: python/templates/*.kicad_sch, python/commands/project.py,
python/commands/schematic.py
Root cause: the MCP server targets KiCAD 9 exclusively - pcbnew.pyd is
compiled for KiCAD 9.0 / Python 3.11.5, and server.ts explicitly selects
the KiCAD 9 bundled Python on Windows. Generating new schematics with a
2-year-old format tag caused a spurious 'This file was created with an
older KiCAD version' warning on every newly created schematic.
--- Remove corrupt _TEMPLATE_* placed-symbol blocks ---
File: python/templates/template_with_symbols_expanded.kicad_sch
Root cause: the expanded template was generated by the old sexpdata
serializer (same corruption PR #40 fixed for DynamicSymbolLoader add-path).
The serializer converted the string 'Device:R' to integer -100, producing
(lib_id -100) instead of (lib_id Device:R). KiCAD cannot resolve an
integer as a library reference and crashes with a null-pointer when the
user attempts to select these symbols. They appeared as grey _TEMPLATE_R?,
_TEMPLATE_C?, _TEMPLATE_U_REG? etc. ~5000mm off-sheet - invisible during
normal work but triggering a crash on accidental box-select.
Discovered via live testing on a real JLCPCB/KiCAD 9 project.
195 lines
6.2 KiB
Plaintext
195 lines
6.2 KiB
Plaintext
(kicad_sch (version 20250114) (generator "KiCAD-MCP-Server")
|
|
|
|
(uuid a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d)
|
|
|
|
(paper "A4")
|
|
|
|
(lib_symbols
|
|
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes)
|
|
(property "Reference" "R" (at 2.032 0 90)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Value" "R" (at 0 0 90)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Footprint" "" (at -1.778 0 90)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at 0 0 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(symbol "R_0_1"
|
|
(rectangle (start -1.016 -2.54) (end 1.016 2.54)
|
|
(stroke (width 0.254) (type default))
|
|
(fill (type none))
|
|
)
|
|
)
|
|
(symbol "R_1_1"
|
|
(pin passive line (at 0 3.81 270) (length 1.27)
|
|
(name "~" (effects (font (size 1.27 1.27))))
|
|
(number "1" (effects (font (size 1.27 1.27))))
|
|
)
|
|
(pin passive line (at 0 -3.81 90) (length 1.27)
|
|
(name "~" (effects (font (size 1.27 1.27))))
|
|
(number "2" (effects (font (size 1.27 1.27))))
|
|
)
|
|
)
|
|
)
|
|
(symbol "Device:C" (pin_numbers hide) (pin_names (offset 0.254)) (in_bom yes) (on_board yes)
|
|
(property "Reference" "C" (at 0.635 2.54 0)
|
|
(effects (font (size 1.27 1.27)) (justify left))
|
|
)
|
|
(property "Value" "C" (at 0.635 -2.54 0)
|
|
(effects (font (size 1.27 1.27)) (justify left))
|
|
)
|
|
(property "Footprint" "" (at 0.9652 -3.81 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at 0 0 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(symbol "C_0_1"
|
|
(polyline
|
|
(pts
|
|
(xy -2.032 -0.762)
|
|
(xy 2.032 -0.762)
|
|
)
|
|
(stroke (width 0.508) (type default))
|
|
(fill (type none))
|
|
)
|
|
(polyline
|
|
(pts
|
|
(xy -2.032 0.762)
|
|
(xy 2.032 0.762)
|
|
)
|
|
(stroke (width 0.508) (type default))
|
|
(fill (type none))
|
|
)
|
|
)
|
|
(symbol "C_1_1"
|
|
(pin passive line (at 0 3.81 270) (length 2.794)
|
|
(name "~" (effects (font (size 1.27 1.27))))
|
|
(number "1" (effects (font (size 1.27 1.27))))
|
|
)
|
|
(pin passive line (at 0 -3.81 90) (length 2.794)
|
|
(name "~" (effects (font (size 1.27 1.27))))
|
|
(number "2" (effects (font (size 1.27 1.27))))
|
|
)
|
|
)
|
|
)
|
|
(symbol "Device:LED" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes)
|
|
(property "Reference" "D" (at 0 2.54 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Value" "LED" (at 0 -2.54 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Footprint" "" (at 0 0 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at 0 0 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(symbol "LED_0_1"
|
|
(polyline
|
|
(pts
|
|
(xy -1.27 -1.27)
|
|
(xy -1.27 1.27)
|
|
)
|
|
(stroke (width 0.254) (type default))
|
|
(fill (type none))
|
|
)
|
|
(polyline
|
|
(pts
|
|
(xy -1.27 0)
|
|
(xy 1.27 0)
|
|
)
|
|
(stroke (width 0) (type default))
|
|
(fill (type none))
|
|
)
|
|
(polyline
|
|
(pts
|
|
(xy 1.27 -1.27)
|
|
(xy 1.27 1.27)
|
|
(xy -1.27 0)
|
|
(xy 1.27 -1.27)
|
|
)
|
|
(stroke (width 0.254) (type default))
|
|
(fill (type none))
|
|
)
|
|
)
|
|
(symbol "LED_1_1"
|
|
(pin passive line (at -3.81 0 0) (length 2.54)
|
|
(name "K" (effects (font (size 1.27 1.27))))
|
|
(number "1" (effects (font (size 1.27 1.27))))
|
|
)
|
|
(pin passive line (at 3.81 0 180) (length 2.54)
|
|
(name "A" (effects (font (size 1.27 1.27))))
|
|
(number "2" (effects (font (size 1.27 1.27))))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(symbol (lib_id "Device:R") (at -10000 -10000 0) (unit 1)
|
|
(in_bom no) (on_board no) (dnp yes)
|
|
(uuid 00000000-0000-0000-0000-000000000001)
|
|
(property "Reference" "_TEMPLATE_R" (at -100 -102.54 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Value" "R_TEMPLATE" (at -100 -100 90)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Footprint" "" (at -100 -100 90)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at -10000 -10000 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(pin "1" (uuid 00000000-0000-0000-0000-000000000010))
|
|
(pin "2" (uuid 00000000-0000-0000-0000-000000000011))
|
|
)
|
|
|
|
(symbol (lib_id "Device:C") (at -10000 -10000 0) (unit 1)
|
|
(in_bom no) (on_board no) (dnp yes)
|
|
(uuid 00000000-0000-0000-0000-000000000002)
|
|
(property "Reference" "_TEMPLATE_C" (at -100 -107.46 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Value" "C_TEMPLATE" (at -100 -112.54 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Footprint" "" (at -10000 -10000 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at -10000 -10000 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(pin "1" (uuid 00000000-0000-0000-0000-000000000020))
|
|
(pin "2" (uuid 00000000-0000-0000-0000-000000000021))
|
|
)
|
|
|
|
(symbol (lib_id "Device:LED") (at -10000 -10000 0) (unit 1)
|
|
(in_bom no) (on_board no) (dnp yes)
|
|
(uuid 00000000-0000-0000-0000-000000000003)
|
|
(property "Reference" "_TEMPLATE_D" (at -100 -117.46 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Value" "LED_TEMPLATE" (at -100 -122.54 0)
|
|
(effects (font (size 1.27 1.27)))
|
|
)
|
|
(property "Footprint" "" (at -10000 -10000 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(property "Datasheet" "~" (at -10000 -10000 0)
|
|
(effects (font (size 1.27 1.27)) hide)
|
|
)
|
|
(pin "1" (uuid 00000000-0000-0000-0000-000000000030))
|
|
(pin "2" (uuid 00000000-0000-0000-0000-000000000031))
|
|
)
|
|
|
|
(sheet_instances
|
|
(path "/" (page "1"))
|
|
)
|
|
)
|