app crashed _CFRelease.cold.1

In my app, I implemented a screen recording functionality. But there was an unexpected crash.

0
CoreFoundation
_CFRelease.cold.1 + 16
1
CoreFoundation
___CFTypeCollectionRelease
2
ReplayKit
___56-[RPScreenRecorder captureHandlerWithSample:timingData:]_block_invoke + 148
3
libdispatch.dylib
__dispatch_call_block_and_release + 32
4
libdispatch.dylib
__dispatch_client_callout + 16
5
libdispatch.dylib
__dispatch_lane_serial_drain + 740
6
libdispatch.dylib
__dispatch_lane_invoke + 388
7
libdispatch.dylib
__dispatch_root_queue_drain_deferred_wlh + 292
8
libdispatch.dylib
__dispatch_workloop_worker_thread + 540
9
libsystem_pthread.dylib
__pthread_wqthread + 292
Answered by DTS Engineer in 838580022

Crashes in CFRelease are almost always due to memory management problems. I recommend that you apply the standard memory debugging tools to see if they offer any insight into the issue.

If not, please capture a crash report and post it here. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Crashes in CFRelease are almost always due to memory management problems. I recommend that you apply the standard memory debugging tools to see if they offer any insight into the issue.

If not, please capture a crash report and post it here. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

this method … is a iOS private api, so I think it should be a problem in the iOS.

That’s certainly possible, but it’s just as likely that your code has a memory management problem that’s affecting some unrelated code. Again, the standard memory debugging tools should help you isolate this issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@gemdama @DTS Engineer same case,Is there a solution?

Is there a solution?

If this is a memory management issue then there are a wide variety of potential causes, meaning there’s no guarantee that the root cause of gemdama’s problem is same root cause of whatever problem you’re seeing. I recommend taht you work through the steps in my initial response.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

app crashed _CFRelease.cold.1
 
 
Q