Skip to content

Dev - #11

Open
Superagentsys wants to merge 3 commits into
mainfrom
dev
Open

Dev#11
Superagentsys wants to merge 3 commits into
mainfrom
dev

Conversation

@Superagentsys

Copy link
Copy Markdown
Owner

No description provided.

dupf and others added 3 commits June 9, 2026 20:54
Windows 上 Tauri 异步线程默认 ~1MiB 栈,序列化体积较大、嵌套较深的
Config 为 TOML 时会触发栈溢出导致进程闪退。改为在 Windows 下使用
8MiB 栈的专用线程执行 Config 保存;同时用 toml 序列化生成
active_workspace.toml,避免 Windows 路径反斜杠破坏 TOML,并让
expand_tilde_path 回退到 USERPROFILE。

Co-authored-by: Cursor <cursoragent@cursor.com>
v0.1.6.1 仅兜住了 Config::save() 一处。保存流程中反序列化命令入参、
setup_config_to_core 构建与 validate 配置等步骤仍跑在 Tauri 默认小栈
(~1MiB) 异步线程上,对超大且深度嵌套的 Config 做 serde (反)序列化时
仍会栈溢出 (0xC00000FD)。在 run() 最开始安装带 8MiB worker 栈的 tokio
运行时并 tauri::async_runtime::set,覆盖所有命令处理路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
仅调大 tokio 异步运行时栈仍不够:Tauri 在反序列化命令入参、以及把命令
结果回传/序列化时使用 IPC/主线程,这些线程以 OS 默认栈大小创建
(PE SizeOfStackReserve,MSVC 默认约 1MiB),对超大且深度嵌套的 Config
做 serde 时仍会栈溢出 (0xC00000FD)。在 build.rs 中为 windows-msvc 目标
通过 /STACK:8388608 将可执行文件默认栈预留量提升到 8MiB;以 0 栈大小
创建的线程(主线程、Tauri/wry 内部线程、IPC 回传线程)均继承该值,覆盖
全部 Config serde 路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant