Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Opening Pad Properties creates a preview canvas alongside the main board canvas. The WASM renderer shared its font texture and fullscreen drawing geometry between them, even though each canvas has a separate WebGL context. WebGL rejected the shared texture, causing a graphics exception; rebuilding the renderer repeated the failure. The shared drawing geometry could also leave the preview black.
The renderer fix gives each canvas's renderer and compositor their own GPU resources and releases those resources in the owning context. This code lives in PCBJam's KiCad submodule, so this PR advances that submodule to include KiCad PR #2 and adds the reproduction and validation details. It also retains the display-settings lifetime fix from KiCad PR #1.
Motivation
Double-clicking a pad could trigger the
remove_observerassertion, and closing Pad Properties with OK or Cancel could leave both clicking and drag selection unresponsive. The lifetime fix made renderer recovery safe, but the underlying graphics error still occurred. The WASM renderer changes address that trigger so opening a pad preview no longer requires recovery or a software-rendering fallback in the tested case.The original binary and the lifetime-only hotfix both reproduced the graphics error. The new compiled build rendered the preview correctly on the workspace board and passed four alternating Cancel/OK close-and-reopen cycles followed by drag selection, with no captured WebGL errors or runtime exceptions in Firefox. Testing used browser-local asset overrides; the served environment was left unchanged.