FamilyActivityPicker Crash on selecting some items

Both view and modifier versions of the FamilyActivityPicker crash randomly when selecting some items (usually the other option) throwing these in the console:

[com.apple.FamilyControls.ActivityPickerExtension(1150.1)] Connection to plugin invalidated while in use
AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:22091 (
	0   AXRuntime                           0x00000001c603b0fc _AXGetPortFromCache + 800
	1   AXRuntime                           0x00000001c603cce0 AXUIElementPerformFencedActionWithValue + 700
	2   UIKit                               0x0000000230de3ec8 DDE6E0C5-2AC3-3C73-8CFE-BC88DE35BB5F + 1453768
	3   libdispatch.dylib                   0x0000000103ef0b98 _dispatch_call_block_and_release + 32
	4   libdispatch.dylib                   0x0000000103ef27bc _dispatch_client_callout + 20
	5   libdispatch.dylib                   0x0000000103efa66c _dispatch_lane_serial_drain + 832
	6   libdispatch.dylib                   0x0000000103efb408 _dispatch_lane_invoke + 408
	7   libdispatch.dylib                   0x0000000103f08404 _dispatch_root_queue_drain_deferred_wlh + 328
	8   libdispatch.dylib                   0x0000000103f07a38 _dispatch_workloop_worker_thread + 444
	9   libsystem_pthread.dylib             0x00000001f0824f20 _pthread_wqthread + 288
	10  libsystem_pthread.dylib             0x00000001f0824fc0 start_wqthread + 8
) 

This also happens in production apps like the Opal.

The questions are:

  1. At least how to detect it to be able to manually reload the sheet (like what Opal does and shows an alert when this happens)
  2. How to prevent it in the first place?

I really appreciate any help you can provide.

Hey ! I invite you to open a bug report if you can, mentioning FB11400221 ... we opened it almost 2 years ago with no answers ^^'

There is no official way to detect the crash and reload the view, but you can do it using side roads like introspection

Good luck !

Linked the feedback mentioned and here's mine FB11442734

I also filed a bug report (FB13551195) a few months ago.

Can an Apple engineer update us on this problem? Was it improved in iOS 18?

I can still reproduce this on iOS 17.5.1. Filed a feedback with instructions how to reproduce, sample code, video recording and sysdiagnose.

FB14451403

FamilyActivityPicker Crash on selecting some items
 
 
Q