Skip to content

v2.1.0-beta.3

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 03 Jun 16:43
· 243 commits to main since this release

v2.1.0-beta.3

Third public preview of the 2.1 line. Stability focus on top of
beta.2: one critical crash fix in the Bonjour-based
network connection, plus a MachOSwiftSection bump that picks up an
SwiftUI-related opaque-type parsing fix. Everything else carries over
from beta.2 unchanged.

This is a beta build — only clients that opted in via
Settings → Updates → Include pre-release versions receive it.


Bug Fixes

Crash on Bonjour-routed peers under batched receives

Inspecting an iOS / visionOS / Apple TV target over Bonjour, or pushing a
batch-export through a Bonjour connection, could crash with
EXC_BAD_ACCESS once a single NWConnection.receive carried more than a
few dozen small frames (heartbeats, acks, or export chunks). The crash hit
the connection's dispatch-queue worker thread with a 13_000+ frame stack
overflow.

Two compounding factors fed the overflow on this code path:

  1. RuntimeMessageChannel's message-dispatch loop accessed two
    @Mutex-decorated properties (receivedDataContinuation,
    onMessageReceived) on every iteration. The macro-generated _modify
    coroutine accessor pinned ~280 bytes of coroutine context on the caller's
    frame per access and the frames did not unwind between iterations.

  2. RuntimeNetworkConnection.observeIncomingMessages spawned a fresh
    Task { await handleReceivedMessage(data) } for each message inside that
    same loop, adding another ~10 frames per iteration on top of (1).

The fix:

  • The dispatch loop now snapshots both properties into locals before the hot
    loop, so each iteration only touches local variables and the _modify
    coroutine frames no longer accumulate.
  • RuntimeNetworkConnection now matches RuntimeLocalSocketConnection and
    RuntimeDirectTCPConnection: the callback only does a non-blocking
    yield into an unbounded AsyncStream<Data>, and one long-lived consumer
    task drains it. Early messages yielded before the consumer task reaches
    for await are buffered, preserving FIFO across the entire receive burst.

Regression tests cover a 10k-message burst delivered from a dispatch queue
plus a disabled reproducer that replays the pre-fix per-message-Task shape
for manual verification.

Cross-image opaque-type parsing crash (via MachOSwiftSection 0.12.0-beta.3)

Bumps MachOSwiftSection to 0.12.0-beta.3, which fixes a crash when an
indexed image references a Swift opaque-return type whose underlying
descriptor lives in a sibling loaded image — e.g. SwiftUI body code that
resolves View.searchFieldStyle(_:) against DVTUserInterfaceKit. Before
the bump, the MachOContext<MachOImage> decoder treated the symbolic
reference offset as in-image and walked off into __PAGEZERO. The decoder
now mirrors the Swift runtime and resolves the descriptor through the
in-process pointer scheme, making cross-image references transparent.

The same MachOSwiftSection bump also brings:

  • SymbolIndexStore self-cleanup — short-lived indexers now release their
    cache entry on deinit instead of leaking it for the full process
    lifetime.
  • SharedCache management API — contains / remove / removeAll
    let holders explicitly tear down cache entries on disposal.
  • Internal refactors that fold GenericContext initialisers onto the
    unified ReadingContext path, fixing a latent negative-size bug in the
    legacy in-process decoder.

Carried Over From beta.2

All features from v2.1.0-beta.2 ship unchanged: the
Inspector Relationships tab, the Batch Export flow under File →
Export Multiple Images…
, selection history in the toolbar, and the
underlying communication-layer hardening.