Stack overflow reading Takes when a Shot has a circled Take and a Board #127

Closed
opened 2026-10-09 20:37:38 +00:00 by crowmaki · 0 comments
Owner

What happens

Reading a Scene's Takes overflows the stack once a Shot has a circled Take and a Board. scene_takes (Dailies) and plan_edit_package (Export) both crash the thread with STATUS_STACK_OVERFLOW. In the app this would take the process down.

Found while seeding screenshots for #69. Reproduced on main at 310e328.

Repro

In a studio-core integration test, using the Storage test rig (one Scene, one Shot, a render worker against fake ComfyUI):

  1. Import a start Keyframe on the Shot (optional; it happens without one too).
  2. Render a draft Take and circle it.
  3. save_board(&shot, &[panel, panel]).
  4. scene_takes(&scene) overflows the stack.

Without the circle, or without the Board, step 4 returns normally. Rendering after the Board is saved and then circling also overflows in plan_edit_package.

Notes

  • Seen in a debug test build (default 2 MB thread stack). Raising RUST_MIN_STACK to 64 MB did not help, so this looks like unbounded recursion rather than a deep-but-finite stack.
  • The likely area is whatever runs only for circled Takes on a Shot with a Board: staleness of circled Takes (circled stale counts) or the Animatic's Board events.

Acceptance criteria

  • A failing test through ProjectSession reproduces the overflow
  • scene_takes and plan_edit_package return normally for a circled Take on a Shot with a Board
## What happens Reading a Scene's Takes overflows the stack once a Shot has a circled Take and a Board. `scene_takes` (Dailies) and `plan_edit_package` (Export) both crash the thread with `STATUS_STACK_OVERFLOW`. In the app this would take the process down. Found while seeding screenshots for #69. Reproduced on `main` at 310e328. ## Repro In a `studio-core` integration test, using the Storage test rig (one Scene, one Shot, a render worker against fake ComfyUI): 1. Import a start Keyframe on the Shot (optional; it happens without one too). 2. Render a draft Take and circle it. 3. `save_board(&shot, &[panel, panel])`. 4. `scene_takes(&scene)` overflows the stack. Without the circle, or without the Board, step 4 returns normally. Rendering after the Board is saved and then circling also overflows in `plan_edit_package`. ## Notes - Seen in a debug test build (default 2 MB thread stack). Raising `RUST_MIN_STACK` to 64 MB did not help, so this looks like unbounded recursion rather than a deep-but-finite stack. - The likely area is whatever runs only for circled Takes on a Shot with a Board: staleness of circled Takes (`circled stale` counts) or the Animatic's Board events. ## Acceptance criteria - [ ] A failing test through `ProjectSession` reproduces the overflow - [ ] `scene_takes` and `plan_edit_package` return normally for a circled Take on a Shot with a Board
crowmaki referenced this issue from a commit 2026-10-09 21:25:32 +00:00
Sign in to join this conversation.
No description provided.