Component: TMS FNC Maps / TMS FNC Core, VCL, Delphi 13 (32-bit), WebView2/Edge on Windows.
Problem: TTMSFNCCustomWebBrowser.ExecuteJavaScript (non-immediate) serializes scripts through FScriptList: the next script is only submitted from DoScriptHandled, which is invoked as the completion callback of the previous ICoreWebView2.ExecuteScript call (TCoreWebView2ExecuteScriptCompletedHandler.Invoke in VCL.TMSFNCWebBrowser.Win.pas). If a single completion never arrives, the chain is broken permanently: every later non-immediate script is appended to FScriptList but never submitted. There is no timeout or recovery, and FScriptList is not cleared on Navigate/Reload/ReInitialize — only the destructor frees it — so the control never recovers until the application restarts.
The same pattern exists in TTMSFNCCustomMaps.UpdateMarkers: FAwaitingDoUpdateMarkers is set before ExecuteJavaScript(GETMARKERARRAYVAR, DoUpdateMarkers, True) and only cleared in DoUpdateMarkers; a lost completion means markers are never updated again (the guard is only reset in the constructor).
How we hit it: our application occasionally shows a modal dialog (from a TThread.Queue callback) while the user is moving the mouse over the map, so hover scripts and their completions are in flight. Occasionally WebView2 then never delivers the pending ExecuteScript completion (apparently lost while the modal message loop runs during a WebView2 callback). Afterwards all queued scripts and marker updates stop working while immediate scripts still work. It is hard to reproduce on demand but recurs in production.
Suggested fix: record a tick when the head script of FScriptList is submitted; when ExecuteJavaScript queues a new script and the head is older than a few seconds, call DoScriptHandled(nil) to restart the chain. Also check the HRESULT of ICoreWebView2.ExecuteScript in TTMSFNCWinWebBrowser.ExecuteJavascript and invoke the callbacks on failure, and add a similar timeout to the FAwaitingDoUpdateMarkers guard. Could you add such self-healing?