Skip to content

Package no longer builds on Xcode 26.3 (Swift 6.2.4) from 7.43.0: sending 'codecpar' risks causing data races in the undecodable-format gate #883

Closed

Description

@akhanwav

What happened?

Every release from 7.43.0 through 7.47.0 fails to compile on Xcode 26.3 (17C529, Swift 6.2.4). 7.42.0 is the last release that builds; it is what we pin until we move to Xcode 27.

7.43.0 to 7.46.0 fail in one place, the forcesSoftware closure AE#348 added beside the pre-flight gate:

Sources/AetherEngine/AetherEngine.swift:5339:87: error: sending 'codecpar' risks causing data races
                   canHardwareDecode: { VTCapabilityProbe.canHardwareDecode(codecpar: codecpar) })
note: task-isolated 'codecpar' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses

(5300:87 in 7.43.0, 5339:87 in 7.45.0, 5343:87 in 7.46.0.) let forcesSoftware = { … } is inferred main-actor and captures the codecpar pointer bound in the if let above it.

7.47.0 also fails earlier, in the new stereo code:

Sources/AetherEngine/Video/StereoVideoSignal.swift:120:75: error: cannot convert value of type 'Int' to expected element type 'Array<UInt8>.ArrayLiteralElement' (aka 'UInt8')
        let stri = box("stri", [0, 0, 0, 0, (packing.reversed ? 0x08 : 0) | 0x03])

Swift 6.2.4 types (… ? 0x08 : 0) | 0x03 as Int; Xcode 27 evidently infers UInt8 from the literal's context. The build stops on that file, so 7.47.0 may also carry the codecpar error.

Possible fixes, if Xcode 26 is still meant to be supported (7.38.1's notes suggest it is):

  • canHardwareDecode: make the local closure nonisolated, or call the probe directly instead of capturing codecpar in a stored closure.
  • viewPackingBox: UInt8(packing.reversed ? 0x08 : 0) | 0x03.

Steps to reproduce

  1. Xcode 26.3 (17C529), tvOS 26.2 SDK.
  2. In a checkout of tag 7.43.0 (or later): xcodebuild -scheme AetherEngine -destination 'generic/platform=tvOS' build
  3. 7.42.0 builds the same way; 7.43.0 to 7.47.0 fail.

AetherEngine version or commit SHA

7.43.0 through 7.47.0 (7.42.0 builds)

Host app

Custom / my own integration (Rivulet)

Platform

tvOS

OS version

Build host: macOS 15, Xcode 26.3 (17C529), Swift 6.2.4

Device / chip

Build failure (no device); Mac with Apple silicon

Playback path

Not sure / not a playback bug

Error codes / log lines

As above.

Activity

  1. superuser404notfound commented on Oct 26, 2026

    @superuser404notfound
    Owner

    Thanks for the precise report, both suggested fixes were right.

    Fixed on main in fa8cc48. Checking it on Xcode 26.3 (Swift 6.2.4) turned up a third failure that came in with 7.48.0, so there were three in total:

    • canHardwareDecode / codecpar (7.43.0 onward): the stored forcesSoftware closure is gone. The gate is now called in place at both sites with a non-escaping closure, so nothing is sent.
    • StereoVideoSignal stri box (7.47.0): UInt8(packing.reversed ? 0x08 : 0) | 0x03.
    • DASHVirtualMP4 sidx payload (7.48.0): a + chain of byte arrays that Swift 6.2's type checker gave up on. It is now built with one append per field.

    None of these change behavior. xcodebuild -scheme AetherEngine succeeds for generic/platform=tvOS and generic/platform=iOS on GitHub's macos-15 image with Xcode 26.3 (17C529), Swift 6.2.4, and the full suite still passes on Xcode 27.

    The fix will ship in the next release. One caveat: CI only builds with Xcode 27 (see the README's toolchain table), so Xcode 26 compatibility is best effort and a later release could break it again. I'll leave this open until it builds in your setup.

  2. superuser404notfound commented on Oct 27, 2026

    @superuser404notfound
    Owner

    Released in 7.49.0: the package builds on Xcode 26.3 (Swift 6.2.4) again (fa8cc48). That fix was checked with xcodebuild for tvOS and iOS on GitHub's macos-15 image (Xcode 26.3); the regular CI runs on Xcode 27, so a build report from your setup would still be welcome.

  3. akhanwav commented on Oct 28, 2026

    @akhanwav
    Author

    Confirmed: Rivulet builds with 7.49.0 on Xcode 26.3 (17C529, Swift 6.2.4) for tvOS, with no errors or warnings from the package. Thanks for fixing all three sites. Fine to close from my side.

  4. superuser404notfound commented on Oct 29, 2026

    @superuser404notfound
    Owner

    Thanks for confirming on Xcode 26.3, closing. If a later release breaks the Xcode 26 build again, a new issue with the error output is welcome.

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