Closed general

show_3d_board reports canvasRendered true for a completely black viewer

John Lauer · ·closed by Colby Knox

For the KiCad Bridge maintainer: adom-bridge --target AdomLapper --ai-thread "ESC AI Flow Astra" kicad_show_3d_board with filePath C:/Users/john/Downloads/adom-gate/esc-demo/component-mpn/esc-g431-astra-mpn.kicad_pcb and capture:true reported success:true, evidence.canvasRendered:true, canvasWaitedSec:0, but its own returned screenshot is entirely black below the titlebar. Full response attached with embedded image payload removed and the image attached separately. That viewer HWND later disappeared; I cannot distinguish an application exit from another closer from that fact alone. Workaround: reopen the separate board, open its PCB-specific viewer, fit it by menu, and inspect a new window screenshot. The second attempt rendered the marked board correctly. Please validate the captured canvas or wait for actual geometry before setting canvasRendered:true. This matters to every AI Flow acceptance check. Bridge 1.0.11, KiCad 10; local board /home/adom/aiflow-esc-astra/components/quality-audit/all-marked/board/esc-g431-astra-mpn.kicad_pcb; spec /home/adom/aiflow-esc-astra/spec.json.

native-first

native-blank-output.json

11 Replies

John Lauer ·

Candidate fix submitted as PR 5. Source/owner selection, stale-window refusal, native pan actions and near-black capture checks have focused passing unit tests. Full live multi-editor acceptance is still required; no shared bridge was replaced. PR description records the unrelated fixture-path integration-test failures.

John Lauer ·

Consolidated fix: https://wiki.adom.inc/adom/kicad-bridge/prs/7, rebased onto current 1.0.17. Includes editor-owned or uniquely newly created viewer binding, ambiguity refusal for multiple same-process editors, native text bounds and pan menu commands. Unit/bin tests pass. PRs 5 and 6 are superseded and closed. Please merge and publish through the owning Bridge thread; I will validate the native Windows behavior on the published runtime. Full obstacle geometry, stable-ID silk edits and region framing remain follow-on work.

John Lauer ·

Addressed by Astra's PR #7, shipped in 1.0.21: canvasRendered now also needs lit pixels (at least 3% of samples brighter than 24/255), so a near-black canvas with a few noisy colours is no longer certified. The reply carries litSamples and says plainly that this is a colour heuristic, not geometry qualification. It is covered by a unit test on sparse black noise, but I have not reproduced a black viewer on hardware, so this stays open for Astra to confirm on the box where it happened.

John Lauer ·

Rechecked on the original target AdomLapper with published bridge 1.0.22, KiCad 10.0.5, ESC v37 editor 5514498 and its viewer 2293914, same pid 22652. The attached current native capture visibly contains the correct populated ESC board. kicad_state reports canvas rendered:true, distinctColors:306, litSamples:3770 of 3782. This verifies the healthy case and the new telemetry on this host, not a reproduced black-frame negative case. I could not reproduce the original intermittent black viewer during this read-only inspection; leaving this issue open rather than claiming hardware rejection was verified. The sparse-black-noise source regression test passes in the combined current workspace.

astra-viewer-122

John Lauer ·

Confirmed the original failure capture is rejected by the current detector. I recovered the exact attached native-first.png from the original AdomLapper incident, visually inspected it, decoded it to RGB and ran the current 1.0.25 Rust canvas_uniformity function (not a reimplementation). Result: rendered:false, 0 lit / 4352 samples, 1 color. A current healthy ESC capture passes: rendered:true, 3901 lit / 3960 samples, 1148 colors. Both use the detector's approximate region because the historical PNG is a resized capture without a matching live GL canvas rectangle.

This is regression acceptance against the real failure image, plus the previously posted live healthy check. It is not a newly reproduced GPU/window failure, and does not verify the capture-time wait/retry path during that intermittent condition. Leaving that distinction explicit. Results attached; no shared runtime or viewer was restarted.

results.json

John Lauer ·

One cause of this is now handled in 1.0.35 (insiders), found during a from-scratch install on a clean Windows VM with no GPU (KiCad 10.0.6).

On that box KiCad showed "Could not use OpenGL, falling back to software rendering" at every start. The PCB canvas falls back and renders. The 3D viewer does not: it shows "Your OpenGL version is not supported. Minimum required is 1.5." over a black canvas, and kicad_show_3d_board answered ok with no warning.

From 1.0.35 the bridge remembers that KiCad said this. kicad_open_3d_viewer, kicad_show_3d_board, kicad_show_3d_chip and kicad_3d_view then answer canvasRendered:false, renderVerified:false and a _renderHint that names the fix: kicad_close, kicad_enable_software_opengl (Mesa on the CPU, for GPU-less hosts only), open again. On the VM that fix gave a fully rendered board with every model, about 5.6 s per reload.

Not covered by this: a black viewer on a machine whose OpenGL works. That is the pixel-level check this issue asks for and it stays open here. If your black frame was on a GPU-less or remote-session host, this change is the answer; if it was on ConfRoomROG, it is not.

John Lauer ·

KiCad Bridge1.0.55, KiCad10.0.5, Adom Bridge2.1.174, Hydrogen1.0.598, Windows11. backgroundGuard=false (read only; unchanged).

Related reproducible empty-canvas case,2026-10-11: open a task-owned board with foreground:false; wait for kicad_routing_state to report its exact path/revision; open its PCB-specific 3D viewer. The viewport is white with a black horizontal strip, despite a successful open. Fit, top/front/rotate menu commands, Refresh, a small resize/restoration and graceful viewer reopen do not recover it. WGC window recording shows the same empty viewport, so this is not just a PrintWindow screenshot artifact.

We compared a one-model Q1 candidate against the unchanged board26 that rendered correctly earlier today. BOTH currently fail visually. Board26 IPC revision remains3c3ecfd722714cf649ae04ee25cc69e7b02f69b9e849e43aedb91e835597314c. Candidate model check resolves91models,13intentional bare probe pads,0missing/0unresolved/0warnings. A temporary renderer switch to raytracing also failed; restored OpenGL afterward. No settings reset, foreground takeover or pinned runtime replacement. No claim that this identifies the root cause or that open success is a render-proof promise.

Please expose renderer/readiness diagnostics and a background-safe recovery. Preserve the explicit renderVerified:false boundary: this capture and the diagnostic take were rejected. Current unchanged board26 remains open. Screenshots show baseline before/after; request/data are in the electronic-load project checkpoint. The new Q1 nominal CAD screen can continue independently.

restored-board26

native-3d-before-record

John Lauer ·

Follow-up on this run: the unchanged model set now renders correctly on adopted board27. After a task-owned native save, graceful close, confirmation that no pcbnew process remained, and background reopen, IPC and the linked3D viewer both work. No display/driver reinstall, preference reset, foreground takeover or bridge upgrade was performed. This is a recovery observation, not evidence that the underlying renderer defect is fixed; the earlier white viewport appeared on both the forming candidate and baseline26.

Attached native screenshot shows the current board and marked IC bodies. Separately, reopening immediately after posting Quit produced a missing IPC socket; waiting for actual process exit before reopening recovered it. This may be a lifecycle race, but causality with the3D symptom is unproven.

native-3d-current

John Lauer ·

KiCad Bridge1.0.55 · KiCad10.0.5 · Adom Bridge2.1.174 · Hydrogen1.0.598 · Windows11 · AIFlow0.1.90.

The same white viewport with horizontal black strip recurred on the electronic-load Bourns land-pattern candidate today. Both 2D and 3D canvases are blank. IPC reads the exact candidate, native DRC passes0/0 and a native refill/save produces43 filled polygons. PrintWindow and a separate WGC recording both show the empty canvas. No modal dialog, hung-window flag or LogonUI process was observed.

Recovery attempts: refresh, top/fit, background UIA resize/restoration, viewer-only graceful reopen, then save and graceful close of only the verified task editor, wait for PID exit and background reopen. The final full-editor lifecycle retry still returns a blank viewer. No settings reset, foreground takeover, driver installation or bridge replacement occurred.

Useful distinction: native kicad-cli pcb render successfully renders this same candidate top/bottom/oblique. So the still-render path remains usable for independent geometry inspection while the interactive-view/recording requirement stays pending. This is not a claim about root cause. The diagnostic clip is rejected for the demo.

Attached blank native capture and successful native CLI still. Please retain the explicit renderVerified:false result and investigate background native canvas readiness/recovery. Previous successful reopen was intermittent, not a reliable fix.

after-editor-reopen

native-oblique

Colby Knox ·

kicad-lane: kicad-bridge 1.0.73 (insiders) closes the remaining false positive.

I ran the old detector on the "after-editor-reopen" capture attached above (the white 3D viewer with one black strip). Over the GL canvas it saw 4 colours and 99.6% lit samples, so it said rendered: true. Without a canvas rect it also sampled the Appearance panel, which said the same.

A canvas now also needs 10% of its sampled rows to vary, and the probe reports variedRowsPct. A blank canvas is flat rows even with a band across it: that capture measures 3.2%, so it is no longer reported as drawn. Real views on the test laptop (KiCad 10.0.7) measure 33% for a small 3D chip and 100% for a symbol editor with its grid. All seven show_* verbs still report drawn canvases, and the full battery is 302/0/1.

This makes the evidence honest; it does not fix the viewer coming up blank. When it does, canvasRendered: false with _canvasHint says so, and kicad_render_board (headless kicad-cli) remains the reliable picture. With 1.0.73 that render can also frame a reference (#105).

Colby Knox ·

kicad-lane: done, closing. A blank viewer is no longer reported as rendered. Three fixes, each checked against the captures attached here:

  • 1.0.21: a canvas needs lit pixels. This rejects the original all-black capture (0 lit of 4352 samples).
  • 1.0.35: when KiCad reports it fell back to software OpenGL, the 3D viewer is flagged instead of answering ok.
  • 1.0.73: a canvas also needs 10% of its sampled rows to vary (variedRowsPct). This rejects the white viewport with one black strip.
Colby Knox closed this ·

Log in to reply.