Skip to content

orb delete <machine ID> panics with nil pointer dereference; deleting by name works #2712

Description

@InSuperposition

Describe the bug

orb delete documents its argument as [ID/NAME]..., but passing a
machine's ID crashes the CLI with a nil pointer dereference in
scon/cmd/scli/cmd/delete.go:141. The command exits with code 2 and the
machine is not deleted. Passing the machine's name works.

panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x102573828]

goroutine 1 [running]:
github.com/orbstack/macvirt/vmgr/util/errorx.RecoverCLI(0x1)
	github.com/orbstack/macvirt/vmgr@v0.0.0-00010101000000-000000000000/util/errorx/errorx.go:30 +0x7c
panic({0x102cb3a60?, 0x102e26d50?})
	runtime/panic.go:860 +0x100
github.com/orbstack/macvirt/scon/cmd/scli/cmd.init.func47(0x102e42780, {0x2469e9039700, 0x1, 0x1026aff03?})
	github.com/orbstack/macvirt/scon/cmd/scli/cmd/delete.go:141 +0x868
github.com/spf13/cobra.(*Command).execute(0x102e42780, {0x2469e90396c0, 0x2, 0x2})
	github.com/spf13/cobra@v1.9.1/command.go:1015 +0x814
github.com/spf13/cobra.(*Command).ExecuteC(0x102e3d240)
	github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/orbstack/macvirt/scon/cmd/scli/cmd.Execute(...)
	github.com/orbstack/macvirt/scon/cmd/scli/cmd/root.go:73
main.runCtl(0xe8?)
	github.com/orbstack/macvirt/scon/cmd/scli/main.go:144 +0x1bc
main.main()
	github.com/orbstack/macvirt/scon/cmd/scli/main.go:45 +0x84

To Reproduce

orb create --arch arm64 ubuntu:resolute delete-test-a
orb create --arch arm64 ubuntu:resolute delete-test-b

orb delete -f delete-test-a                  # by name: exits 0, machine deleted
orb info delete-test-b                       # note the machine ID, e.g. 01M36DZYG0SWC1GAVAB87ATFZQ
orb delete -f 01M36DZYG0SWC1GAVAB87ATFZQ     # by ID: panics, exit code 2
orb list                                     # delete-test-b still exists
orb delete -f delete-test-b                  # by name: works

Expected behavior

orb delete <ID> deletes the machine, the same as orb delete <name>,
as orb delete --help documents ([ID/NAME]...). If an ID cannot be
resolved, the CLI prints an error instead of panicking.

Diagnostic report (REQUIRED)

OrbStack info:
  Version: 2.2.3
  Commit: c83556b0ef8f1ba9a33abbb194622b6b7a1c0307 (v2.2.3)

System info:
  macOS: 26.6.2 (25G83)
  CPU: arm64, 12 cores
  CPU model: Apple M4 Pro
  Model: Mac16,11
  Memory: 24 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2026-09-25T11-36-20.515626Z.zip

Screenshots and additional context (optional)

  • OrbStack 2.2.3 (2020300), macOS 26.6.2, Apple Silicon (arm64).
  • Reproduced 2026-09-23 and again 2026-09-25 on the same version. The crash
    happens before deletion completes, so the machine is left intact.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions