Squashed from work; the fine-grained history is under tag archive/work-2026-08-26: - vj: the music explorer gets IMPORT, and catalog controls fold away in local mode - vjfx: three lanes land — engine hooks + hold stage, the videomesh engine, and the audio picture - vj: the thumbnail pipeline becomes one honest machine, and effects go livecodable - vj: thumbnails become mp4 — hardware-coded sheets at measured-4K cells, and the bake stops racing the GPU - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - store: the ceremony dies — batch publish, one transaction, and the engine stops re-reading its own log - vj: the console grows real transports, and the deck stops lying about reverse - vj: reverse earns a memory, and the effects stop aging - vj: video goes NV12 end to end, and the GPU does the unpacking - vj: windows hands the main thread one megabyte, and the script tree wants two - vj: the GPU learns to see motion — realtime frame tweening on every deck - vj: the tweener learns — RIFE runs on the Mac and feeds the warp - vj: the classical tweener grows up, and every deck gets a tween chip - models: an interrupted install can never load broken - vj: the transport becomes a platter — velocity in, position out, one map - vj: the tween presenter reads the platter — one clock per deck, cued once at the frame on screen - vj: the presenter switch lands without its scaffolding - vj: the next pair's fields are fetched ahead of the change under the capacity law — a pair change costs an ordinary beat; macos: the layer's own display link paces the frame when the system offers it, the old path stays as fallback - vj: AI3 subdivides adaptively — one, three or seven neural frames per pair, chosen from measured synth time against the pair's own period, with classical flow between them and a 7-3-1-FL fallback; the deck shows the depth - vj: local store, lyrics and model plumbing, and the frame-interpolator's device parity check - vj: DJ-tab scroll knobs, title-click reset, crossfade fix, stem headroom — plus the pre-Ampere CUDA fix (#1193) - vj: the deck explorer lists music-tagged audio, the sfx surface filters by tag not category, the track list fills the window, and the modal host has no layout footprint Co-authored-by: Rogier de Leeuw <vjroger@gmail.com>
27 lines
1.5 KiB
Rust
27 lines
1.5 KiB
Rust
// WINDOWS MAIN-THREAD STACK RESERVE.
|
|
//
|
|
// Windows gives the main thread a 1 MB stack by default; macOS gives 8 MB and
|
|
// Linux 8 MB. The VJ app's startup walks a very large script tree — fourteen
|
|
// script_mod registration passes (widgets, render, xr, asset widgets, chat ui,
|
|
// views, mesh, flow warp, nv12, music, effects, fx thumbs, fx slot, midi learn)
|
|
// plus 261 bundled effect presets — and the DSL evaluator is a recursive
|
|
// descent over that tree. Peak main-thread usage measured between 1 MB and
|
|
// 2 MB: bounded, but just over what Windows hands out. The result on Windows
|
|
// was a hard `thread 'main' has overflowed its stack` at boot, before the
|
|
// window ever appeared.
|
|
//
|
|
// Verified by bracketing the macOS binary with `ulimit -s`: at 1024 KB it
|
|
// reproduces the Windows crash exactly (same final log lines), at 2048 KB it
|
|
// boots and runs. So this is a platform default, not a runaway recursion —
|
|
// raising the reserve is the fix, not a paper-over.
|
|
//
|
|
// /STACK sets the PE header's stack RESERVE, which is address space only;
|
|
// pages commit lazily, so a 16 MB reserve costs no real memory and simply
|
|
// gives the same headroom the other platforms already have.
|
|
fn main() {
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
let target_env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
|
|
if target_os == "windows" && target_env == "msvc" {
|
|
println!("cargo:rustc-link-arg-bins=/STACK:16777216");
|
|
}
|
|
}
|