Skip to content

"event handler is re-entrant" error or startup crash - cc-switch

Quick fix

Uninstall Windows update KB5081263 or wait for cc-switch upgrade to avoid crashes and UI rendering failures caused by TAO EventLoop re-entry.

Error output
either event handler is re-entrant (likely), or no event handler is registered (very unlikely)

This issue is caused by a defect in the event loop (EventLoop) handling of the underlying GUI framework TAO (v0.34.6) on Windows. When cc-switch synchronously calls window.show() during the Tauri setup phase, if the system environment triggers event handler re-entry or missing registration, it causes the application to crash immediately after startup (e.g., Issue #5414), or the background process runs normally but the main window fails to render (e.g., Issue #5186). Some users identified that specific Windows cumulative updates (KB5081263) break this event loop mechanism, causing the setup flow to not execute at all. The upstream TAO project has confirmed this race condition in related discussions; cc-switch needs to delay the first window display to avoid it.

Although different users report slightly different manifestations (some exit automatically after staying in the interface for 2-3 seconds, others have an existing main window HWND that never renders), the root cause points to the same compatibility issue between the Windows event loop scheduling mechanism and the TAO framework. The fix is consistent.

  1. Check and uninstall the potentially conflicting Windows system update KB5081263, then restart the computer to verify if cc-switch starts normally and displays the interface.

  2. If you cannot uninstall the patch due to enterprise policies or system restrictions, temporarily revert to an older version of cc-switch or wait for the official release of a new version containing the EventLoop timing fix. During this period, you can try waking up the window via command line or tray icon.

Toolcc-switch
Version3.12.3 - 3.18.0
PlatformsWindows
Why does reinstalling the OS or switching versions (e.g., 16.4, 17.0) still result in a crash?
Because the root cause is a compatibility conflict between the Windows system underlying update (such as KB5081263) and the event loop of the TAO framework v0.34.6, rather than cc-switch's own configuration or local file corruption. If a fresh OS installation retains the same patch or reconnects to restore updates, the problem will recur.
How do I confirm if my system is affected by this Windows update?
Run winver in PowerShell to check the version number, and in 'Settings > Update & Security > View update history', confirm whether KB5081263 released on 2026-04-03 was installed. If installed and exhibiting the above symptoms, it confirms the same root cause.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.