Files
kicad-source-mirror/include/widgets
Seth Hillbrand c2749d3b49 Fix WebView freeze during modal dialogs
WebKit's AddScriptMessageHandler calls RunScript internally,
which yields the event loop via DoYieldFor. When this runs
inside a nested event loop (e.g., Update PCB from Schematic's
modal dialog), JSC crashes in sanitizeStackForVM.

The previous fix used CallAfter to defer handler registration,
but CallAfter events fire immediately in the modal dialog's
event loop, creating a tight busy-wait that freezes the UI.

Replace CallAfter re-deferral with a wxTimer that retries
every 200ms until the main event loop is active. Also guard
AddMessageHandler's late-registration path with the same
nested loop check so handlers added after init are safe too.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23423
2026-03-13 11:01:45 -07:00
..
2026-01-07 08:11:19 +05:00
2025-02-28 01:57:37 +00:00