Bugs

Crash with Auto Video Recording on iOS 27

6d agoPending

iOS SDK 17.2.5: app crashes (SIGTRAP in CFRelease inside RPScreenRecorder capture handler) when isAutoVideoRecordingEnabled = true on iOS 27.0.1

SDK: shake-ios 17.2.5 (Swift Package Manager)

Configuration (QA builds only):

```swift

Shake.configuration.isAutoVideoRecordingEnabled = true

Shake.configuration.isInvokedByScreenshot = true

Shake.configuration.isInvokedByShakeDeviceEvent = true

Shake.configuration.isBlackBoxEnabled = true

Shake.configuration.isActivityHistoryEnabled = true

Shake.configuration.isSensitiveDataRedactionEnabled = true

Shake.configuration.isCrashReportingEnabled = true

Shake.start(apiKey: ...)

```

Our Development and Production builds use the same SDK with isAutoVideoRecordingEnabled = false. We have no reports of this crash from those builds.

What happens: after the app stays in the foreground for a long time (20–60 minutes), it terminates with EXC_CRASH (SIGTRAP). Three crash reports from TestFlight have the same pattern:

| Date (UTC) | Uptime before crash |

| --- | --- | --- |

| 2026-10-26 04:43 | 57 min |

| 2026-10-26 10:56 | 27 min |

| 2026-11-30 05:05 | 21 min |

In all three reports, a background thread is stopped in the CFRelease crash trap (CFRelease.cold.2, which is how CFRelease(NULL) or an over-release fails). It is called from ReplayKit's sample capture block:

```text

0 CoreFoundation CFRelease.cold.2 + 16

1 CoreFoundation CFRelease + 332

2 ReplayKit __56-[RPScreenRecorder captureHandlerWithSample:timingData:]_block_invoke + 148

3 libdispatch dispatchcall_block_and_release + 32

...

```

The thread that the report marks as crashed (Thread 0) is different each time. On build 147 it is in AnimationKit (InProcessAnimationManager.dispatchAsyncOntoMainBeforeExit → Array.append → swift_arrayInitWithCopy). On build 327 it is in Sentry's SentryApplication.internal_getWindows(). On build 324 it is idle in __CFRunLoopServiceMachPort. Thread 0 is idle in one case, so we think the real trap is the ReplayKit CFRelease thread. The only part of our app that starts RPScreenRecorder capture is Shake auto video recording.

Shake's own threads are present in all three reports (SHKCrashMonitor_MachException.c, SHKCrashCachedData.c). On build 124 there are also -[SHKBlackBox reportDataEveryTwoSecond] → -[SHKConnection getWiFiNetworkName] and -[SHKSqliteDatabase pushBlackBoxRecord:] running at the same time.

Questions:

1. Is this a known issue with auto video recording (ReplayKit in-app capture) on iOS 27?

2. Does 18.0.0 or 18.1.0 fix it? The release notes do not mention it.

3. Is there a workaround, other than turning off isAutoVideoRecordingEnabled, that keeps auto video recording for our QA testers?

0 comments