Skip to content

Bug: qfc-initializewebviewasync-fault-is-unobserved #670

Description

@drmoisan
  • Work Mode: full-bug

Summary

QfcItemController.InitializeWebViewAsync (QuickFiler/Controllers/QfcItemController.ViewerSetup.cs:48)
returns a Task that three of its four production call sites discard, so any exception it raises becomes an
unobserved task exception rather than a diagnostic anyone sees. The method is the sole entry point for WebView2
environment creation, core initialization, and - at ViewerSetup.cs:112 - the call to EnsureBreadcrumbPipeline().
Issue #488's D5 fix makes that path newly capable of throwing ObjectDisposedException when the pipeline is built
against a viewer whose teardown has begun, which converts a previously silent leak into a fault that is itself
silently swallowed.

Environment

  • OS/version: Windows 11 Pro 10.0.26200
  • Python version: n/a (.NET Framework 4.8.1, VSTO / WinForms)
  • Command/flags used: n/a - identified by source reading during issue Bug: itemviewer-breadcrumb-pipeline-lifecycle #488 execution, discharging research §3.5
  • Data source or fixture: QuickFiler/Controllers/QfcItemController.Initialization.cs call sites

Steps to Reproduce

  1. Drive a QfcItemController through any of the three fire-and-forget initialization paths listed under
    "Suspected Cause / Notes".
  2. Arrange for InitializeWebViewAsync to fault - for example by disposing the ItemViewer before the posted
    continuation reaches EnsureBreadcrumbPipeline(), which after Bug: itemviewer-breadcrumb-pipeline-lifecycle #488's D5 fix throws ObjectDisposedException.
  3. Observe that no exception surfaces to the caller, no log entry is written by the call site, and initialization
    silently completes as far as any observer can tell.

Expected Behavior

A faulted InitializeWebViewAsync should be observed by its caller - awaited, ContinueWith-observed, or routed to
the repository's logging pattern - so that a failure during WebView2 initialization is diagnosable rather than
invisible.

Actual Behavior

The task is discarded at three of the four call sites, so the fault is never observed:

Call site Form Observed?
QfcItemController.Initialization.cs:192 _ = _itemViewer.UiDispatcher.InvokeAsync(InitializeWebViewAsync); no - discarded, and additionally wrapped in a WPF DispatcherOperation
QfcItemController.Initialization.cs:256 await InitializeWebViewAsync(); yes - awaited into the enclosing async method's task
QfcItemController.Initialization.cs:288 _ = InitializeWebViewAsync(); no - discarded
QfcItemController.Initialization.cs:324 _ = InitializeWebViewAsync(); no - discarded

On .NET Framework 4.5 and later an unobserved task exception no longer terminates the process by default, so the
fault is finalized away with no observable effect at all.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: no captured log - that is the defect. Identified by source reading, recorded in
    docs/features/active/itemviewer-breadcrumb-lifecycle-defects-488/evidence/qa-gates/d5-faulted-task-observation.md.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

The severity comes from the failure mode rather than the likelihood. A WebView2 initialization failure - a missing
runtime, a locked cache directory, a disposed viewer - produces no diagnostic on three of four paths, so the
breadcrumb surface simply never appears and the cause is unavailable to anyone triaging it.

Source

From: docs/features/potential/2026-08-28-qfc-initializewebviewasync-fault-is-unobserved.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