tauri
tauri copied to clipboard
[bug] thread 'main' has overflowed its stack (Windows 11 Tauri v2 beta)
Describe the bug
Got thread 'main' has overflowed its stack
error on Windows. (Also tried on Mac and Linux and there is no problem)
I was developing an app on Mac. When I try to migrate to Windows, I got this error.
I have seen the same error message in other github issues, but I don't think it's the same problem.
Reproduction
I made a minimum reproduction project here https://github.com/HuakunShen/tauri-win-stackoverflow
Some explanation in repo README as well.
I simply added a few official plugins, and 2 capability files.
For me the reproduction project won't run with npm run tauri dev
. But if I run rust code with release mode it will run.
pnpm dev # start frontend dev server
# in another terminal
cd src-tauri
cargo run # this still gives stack overflow error
cargo run --release # this will run
If I simply remove 3 unused plugins from Cargo.toml it will run.
If I remove some capabilities it will run.
Expected behavior
It should run.
Full tauri info
output
❯ npm run tauri info
> [email protected] tauri
> tauri info
[✔] Environment
- OS: Windows 10.0.22631 X64
✔ WebView2: 125.0.2535.67
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
✔ cargo: 1.77.2 (e52e36006 2024-03-26)
✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.9.0
- pnpm: 9.1.2
- yarn: 1.22.22
- npm: 10.5.2
- bun: 1.1.4
[-] Packages
- tauri [RUST]: 2.0.0-beta.20
- tauri-build [RUST]: 2.0.0-beta.16
- wry [RUST]: 0.40.0
- tao [RUST]: 0.28.0
- @tauri-apps/api [NPM]: 2.0.0-beta.12
- @tauri-apps/cli [NPM]: 2.0.0-beta.18
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: React
- bundler: Vite
Stack trace
❯ pnpm tauri dev
> [email protected] tauri C:\Users\shenh\Desktop\tauri-win-stackoverflow
> tauri "dev"
Running BeforeDevCommand (`pnpm dev`)
> [email protected] dev C:\Users\shenh\Desktop\tauri-win-stackoverflow
> vite
VITE v5.2.11 ready in 130 ms
➜ Local: http://localhost:1420/
➜ Network: use --host to expose
Info Watching C:\Users\shenh\Desktop\tauri-win-stackoverflow\src-tauri for changes...
Compiling tauri-win-stackoverflow v0.0.0 (C:\Users\shenh\Desktop\tauri-win-stackoverflow\src-tauri)
error: failed to remove file `C:\Users\shenh\Desktop\tauri-win-stackoverflow\src-tauri\target\debug\tauri-win-stackoverflow.exe`
Caused by:
Access is denied. (os error 5)
ELIFECYCLE Command failed with exit code 4294967295.
ELIFECYCLE Command failed with exit code 101