• v0.1.18 63c96667ff

    serrebi released this 2026-07-04 20:27:12 -07:00 | 8 commits to main since this release

    Fixes a second, more subtle cause of the NVDA restart hang from v0.1.17.

    v0.1.17 deferred the tray menu teardown in terminate() via wx.CallAfter
    to avoid calling toolsMenu.Remove() while NVDA's wx event loop was
    tearing down. That wasn't quite enough: NVDA's core destroys the system
    tray icon (and every menu it owns, including this add-on's submenu)
    synchronously right after terminate() returns, in the same call stack,
    before the deferred callback gets a separate turn to run. Touching the
    menu ourselves at that point could still reproduce the hang.

    terminate() now checks core._hasShutdownBeenTriggered (the same
    private flag NVDA's own bundled NVDA Remote client uses to detect a real
    exit) and skips menu teardown entirely during a genuine NVDA exit, since
    NVDA tears the tray icon down for us moments later. Teardown still runs
    normally for a plugin reload, where NVDA does not destroy the tray icon.

    Downloads