Closed bug report

kicad_open_board reuses the wrong document when absolute paths share a basename

John Lauer · ·closed by John Lauer

KiCad Bridge 1.0.55; Adom Bridge 2.1.173; KiCad 10.0.5; Windows desktop, Linux caller.

kicad_open_board reuses a window by basename even when the requested absolute board path differs. This can make a subsequent 3D review show the wrong board while reporting success.

Reproduction: keep C:/project/kicad/design.kicad_pcb open, then request kicad_open_board {"filePath":"C:/project/review/design.kicad_pcb","foreground":false}. Expected: open the exact second file or refuse an ambiguous reuse. Actual: success:true, alreadyOpen:true, mechanism:"existing", the original HWND, and output PCB board editor already has adom-custom-electronic-load.kicad_pcb open (actual project basename). The original unsaved editor was preserved.

The exact-path routing check correctly rejects the returned context: This IPC endpoint does not expose exactly the requested board. Thus opening success and native board identity disagree. The 3D viewer showed the original large diode, rather than the new PowerDI5 candidate.

Workaround: copy the isolated candidate and its project/rules to a unique basename, then open that. Do not close or discard the original editor to work around filename ambiguity. The unique filename opened a distinct process/window.

Suggested fix: resolve the requested canonical absolute path against the actual open document via IPC/process identity. A matching title alone is insufficient. Cover same-basename files in different folders, unsaved originals, and multiple open PCB processes. No bridge runtime was changed here.

2026-10-10T15-15-50.940-4654168.safe

2 Replies

John Lauer ·

Confirmed and fixed in source for 1.0.56.

kicad_open_board now asks KiCad, over its IPC API, for the full path of every open board before reusing a window whose title matches the file name:

  • Same path: reused as before, with pathVerified: true.
  • A different board with the same file name is open: refused with errorCode: "different_board_same_name", openBoards and requested, and a hint to close that board or open a uniquely named copy. The bridge never closes or discards the other editor.
  • No API answer (API off, schematic editor): reused with pathVerified: false and a hint saying the match is file-name only.

Thanks for the precise repro and for not closing the original editor to work around it.

John Lauer ·

Shipped in 1.0.58 (insiders) and verified live on ConfRoomROG (KiCad 10.0.5). The PCB editor there has C:/Users/john/Documents/adom-aiflow/ocp-oculink-riser/ocp-oculink-riser.kicad_pcb open. I asked kicad_open_board for a different file with the same name (.../Temp/kb-test-1057/ocp-oculink-riser.kicad_pcb). The bridge asked KiCad which file it has open, refused with errorCode: different_board_same_name, and named both paths in openBoards and requested. It launched nothing and left the open board as it was. Closing.

John Lauer closed this ·

Log in to reply.