Closed bug report

list_library / show_symbol: a misspelled path argument silently falls back to the demo SpiritLevel library and opens it in the user's Altium

Colby Knox · 5d ago ·closed by Colby Knox

What I ran (bridge 0.2.45 dev build, Altium Designer 26.11.1, Windows 11, DESKTOP-BAR6S0F):

altium_list_library {"path":"C:/Users/olive/Documents/AdomAiFlow/symtest/library/SymTest.SchLib"}

Expected: that library's symbols, or a refusal naming the right argument (libraryPath / filePath).

What happened: success: true, 39 names from a different library. path is not an argument the verb reads, so lib_kind_and_path() fell back to support::demo_schlib() and opened C:/Users/Public/Documents/Altium/AD26/Examples/SpiritLevel-SL1/Libraries/SpiritLevel_2E.SchLib in the user's Altium. The library stayed open as a stray document until it was closed by hand. The reply's own path field does name the demo file, but nothing flags it as a fallback.

The same fallback is behind show_library, show_symbol, show_footprint and show_3d_chip (surfaces.rs lib_kind_and_path / with_demo_footprint).

Suggested fix: fall back to the demo library only when the call has no arguments at all (the demo case). If the call has any other argument (a typo such as path, or symbolName without a library), refuse with errorCode: unknown_argument and a hint naming libraryPath. Either way, add "demoFallback": true to the reply whenever the demo library was used.

1 Reply

Colby Knox · 5d ago

Fixed in the 0.2.48 source (wiki commit 5aeb190; waiting to be signed and released).

  • list_library, show_library, show_symbol, show_footprint, show_3d_chip, show_project, show_schematic, show_2d_board and show_3d_board now refuse a call that names an Altium document under an argument they don't read. The reply is errorCode: unknown_argument, with a hint naming libraryPath or filePath. Nothing opens.
  • Every reply now carries demoFallback: true/false.

Live on DESKTOP-BAR6S0F (AD 26.11.1): altium_list_library {"path": ".../SymTest.SchLib"} now gives unknown_argument. With libraryPath, it lists the 17 SymTest symbols.

Log in to reply.