Skip to content

[Bug] Windows desktop crashes: access violation on the UI thread (0.42.1) and heap corruption during a file-watch burst #1120

Open

Description

@YHonc

Environment

  • codeg Desktop 0.42.1 (codeg.exe PE timestamp 0x6aee122b, 2026-11-06 17:45:15 UTC)
  • Windows 11 Home 10.0.22631 x64, WebView2 runtime installed
  • Agents: Claude Code (claude-acp 0.100.0), Codex (codex-acp 2.5.0); several concurrent sessions plus codeg-cli run dispatches and MCP delegations

Crash 1 — current build 0.42.1 (2026-11-08 14:43 UTC)

  • Windows Application log: event 1000 at 14:43:13, faulting module codeg.exe 0.42.1, exception 0xc0000005, offset 0x5824b47; at 14:43:18 a second event 1000 with 0xc000041d at the same offset.
  • Minidump: access violation writing 0x27f5ef38600 (exception params [0x1, 0x27f5ef38600]) at codeg.exe+0x5824b47.
  • Faulting thread is the first thread of the process (main/UI thread). A raw stack scan finds return addresses in user32.dll, comctl32.dll, win32u.dll, EmbeddedBrowserWebView.dll (38 hits) and codeg.exe, so the fault is in codeg code reached from window-message / WebView2 callback dispatch; 0xc000041d means the exception escaped a user callback.
  • Log context: two ACP sessions finished a turn and were disconnected at 14:42:17 and 14:42:43, while codeg-cli run dispatches were writing output files in the same workspace. Logging continues until 14:43:18.189; the app was restarted at 14:43:38.
  • Not reproducible on demand yet.

Crash 2 — older build (PE timestamp 0x6aea5268, 2026-11-03), 2026-11-07 12:13 UTC

  • Event 1000 at 12:13:21: faulting module ntdll.dll, exception 0xc0000374 (heap corruption), offset 0x10d1f9.
  • Faulting thread is a background thread (not the first thread); the stack is mostly ntdll.dll and codeg.exe.
  • Log context: about 14,480 notify::windows events between 12:13:08 and 12:13:14 (a dependency install under an open workspace's node_modules), after tens to hundreds per minute before. The log stops at 12:13:14.072 and the process dies 7 s later.
  • This build is older; reporting in case the watcher path is still involved in 0.42.1.

Possibly related: #1059 (UI hang under heavy terminal output).

Logs (redacted)

User paths, session/connection IDs and text content are replaced with placeholders; each line is time level target | message, messages truncated to 170 chars.

Crash 1 — 2026-11-08 14:42:00 → restart (UTC)
14:42:01.031 INFO  codeg_lib::acp::connection | [ACP] permission <id-2> shown conn=<id-3> conv=75 (waiting=0)
14:42:01.031 INFO  codeg_lib::acp::connection | [ACP] permission <id-2> answered conn=<id-3> conv=75
14:42:02.498 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-2>\<file-36>`, action = 2
14:42:02.503 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-2>`, action = 3
14:42:02.506 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-2>`, action = 2
14:42:17.108 INFO  codeg_lib::acp::session_state | [ACP] turn_complete session=Some("<id-4>") stop_reason=end_turn background_outstanding=0
14:42:17.108 INFO  codeg_lib::acp::session_state | [ACP] status_changed session=Some("<id-4>") Connected -> Connected
14:42:17.114 INFO  codeg_lib::acp::manager | [ACP] disconnect connection=<id-3>
14:42:17.129 INFO  codeg_lib::acp::session_state | [ACP] status_changed session=Some("<id-4>") Connected -> Disconnected
14:42:17.131 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-37>`, action = 3
14:42:17.148 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-38>`, action = 3
14:42:17.234 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-39>`, action = 3
14:42:29.187 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>\<file-40>`, action = 1
14:42:29.188 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>\<file-40>`, action = 3
14:42:31.730 INFO  codeg_lib::acp::background_watch | [bg-watch] registered background shell task=<id-5>
14:42:31.730 INFO  codeg_lib::acp::background_watch | [bg-watch] surfacing connection=<id-6> turns=0 settled=0 outstanding=2 watermark=12122866
14:42:35.810 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>`, action = 3
14:42:43.424 INFO  codeg_lib::acp::session_state | [ACP] turn_complete session=Some("<id-7>") stop_reason=end_turn background_outstanding=0
14:42:43.424 INFO  codeg_lib::acp::session_state | [ACP] status_changed session=Some("<id-7>") Connected -> Connected
14:42:43.439 INFO  codeg_lib::acp::manager | [ACP] disconnect connection=<id-8>
14:42:43.459 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-41>`, action = 3
14:42:43.465 INFO  codeg_lib::acp::session_state | [ACP] status_changed session=Some("<id-7>") Connected -> Disconnected
14:42:43.521 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-42>`, action = 3
14:42:43.593 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-3>\<file-39>`, action = 3
14:43:10.896 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>\<file-43>`, action = 1
14:43:10.896 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>\<file-43>`, action = 3
14:43:18.189 TRACE notify::windows | Event: path = `\\?\<workspace-A>\<dir-4>`, action = 3
14:43:38.535 INFO  codeg_lib::paths | [paths] logs go to C:\Users\<user>\AppData\Roaming\app.codeg\logs
14:43:38.558 INFO  sea_orm_migration::migrator | Applying all pending migrations
14:43:38.559 INFO  sea_orm_migration::migrator | No pending migrations
14:43:38.570 INFO  codeg_lib::chat_channel::manager | [ChatChannel] command dispatcher started
14:43:38.585 INFO  codeg_lib::commands::generative_ui | [GenerativeUI] ui-render skill ready
14:43:38.585 INFO  codeg_lib::acp::delegation::listener | [delegation] listening on named pipe \\.\pipe\codeg-delegation-10416
14:43:38.590 INFO  codeg_lib::cli_run::listener | [cli] command-line access on <redacted>, published at C:\Users\<user>\AppData\Roaming\app.codeg\cli\endpoint-10416.json
Crash 2 — 2026-11-07 12:12:00 → 12:13:40 (UTC), first 40 of ~14,480 notify lines kept
12:12:02.130 DEBUG codeg_lib::acp::connection | [ACP][Claude Code][stderr] Unexpected case: {"type":"system","subtype":"permission_check_status","tool_use_id":"<id-17>","status":"checking","uuid":"<id-15>","session_id"…
12:12:09.582 DEBUG codeg_lib::acp::connection | [ACP][Claude Code][stderr] Unexpected case: {"type":"system","subtype":"permission_check_status","tool_use_id":"<id-17>","status":"done","uuid":"<id-18>","session_id":"<i…
12:12:10.462 INFO  codeg_lib::acp::background_watch | [bg-watch] registered background shell task=<id-19>
12:12:10.464 INFO  codeg_lib::acp::background_watch | [bg-watch] surfacing connection=<id-20> turns=2 settled=0 outstanding=1 watermark=10473247
12:12:13.757 DEBUG codeg_lib::acp::connection | [ACP][Claude Code][stderr] Unexpected case: {"type":"system","subtype":"permission_check_status","tool_use_id":"<id-22>","status":"checking","uuid":"<id-21>","session_id"…
12:12:34.835 TRACE hyper_util::client::legacy::pool | idle interval checking for expired
12:12:37.258 DEBUG codeg_lib::acp::connection | [ACP][Claude Code][stderr] Unexpected case: {"type":"system","subtype":"permission_check_status","tool_use_id":"<id-22>","status":"done","uuid":"<id-23>","session_id":"<i…
12:12:37.758 INFO  codeg_lib::acp::background_watch | [bg-watch] surfacing connection=<id-20> turns=1 settled=0 outstanding=1 watermark=10478015
12:13:02.102 INFO  codeg_lib::acp::background_watch | [bg-watch] registered background shell task=<id-24>
12:13:02.119 INFO  codeg_lib::acp::background_watch | [bg-watch] surfacing connection=<id-20> turns=2 settled=0 outstanding=2 watermark=10505383
12:13:08.554 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-1>`, action = 3
12:13:08.563 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-2>`, action = 2
12:13:08.564 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-1>`, action = 2
12:13:08.564 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules`, action = 3
12:13:08.564 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\@napi-rs`, action = 2
12:13:08.564 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules`, action = 3
12:13:08.624 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-5>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-3>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-4>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-6>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-9>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-8>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-7>`, action = 2
12:13:08.625 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-11>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-12>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-14>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-17>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-15>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-10>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-13>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-18>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-16>`, action = 2
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.626 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-19>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-23>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-21>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-22>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-20>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-26>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-24>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-29>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-27>`, action = 2
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\node_modules\.bin`, action = 3
12:13:08.627 TRACE notify::windows | Event: path = `\\?\<workspace-D>\<dir-17>\desktop\<file-25>`, action = 2

Available on request

Three minidumps (~3 MB each) can be shared privately, since they contain process memory. Without PDBs I can only give module offsets; if symbols for 0.42.1 are available I can post a symbolicated stack.

Activity

  1. xintaofei commented on Nov 10, 2026

    @xintaofei
    Collaborator

    codeg work task 500 is done — it made no changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions