You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I encounter some random crashes of my camera app. After some investigations, I found that it's terminated by the system and the crash log did be generated but the information is not quite useful, and here is the log found via the Console app.
Termination & Crash log
"Camera not actively used; AVCaptureEventInteraction not installed":
Received termination request from [osservice<com.apple.SpringBoard>:10931] on <RBSProcessPredicate <RBSProcessInstancePredicate| [app<com.juniperphoton.PhotonCam]>> with context <RBSTerminateContext| explanation:Capture Application Requirements Unmet: "Camera not actively used; AVCaptureEventInteraction not installed" reportType:CrashLog maxTerminationResistance:Interactive>
The crash log exported from the device will have some common information like:
It's a EXC_CRASH (SIGKILL) type with no termination reason.
Thread 0 crashed with ARM Thread State (64-bit):
...
far: 0x0000000000000000 esr: 0x56000080 Address size fault
I have once tried to reproduce this issue when the app is attached with debugger, and it says:
Terminated due to signal 9
When the crash or termination happened, the app:
No AVCaptureSession is running.
The app is in the foreground and users are interacting with some functions like viewing photos or editing photos in the app. When users exit the camera view, like entering the gallery or settings, the camera session will be stopped.
Both TestFlight and Debug build will have the same issue.
No 3rd party crash reporter is installed(I deliberately disable it in Debug build and TestFlight build)
It has adopted the LockedCameraCapture, but current it's running on the main app target(if not, my app will have a button of unlock, so I can confirm about this).
Also, when it comes to the memory consumption, there is no JetsamEvent around the crash time.
Device and app information
Additionally, some information about the tech stack and the current state of my device and my app:
iPhone 16 Pro with iOS 18.2 Beta 3.
The app is a camera based app(it's PhotonCam and you can find it on the App Store), its main functionality is the camera feature using AVFoundation + Core Image + Metal to deliver camera functionality.
It has adopted the Camera Control, AVCaptureEventInteraction and LockedCameraCapture features.
If I remember it right, it occurs in iOS 18.1 Release build, but currently I have no such device to confirm. But in iOS 17.x the issue has never happened.
Regarding to this termination, on top of my head is the "watchdog" mechanism that will terminate the process that is running on the LockedCameraCapture feature. However I can make sure that currently the app is running as the main target on the home screen.
Reproduction
I have already found the way to reproduce this issue:
Enter some pages on your app that don't access the camera, like the settings page or gallery page.
Put the app in the background, and launch it using the Camera Control.
After launching the app, the app will still stay in the last page that doesn't use camera.
Wait for a few seconds and the app will be terminated with the log:
"Camera not actively used; AVCaptureEventInteraction not installed":
Received termination request from [osservice<com.apple.SpringBoard>:10931] on <RBSProcessPredicate <RBSProcessInstancePredicate| [app<com.juniperphoton.PhotonCam]>> with context <RBSTerminateContext| explanation:Capture Application Requirements Unmet: "Camera not actively used; AVCaptureEventInteraction not installed" reportType:CrashLog maxTerminationResistance:Interactive>
Unlike the LockedCameraCapture, which requires to access the camera and I can understand. But launching the app via Camera Control when the device is unlocked doesn’t have to use the camera feature.
I have created a minimal demo to reproduce this issue.
Details
Description
I also created a post in the forum: https://developer.apple.com/forums/thread/769024#769024021
Hi. I encounter some random crashes of my camera app. After some investigations, I found that it's terminated by the system and the crash log did be generated but the information is not quite useful, and here is the log found via the Console app.
Termination & Crash log
"Camera not actively used; AVCaptureEventInteraction not installed":
It's a EXC_CRASH (SIGKILL) type with no termination reason.
It's triggered by the main thread, but it seems to be waiting for an event to process.
Address size fault on the main thread
I have once tried to reproduce this issue when the app is attached with debugger, and it says:
When the crash or termination happened, the app:
No 3rd party crash reporter is installed(I deliberately disable it in Debug build and TestFlight build)
Device and app information
Additionally, some information about the tech stack and the current state of my device and my app:
Reproduction
I have already found the way to reproduce this issue:
"Camera not actively used; AVCaptureEventInteraction not installed":
Unlike the LockedCameraCapture, which requires to access the camera and I can understand. But launching the app via Camera Control when the device is unlocked doesn’t have to use the camera feature.
I have created a minimal demo to reproduce this issue.
Files
LockedCameraCaptureExtensionDemo.zip
The text was updated successfully, but these errors were encountered: