Skip to content

Conversation

@Legend-Master
Copy link
Contributor

@Legend-Master Legend-Master commented Apr 12, 2025

Fix #12488

This is a very similar bug as #9882, the debug build of rust seems unable to optimize the function stack size, and with a small stack size limit on Windows, it overflows, and in release build, the optimization kicks in and there're no problems

So this fix turns each macro into a closure in debug build so rust wouldn't allocate the memory all at once and crash

@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Apr 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 12, 2025

Package Changes Through e05c624

There are 8 changes which include @tauri-apps/api with minor, tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri-bundler with minor, tauri-runtime with minor, tauri-runtime-wry with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.4.1 2.5.0
tauri-utils 2.3.1 2.4.0
tauri-bundler 2.3.1 2.4.0
tauri-runtime 2.5.1 2.6.0
tauri-runtime-wry 2.5.1 2.6.0
tauri-codegen 2.1.1 2.1.2
tauri-macros 2.1.1 2.1.2
tauri-plugin 2.1.1 2.1.2
tauri-build 2.1.1 2.1.2
tauri 2.4.1 2.5.0
@tauri-apps/cli 2.4.1 2.5.0
tauri-cli 2.4.1 2.5.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master Legend-Master marked this pull request as ready for review April 13, 2025 09:32
@Legend-Master Legend-Master requested a review from a team as a code owner April 13, 2025 09:32
// see https://github.com/tauri-apps/tauri/issues/12488
{
#[cfg_attr(not(debug_assertions), inline(always))]
move || {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh so nice that Rust optimizes this for us on release ❤️ awesome idea

@lucasfernog lucasfernog merged commit 690146e into tauri-apps:dev Apr 14, 2025
19 of 20 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Apr 14, 2025
@Legend-Master Legend-Master deleted the fix-invoke-handler-stack-overflow branch April 15, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

[bug] [windows] invoking commands causes crash.

2 participants