Skip to content

[Rust API] BackgroundTask progress text and cancellation not working in headless mode #6864

Open
@saruman9

Description

@saruman9

Version and Platform (required):

  • Binary Ninja Version: 5.0.7290-stable
  • Edition: Commercial
  • OS: macOS
  • OS Version: 14.5
  • CPU Architecture: Apple M-series (ARM64)

Bug Description:
I'm using the Rust API to create a long-running analysis task. In GUI mode, everything works as expected:

  • The progress text is shown correctly.
  • I can cancel the task via the UI, and is_cancelled() reflects the cancellation.

However, in headless mode:

  1. Progress text is not displayed at all, even though I call set_progress_text().
  2. The cancellation check via is_cancelled() never returns true — even when I interrupt execution (e.g., via Ctrl-C), the task continues running until completion.

Relevant parts of the API:

Expected Behavior:
I expected to see progress text printed to the console and to be able to interrupt the analysis with Ctrl-C (or any other cancellation mechanism supported by BackgroundTask in headless mode).

Screenshots/Video Recording:
N/A

Binary:
Not applicable

Additional Information:
Should I be manually handling cancellation signals and progress output in headless mode, instead of relying on BackgroundTask? If so, what’s the recommended way to report progress and support user cancellation in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Rust APIIssue needs changes to the Rust APIEffort: LowIssue should take < 1 weekImpact: LowIssue is a papercut or has a good, supported workaround

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions