Skip to content

Fix Windows startup stack overflow (port of #10 by @chrislearn) - #55

Merged
ymote merged 1 commit into
mainfrom
fix/windows-startup-stack
Sep 27, 2026
Merged

ymote merged 1 commit into
mainfrom
fix/windows-startup-stack

Conversation

@ymote

@ymote ymote commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Port of #10 by @chrislearn onto current main (the original branch conflicted after this week's changes). Authorship is Chris Young's.

  • build.rs (new): on Windows MSVC, cargo:rustc-link-arg-bins=/STACK:16777216 reserves 16 MiB for the main-thread stack. Windows' default 1 MiB overflowed during Makepad script/widget construction before the first window (STATUS_STACK_OVERFLOW). Stack pages are committed lazily.
  • src/clients.rs: Unix-only process-cleanup imports and the grace variable are gated/renamed so the Windows build doesn't warn; Unix behaviour unchanged.

Validation from #10 (Windows): cargo build --release, first D3D11 frame and --gallery startup stay running, dumpbin /headers shows a 0x1000000 stack reserve. Here: macOS CI (cargo check + tests) confirms the non-Windows build is unchanged; Windows was not re-run on this machine.

Closes #10.

🤖 Generated with Claude Code

Windows reserves a 1 MiB main-thread stack by default. OctoSense's startup
evaluates and constructs a large Makepad script/widget tree on that thread
and exited with STATUS_STACK_OVERFLOW before the first window. build.rs
reserves 16 MiB for the executable's main thread on Windows MSVC
(/STACK:16777216; PE stack pages are committed lazily). Unix-only process
cleanup imports and variables are gated so the Windows build stops warning.

Originally OctoSense-Desktop#10 by Chris Young, validated on Windows
(D3D11 first frame, --gallery, dumpbin shows a 0x1000000 stack reserve);
ported onto current main.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ymote
ymote merged commit afd1e34 into main Sep 27, 2026
2 checks passed
@ymote
ymote deleted the fix/windows-startup-stack branch September 27, 2026 14:45
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
…artup-stack

Fix Windows startup stack overflow (port of OctoSense-org#10 by @chrislearn)
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
makepad OctoSense-org#51 on top of 4531e695: the system-font fallback also finds
HarmonyOS's variable Noto fonts and its Arabic face. Octoscript-Makepad
OctoSense-org#55 releases it as ff9a65b0. Verified on a Mate 70 Air (HarmonyOS 6.1)
and a OnePlus 6T (Android 11): Thai, Arabic, Devanagari, Korean and
Chinese render in Maps; no panics.

Both runtime patches reapply unchanged; new stacked tree. native-apps.json
moves with the pin (tools/native_apps.py regenerated). Local checks:
setup.py --check --cargo; cargo check -p octosense (and app-terminal),
-p octosense-home --features mobile-apps; octosense-shell 408 passed;
check-shell-graph for both shells; native-apps tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Sep 29, 2026
The search/route map uses MapView's archive_url (makepad #55) with
https://makepad.nl/maps/world-20260926.mkmap instead of Overpass; the
drive maps stay on Overpass until the nav-mode drawing bug is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrislearn pushed a commit to chrislearn/OctoSense that referenced this pull request Sep 29, 2026
makepad OctoSense-org#55 (MapView archive_url) and OctoSense-org#56 (HTTPS on OpenHarmony through
rustls; Cargo.lock gains the rustls and webpki-roots edges already locked).
Both runtime patches apply unchanged; the stacked tree is now 169a5a47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 2, 2026
The search/route map uses MapView's archive_url (makepad #55) with
https://makepad.nl/maps/world-20260926.mkmap instead of Overpass; the
drive maps stay on Overpass until the nav-mode drawing bug is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 2, 2026
The search/route map uses MapView's archive_url (makepad #55) with
https://makepad.nl/maps/world-20260926.mkmap instead of Overpass; the
drive maps stay on Overpass until the nav-mode drawing bug is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 2, 2026
The search/route map uses MapView's archive_url (makepad #55) with
https://makepad.nl/maps/world-20260926.mkmap instead of Overpass; the
drive maps stay on Overpass until the nav-mode drawing bug is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ymote added a commit that referenced this pull request Oct 3, 2026
The search/route map uses MapView's archive_url (makepad #55) with
https://makepad.nl/maps/world-20260926.mkmap instead of Overpass; the
drive maps stay on Overpass until the nav-mode drawing bug is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

2 participants