Skip to content

Bug: webview2breadcrumbhost-unmarshalled-sdk-call-and-unsynchronized-state #476

Description

@drmoisan
  • Work Mode: full-bug

Summary

WebView2BreadcrumbHost reaches the WebView2 SDK on the caller's thread with no UI marshalling, and
publishes its initialization state through a non-volatile field read from other threads. The
sibling adapter that serves the same purpose for the popup surface, WebView2Messenger, routes
every SDK call through BreadcrumbUiDispatcher. The two adapters therefore disagree about the
thread-affinity contract of the same SDK.

Two related defects are filed together because they share one file, one root cause area, and one
fix.

Environment

  • OS/version: Windows 11 Pro 10.0.26200
  • Runtime: .NET Framework 4.8.1 WinForms VSTO add-in
  • Package: Microsoft.Web.WebView2 1.0.4129.50 (QuickFiler/packages.config:29)
  • Sole construction site: QuickFiler/Controllers/EfcFormController.cs:836 (EfcViewer surface)

Steps to Reproduce

(not provided in potential file)

Expected Behavior

(not provided in potential file)

Actual Behavior

(not provided in potential file)

Logs / Screenshots

(not provided in potential file)

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Defect 1 can throw InvalidCastException/COMException or corrupt COM apartment state when the
breadcrumb document is posted to from a background thread; the symptom is intermittent and
apartment-dependent, which makes it expensive to reproduce from a user report. Defect 2 can cause a
reader to see IsCoreInitialized == false after initialization completed (dropping a payload
through the :76 guard) or to see it true before the subscription at :131-132 is visible.

Severity is High because the failure is silent-or-intermittent and concurrency-dependent rather
than deterministic.

Source

From: docs/features/potential/2026-08-07-webview2breadcrumbhost-unmarshalled-sdk-call-and-unsynchronized-state.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions