Blocking the main thread when calling the pause method of AVPlayer.

Basic

  • iPhone 11
  • iOS 17.5.1

Main Thread

  1. libsystem_kernel.dylib___ulock_wait (in libsystem_kernel.dylib) +8
  2. libdispatch.dylib__dlock_wait (in libdispatch.dylib) +52
  3. libdispatch.dylib__dispatch_thread_event_wait_slow (in libdispatch.dylib) +52
  4. libdispatch.dylib___DISPATCH_WAIT_FOR_QUEUE__ (in libdispatch.dylib) +364
  5. libdispatch.dylib__dispatch_sync_f_slow (in libdispatch.dylib) +144
  6. MediaToolbox_fpic_CopyCurrentEvent (in MediaToolbox) +132
  7. AVFCore___104-[AVPlayer _setRate:withVolumeRampDuration:playImmediately:rateChangeReason:affectsCoordinatedPlayback:]_block_invoke_2 (in AVFCore) +244
  8. AVFCore-[AVPlayer _setRate:withVolumeRampDuration:playImmediately:rateChangeReason:affectsCoordinatedPlayback:] (in AVFCore) +276
  9. AVFCore-[AVPlayer setRate:] (in AVFCore) +56
  10. call AVPlayer pause

Thread 81 name: fpic-sync

  1. libsystem_kernel.dylib___ulock_wait (in libsystem_kernel.dylib) +8
  2. libdispatch.dylib__dlock_wait (in libdispatch.dylib) +52
  3. libdispatch.dylib__dispatch_thread_event_wait_slow (in libdispatch.dylib) +52
  4. libdispatch.dylib___DISPATCH_WAIT_FOR_QUEUE__ (in libdispatch.dylib) +364
  5. libdispatch.dylib__dispatch_sync_f_slow (in libdispatch.dylib) +144
  6. MediaToolbox_itemasync_CopyProperty (in MediaToolbox) +588
  7. MediaToolbox_fpic_CurrentItemMoment (in MediaToolbox) +184
  8. MediaToolbox___fpic_EstablishCurrentEventForCurrentItem_block_invoke (in MediaToolbox) +136
  9. libdispatch.dylib__dispatch_client_callout (in libdispatch.dylib) +16
  10. libdispatch.dylib__dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib) +52
  11. MediaToolbox_fpic_ServiceCurrentEvent (in MediaToolbox) +600
  12. MediaToolbox___fpic_NotifyServiceCurrentEvent_block_invoke (in MediaToolbox) +912
  13. libdispatch.dylib__dispatch_call_block_and_release (in libdispatch.dylib) +28
  14. libdispatch.dylib__dispatch_client_callout (in libdispatch.dylib) +16
  15. libdispatch.dylib__dispatch_lane_serial_drain (in libdispatch.dylib) +744
  16. libdispatch.dylib__dispatch_lane_invoke (in libdispatch.dylib) +428
  17. libdispatch.dylib__dispatch_root_queue_drain (in libdispatch.dylib) +388
  18. libdispatch.dylib__dispatch_worker_thread (in libdispatch.dylib) +256
  19. libsystem_pthread.dylib__pthread_start (in libsystem_pthread.dylib) +132
  20. libsystem_pthread.dylib_thread_start (in libsystem_pthread.dylib) +4

Thread 93 name: com.apple.coremedia.player.async.0x303c60240.P/GR

  1. libsystem_kernel.dylib_mach_msg2_trap (in libsystem_kernel.dylib) +8
  2. libsystem_kernel.dylib_mach_msg2_internal (in libsystem_kernel.dylib) +76
  3. libsystem_kernel.dylib_mach_msg_overwrite (in libsystem_kernel.dylib) +432
  4. libsystem_kernel.dylib_mach_msg (in libsystem_kernel.dylib) +20
  5. libdispatch.dylib__dispatch_mach_send_and_wait_for_reply (in libdispatch.dylib) +540
  6. libdispatch.dylib_dispatch_mach_send_with_result_and_wait_for_reply (in libdispatch.dylib) +56
  7. libxpc.dylib_xpc_connection_send_message_with_reply_sync (in libxpc.dylib) +260
  8. CoreMedia_FigXPCConnectionSendSyncMessageCreatingReply (in CoreMedia) +288
  9. CoreMedia_FigXPCRemoteClientSendSyncMessageCreatingReply (in CoreMedia) +44
  10. MediaToolbox_remoteXPCPlayer_SetRateWithOptions (in MediaToolbox) +148
  11. MediaToolbox_playerasync_runOneCommand (in MediaToolbox) +768
  12. MediaToolbox_playerasync_runAsynchronousCommandOnQueue (in MediaToolbox) +180
  13. libdispatch.dylib__dispatch_client_callout (in libdispatch.dylib) +16
  14. libdispatch.dylib__dispatch_lane_serial_drain (in libdispatch.dylib) +744
  15. libdispatch.dylib__dispatch_lane_invoke (in libdispatch.dylib) +428
  16. libdispatch.dylib__dispatch_root_queue_drain (in libdispatch.dylib) +388
  17. libdispatch.dylib__dispatch_worker_thread (in libdispatch.dylib) +256
  18. libsystem_pthread.dylib__pthread_start (in libsystem_pthread.dylib) +132
  19. libsystem_pthread.dylib_thread_start (in libsystem_pthread.dylib) +4

The distribution of device models and os for this issue is as follows:

Blocking the main thread when calling the pause method of AVPlayer.
 
 
Q