Altium - the Altium Bridge
Public Made by Adomby adom
Adom Bridge for Altium Designer: a resident DelphiScript agent gives the AI eval, the 1,100-command process launcher, all 8 EDA surfaces with screenshots, compile/ERC, DRC, OutJob outputs, native SchLib/PcbLib authoring with STEP 3D bodies, and dialog handling by PID.
Altium close hard-freezes the desktop when a resident agent is loaded and bridge-opened Free Documents are still open
Summary
Closing Altium (user pressed the window X) while an Adom bridge resident agent was loaded AND two bridge-opened Free Documents were still open sent Altium into a hung shutdown that HARD-FROZE the whole Windows desktop: the taskbar stopped accepting clicks, and Ctrl+Alt+Del itself did not respond. The only recovery was terminating X2.EXE (Task Manager on the user side, and altium_close force+acceptSeatLoss from the bridge converged on the same kill). A bridge must never be able to leave the host in a state that freezes the machine, so filing at priority.
Environment
- altium-bridge 0.2.3 (auto-updated to 0.2.4 mid-incident on the next spawn).
- Altium Designer Develop (ADDevelop), X2.EXE 26.9.1.9, single On-Demand seat, licensed.
- Windows host, 3 monitors.
What led up to it (repro path)
- altium_launch (cold start), then altium_agent_start (resident DelphiScript agent; it runs Client.StartServer('PCB')+('SCH') to register the scripting API).
- Installed a Cloud Library bundle via altium_install_library_bundle, then opened the staged raw files with altium_show_library / altium_show_symbol / altium_show_footprint on UI.SchLib and UI.PcbLib. These open as Free Documents.
- The two library tabs were left OPEN (unsaved Free Documents).
- The user pressed the Altium window X to close the app.
- Altium hung during shutdown. Desktop hard-froze: taskbar clicks dead, Ctrl+Alt+Del dead. alt-tab still cycled windows (keyboard) but no click landed.
What the bridge observed during the freeze
- altium_status: running=true, agentAlive=false (agent died = mid-shutdown), dialogs=[].
- altium_check_dialogs: dialogsDetected=0 ("No Altium dialogs open").
- desktop_list_windows AND desktop_enum_windows: BOTH returned 0 windows (the desktop session's window enumeration was not returning during the freeze).
- desktop_screenshot_screen: first attempt hung past 60s; a later attempt captured and showed no Altium window and no visible save dialog, yet X2.EXE (pid 2852) was still alive.
- altium_close (polite WM_CLOSE): "still running, a modal may be blocking WM_CLOSE" while altium_check_dialogs reported none, so the blocker was not visible to the dialog scan.
- altium_close force:true was refused ("strands the licence seat"); force:true + acceptSeatLoss:true succeeded and X2.EXE terminated, releasing the freeze.
Likely mechanism (for triage, not asserted as certain)
The resident agent keeps PCB/SCH scripting servers loaded inside X2.EXE. On an app close with those servers up (and/or an unsaved-document save prompt in play), shutdown wedged. The hard nature of the freeze (Ctrl+Alt+Del unresponsive) may also involve the Develop build's shutdown or a DirectX/GPU hang, which the bridge cannot see. The window enumeration returning 0 during the freeze is itself a signal the UI/session thread was stuck.
Asks
- On any Altium close (user-initiated or verb), the bridge should FIRST tear down its resident agent and stop the servers it started, and close the documents IT opened (without saving), so its own state cannot wedge Altium's shutdown.
- altium_close should have a path that recovers a hung shutdown WITHOUT stranding the seat where possible (e.g. dismiss the save prompt / answer "No" for bridge-opened Free Documents, then let the graceful close release the seat).
- When the dialog scan reports none but WM_CLOSE says a modal is blocking, the bridge should surface the actual blocking hwnd (desktop_enum_windows returned 0 here, so even the unfiltered enumeration could not see it during the freeze).
Secondary (lower priority, same session)
- altium_show_symbol / altium_show_library: the lower "Model" panel shows a STALE footprint that does not refresh between calls (showed TSSOP-28 for a part linked to SOT-223-6; the .SchLib file link was correct, verified independently). A driver relying on that panel would misread the linkage.