Skip to content

Slicing: the Bambu Studio version check has no time limit, so a held launch hangs the turn #210

Open

Description

@AojdevStudio

Problem

detect_version in src-tauri/src/fabrication/bambu/studio.rs runs BambuStudio --help with Command::output() and no time limit. If that process never ends, the slice never starts, and the agent's turn shows "Working…" with no end and no error.

It happened twice on the Mac mini during #201's signed cube run (builds 361b3c5 and 05144bd). macOS held the --help launch behind a "BambuStudio.app is damaged and can't be opened" prompt. That copy of Bambu Studio verifies with codesign --verify --deep --strict and passes spctl from a shell. The prompt shows only when the signed app launches it. The turn waited 20 minutes each time, until the prompt was cancelled by hand.

The prompt itself comes from how that copy was installed on the mini, by ditto from another Mac. The hang without an end is the app's own bug. Any held or hung --help, for example behind a Gatekeeper or permission prompt, stops the turn with no word to the person.

Fix

Give the version check a time limit, for example 15 s. When it passes, kill the process and fail the slice with a plain error: Bambu Studio did not answer, macOS may be asking about it, and to open it once from Applications, then try again.

Test

A Rust test with a fake BambuStudio that sleeps. The check ends at its limit with that error, and leaves no process behind.

Activity

  1. pullfrog commented on Nov 8, 2026

    @pullfrog

    detect_version currently collapses every probe failure into None, so a timeout must be propagated explicitly rather than reported as an unknown or unvalidated version. Discovery probes all candidates, and Settings uses the same path.

    Implementation plan

    1. Replace the unbounded --help wait with a bounded probe (for example, 15 seconds). On timeout, terminate and reap the child; handle captured output without allowing full pipes or inherited descriptors to defeat the deadline. Preserve the private scratch directory and relative executable support.
    2. Carry a distinct timeout error through chosen paths, environment overrides, discovery, slicing, and Settings. In discovery, retain the ability to select a later validated candidate; if none succeeds, surface the timeout with actionable guidance, including the macOS prompt possibility.
    3. Add fast deterministic tests using a short injected deadline and a hanging fake executable. Assert bounded completion, process cleanup, and the surfaced error for slicing/discovery and Settings; retain successful version parsing and scratch isolation coverage.

    Related: #39 established the probe's scratch directory requirement; #208 concerns a separate readiness check that misreports a timeout.

    Pullfrog  | Implement a fix ➔ | View workflow run | via Pullfrog | Using gpt-6.1-terra | 𝕏

  2. added
    bugSomething isn't working
    rustPull requests that update rust code
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrustPull requests that update rust code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions