macOS app crashes on thread 1: com.apple.root.utility-qos

Hi, I'm having an issue with an app written in Swift on Xcode. This app implements an AVKit player for playing HLS audio/video streams, and the player opens as soon as I click the button for the TV channel I want to watch. When I debug the app from Xcode, everything works perfectly and the player opens without any issues. However, when I distribute the app via “Archive,” the initial interface with the buttons is displayed correctly, and the audio-only streams are played (with a reduced player). But as soon as I click on an HLS audio/video stream, the app crashes.

Here is the crash log:

Crashed Thread:        1  Dispatch queue: com.apple.root.utility-qos
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   TVStreamsApp [42052]

[...]

Thread 1 Crashed::  Dispatch queue: com.apple.root.utility-qos

0   libsystem_kernel.dylib        	       0x19f62ea60 __pthread_kill + 8

1   libsystem_pthread.dylib       	       0x19f666c20 pthread_kill + 288

2   libsystem_c.dylib             	       0x19f573a30 abort + 180

3   libswiftCore.dylib            	       0x1af6d99f4 swift::fatalErrorv(unsigned int, char const*, char*) + 128

4   libswiftCore.dylib            	       0x1af6d9a14 swift::fatalError(unsigned int, char const*, ...) + 32

5   libswiftCore.dylib            	       0x1af6ed22c getSuperclassMetadata + 816

6   libswiftCore.dylib            	       0x1af6ed4c4 _swift_initClassMetadataImpl(swift::TargetClassMetadata<swift::InProcess, swift::TargetAnyClassMetadataObjCInterop<swift::InProcess>>*, swift::ClassLayoutFlags, unsigned long, swift::TypeLayout const* const*, unsigned long*, bool) + 84

7   _AVKit_SwiftUI                	       0x235cabea0 0x235ca7000 + 20128

8   libswiftCore.dylib            	       0x1af6f9cac swift::MetadataCacheEntryBase<(anonymous namespace)::GenericCacheEntry, void const*>::doInitialization(swift::MetadataWaitQueue::Worker&, swift::MetadataRequest) + 772

9   libswiftCore.dylib            	       0x1af6e8dc4 _swift_getGenericMetadata(swift::MetadataRequest, void const* const*, swift::TargetTypeContextDescriptor<swift::InProcess> const*) + 2744

10  _AVKit_SwiftUI                	       0x235cabe14 __swift_instantiateGenericMetadata + 36

Thanks in advance for your help!

macOS app crashes on thread 1: com.apple.root.utility-qos
 
 
Q