Skip to content

Bug: efc-ok-chain-unhandled-keyboard-paths-and-half-completed-teardown #695

Description

@drmoisan
  • Work Mode: full-bug

Summary

Two defects on the EFC filing (OK) chain, both carried out of the issue #637 scoping analysis and
deliberately excluded from that fix. First, the two keyboard entry points to ActionOkAsync have no
exception handler, so an exception thrown during filing becomes an unhandled UI-thread exception.
Second, on the button entry point the exception is caught, but ActionOkAsync hides the form before
awaiting the filing operation and disposes it only afterwards, so a throw leaves the form hidden,
undisposed, and uncleaned with no user-visible message.

This entry also records a third, smaller item: EfcDataModel.OpenOlFolderAsync and
OpenFsFolderAsync assign DestinationOlStem verbatim in exactly the same shape that issue #637
corrects in the string overload of MoveToFolderAsync, and are not covered by that fix.

Correction to the record. Issue #637 states that an InvalidOperationException from
Globals.Ol.ArchiveRootPath "becomes an unhandled UI-thread exception" because ButtonOK_Click is
async void and rethrows. That premise is inaccurate against the current tree.
ButtonOK_Click is async void, but it delegates to ButtonOkClickAsync, which wraps the whole
chain in try { ... } catch (System.Exception ex) { BoundaryErrorSink(ex.Message, ex); }
(QuickFiler/Controllers/EfcFormController.cs:460-475). The exception is therefore logged, not
unhandled, on the button path. The genuine defects are the two described above, which is why they
were separated from issue #637 rather than folded into it.

Environment

  • OS/version: Windows 11 Pro 10.0.26200; .NET Framework 4.8.1 VSTO add-in.
  • Python version: Not applicable; this is C#.
  • Command/flags used: Static tracing of the EFC OK chain during issue Bug: breadcrumb-selectrow-emits-rooted-path-leaving-d1-half-closed #637 preparation research,
    against origin/main at ecdb1c84ba8541ab67042985919cfed4df768c01.
  • Data source or fixture: Repository source at that commit.

Steps to Reproduce

  1. Put the add-in into a state where Globals.Ol.ArchiveRootPath is unresolvable or cross-store, so
    that ArchiveRootPathGuard.RequireResolvedArchiveRoot
    (TaskMaster/AppGlobals/ArchiveRootPathGuard.cs:32-60) throws InvalidOperationException. The
    value is cached only on success (TaskMaster/AppGlobals/AppOlObjects.cs:253-267), so the throw
    recurs on every read.
  2. Open the Email Filer Control form with an item selected and a valid destination chosen.
  3. Path A (keyboard): trigger filing with the always-on Keys.Return action
    (QuickFiler/Controllers/EfcFormController.cs:392) or the 'K' character action routed through
    KbdExecuteAsync(ActionOkAsync) (:623, :683; KbdExecuteAsync is declared at :894-904 and
    contains no try/catch). Observe an unhandled UI-thread exception.
  4. Path B (button): trigger filing with the OK button. The exception is caught by
    ButtonOkClickAsync (:462-475) and routed to BoundaryErrorSink. Observe that the form was
    already hidden by ActionOkAsync at :756 before the await at :759, and that
    _formViewer.Dispose(); Cleanup(); at :769-770 never run. The item is not filed and no message
    is shown.

Expected Behavior

An archive-root configuration failure aborts the filing operation benignly: the user is told the
operation could not be completed, the form completes its teardown deterministically, and no
unhandled exception reaches the message pump from any entry point. Every entry point to
ActionOkAsync has the same exception posture.

Actual Behavior

The three entry points to ActionOkAsync have two different exception postures. The button path
catches and logs but leaves a half-completed teardown and shows the user nothing. The two keyboard
paths do not catch at all, so the exception is unhandled on the UI thread.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: not applicable; established by source tracing. See
    QuickFiler/Controllers/EfcFormController.cs:392, :460-475, :738-772, :894-904;
    QuickFiler/Controllers/EfcHomeController.ExecuteMoves.cs:32-47;
    TaskMaster/AppGlobals/ArchiveRootPathGuard.cs:32-60.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

The trigger requires a misconfigured or cross-store archive root, so it is not expected in normal
operation. Severity is Medium because one of the two outcomes is an unhandled UI-thread exception in
a VSTO add-in, and the other silently abandons a filing operation the user believes has completed.

Source

From: docs/features/potential/2026-08-29-efc-ok-chain-unhandled-keyboard-paths-and-half-completed-teardown.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