app crashes
Thanks to the developer for providing a great lib. I have integrated this lib into my own project. In xcode, I use the "run" function to install it on the real machine without any problem. However, in order to publish to testflight, I use "Product -> Archive", and then install it on the real machine in testflight, the program will crash immediately. I tried TikTok-Example and encountered the same problem. If I use "Archive", do I need some separate configuration?
Device: iPhone 14pm System: iOS17.3 xcode: Version 15.0.1 (15A507) macOS: 14.1.1 (23B81)
The code in question:
Here is the complete log: `Incident Identifier: FF8B58A0-9DEC-4151-B43B-58D5720FE2ED Hardware Model: iPhone15,3 Process: TikTok-Example [2019] Path: /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/TikTok-Example Identifier: ai.test Version: 1.0 (1) AppStoreTools: 15C5500a AppVariant: 1:iPhone15,3:17 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: ai.test [1449]
Date/Time: 2024-01-29 02:22:00.4195 +0800 Launch Time: 2024-01-29 02:22:00.3323 +0800 OS Version: iPhone OS 17.3 (21D50) Release Type: User Baseband Version: 2.20.06 Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes: 0x0000000000000001, 0x0000000000000000
VM Region Info: 0 is not in any region. Bytes before following region: 4366647296
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 10445c000-104464000 [ 32K] r-x/r-x SM=COW ...ikTok-Example
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [2019]
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 ??? 0x0000000000000000 0x0 + 0
1 VideoPlayerContainer 0x00000001044f7bc4 specialized HStack.init(alignment:spacing:content:) + 12 (
Thread 1 name: Thread 1: 0 CoreFoundation 0x00000001944a5044 -[__NSDictionaryI objectForKey:] + 0 (NSDictionaryI.m:52) 1 MediaAccessibility 0x00000001c50abd18 MAPreferencesCopyProfileValue + 184 (MAPreferences.c:381) 2 MediaAccessibility 0x00000001c50abbc4 MAPreferencesCopyProfileValueWithExpectedType + 32 (MAPreferences.c:441) 3 MediaAccessibility 0x00000001c50abb1c MACaptionAppearancePrefCopyActiveProfileID + 232 (MACaptionAppearancePref.c:569) 4 MediaAccessibility 0x00000001c50ac99c _copyValue + 60 (MACaptionAppearance.c:266) 5 MediaAccessibility 0x00000001c50acf78 MACaptionAppearanceGetForegroundOpacity + 72 (MACaptionAppearance.c:400) 6 MediaToolbox 0x00000001a551d574 mediaAccessibilityDidChangeDoAsync + 168 (FigCaptionRendererMACache.c:233) 7 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 8 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 9 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 10 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 11 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 12 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 13 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 2 name: Thread 2: 0 libsystem_kernel.dylib 0x00000001dbc2ebc8 __open + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001dbc2ebb4 open + 40 (open-base.c:101) 2 libFontParser.dylib 0x00000001c10fcb94 TFileDataReference::Map(char const*) + 72 (FileDataReference.cpp:662) 3 libFontParser.dylib 0x00000001c10fce08 TFileDataSurrogate::TFileDataSurrogate(char const*, timespec) + 328 (FileDataReference.cpp:681) 4 libFontParser.dylib 0x00000001c114da78 TFont::CreateFontEntitiesForFile(char const*, timespec, bool, short, char const*) + 496 (Font.cpp:819) 5 libFontParser.dylib 0x00000001c1154f6c FPFontCreateWithPathAndName + 380 (FontParser.cpp:2678) 6 CoreGraphics 0x0000000196086b84 create_private_data_with_path_and_name + 20 (xt-vtable.c:181) 7 CoreGraphics 0x0000000196086b48 CGFontCreateWithPathAndName + 64 (CGFontCreate.c:295) 8 CoreText 0x0000000195e7c064 CreateFontWithFontURL(__CFURL const*, __CFString const*, __CFString const*) + 76 (TCGUtilities.cpp:91) 9 CoreText 0x0000000195e7b508 TCGFontCache::CopyFont(__CFURL const*, __CFString const*, __CFString const*) + 144 (TCGFontCache.cpp:30) 10 CoreText 0x0000000195e7b23c TBaseFont::CopyNativeFont() const + 232 (TBaseFont.cpp:5595) 11 CoreText 0x0000000195e763b8 TDescriptorSource::CopyDescriptor(__CFURL const*, __CFString const*, __CFString const*) const + 200 (TDescriptorSource.cpp:697) 12 CoreText 0x0000000195ea3a7c TDescriptorSource::CopyFontDescriptorPerPostScriptName(__CFString const*, unsigned long, unsigned long, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean ... + 1560 (TDescriptorSource.cpp:2882) 13 CoreText 0x0000000195e64804 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const + 1456 (TDescriptor.cpp:810) 14 CoreText 0x0000000195e67384 TDescriptor::CreateMatchingDescriptor(__CFSet const*, double, unsigned long) const + 248 (TDescriptor.cpp:908) 15 CoreText 0x0000000195eaaf98 CTFontDescriptorCreateMatchingFontDescriptor + 48 (CTFontDescriptor.cpp:124) 16 MediaAccessibility 0x00000001c50ac4c0 MAUtilitiesCreateCTFontDescriptorWithName + 228 (MAUtilities.c:411) 17 MediaAccessibility 0x00000001c50ac2f0 MAPreferencesCopyProfileFontDescriptor + 56 (MAPreferences.c:645) 18 MediaAccessibility 0x00000001c50abf3c MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 184 (MACaptionAppearance.c:716) 19 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233) 20 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 21 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 22 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 23 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 24 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 25 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 26 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 3 name: Thread 3: 0 dyld 0x00000001b7230000 bool SwiftHashTable::equal<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, SwiftTypeProtocolConformanceLocationKey ... + 0 (OptimizerSwift.cpp:221) 1 dyld 0x00000001b722fd3c unsigned int SwiftHashTable::getIndex<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, unsigned char const*) const + 156 (OptimizerSwift.h:335) 2 dyld 0x00000001b722fc5c unsigned int SwiftHashTable::getPotentialTarget<SwiftTypeProtocolConformanceLocationKey, SwiftTypeProtocolConformanceLocationKey>(SwiftTypeProtocolConformanceLocationKey const&, unsigned char const... + 24 (OptimizerSwift.h:306) 3 dyld 0x00000001b722fad0 dyld4::APIs::_dyld_find_protocol_conformance(void const*, void const*, void const*) const + 172 (DyldAPIs.cpp:2626) 4 libswiftCore.dylib 0x000000018dc540ec swift_conformsToProtocolMaybeInstantiateSuperclasses(swift::TargetMetadataswift::InProcess const*, swift::TargetProtocolDescriptorswift::InProcess const*, bool) + 1828 (ProtocolConformance.cpp:1010) 5 libswiftCore.dylib 0x000000018dc5296c swift_conformsToProtocol + 156 (CompatibilityOverrideRuntime.def:169) 6 AttributeGraph 0x00000001bc6975e4 AG::LayoutDescriptor::make_layout(AG::swift::metadata const*, AGComparisonMode, AG::LayoutDescriptor::HeapMode) + 184 (ag-value.cc:1543) 7 AttributeGraph 0x00000001bc69ad68 AG::(anonymous namespace)::TypeDescriptorCache::drain_queue(void*) + 360 (ag-value.cc:1700) 8 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 9 libdispatch.dylib 0x000000019c4afdbc _dispatch_root_queue_drain + 864 (queue.c:7051) 10 libdispatch.dylib 0x000000019c4b03ec _dispatch_worker_thread2 + 156 (queue.c:7119) 11 libsystem_pthread.dylib 0x00000001fe5cf928 _pthread_wqthread + 228 (pthread.c:2642) 12 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 4 name: Thread 4: 0 CoreFoundation 0x00000001944a4e08 _CFStringGetLength2 + 48 (CFString.c:2492) 1 CoreFoundation 0x00000001944a2650 comparisonUsingOrderingForStringKeys + 40 (NSConstantDictionary.m:53) 2 libsystem_c.dylib 0x000000019c4f69a8 bsearch + 68 (bsearch.c:66) 3 CoreFoundation 0x00000001944a25e4 -[NSConstantDictionary objectForKey:] + 384 (NSConstantDictionary.m:172) 4 CoreText 0x0000000195ea496c CopyNormalizedSystemFontPostScriptName(__CFString const*) + 76 (MetadataSupport.cpp:166) 5 CoreText 0x0000000195ea350c TDescriptorSource::CopyFontDescriptorPerPostScriptName(__CFString const*, unsigned long, unsigned long, __CFString const*, __CFNumber const*, __CFNumber const*, CTFontLegibilityWeight, __CFBoolean ... + 168 (TDescriptorSource.cpp:2875) 6 CoreText 0x0000000195e64804 TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, unsigned long) const + 1456 (TDescriptor.cpp:810) 7 CoreText 0x0000000195e67384 TDescriptor::CreateMatchingDescriptor(__CFSet const*, double, unsigned long) const + 248 (TDescriptor.cpp:908) 8 CoreText 0x0000000195eaaf98 CTFontDescriptorCreateMatchingFontDescriptor + 48 (CTFontDescriptor.cpp:124) 9 MediaAccessibility 0x00000001c50ac4c0 MAUtilitiesCreateCTFontDescriptorWithName + 228 (MAUtilities.c:411) 10 MediaAccessibility 0x00000001c50ac2f0 MAPreferencesCopyProfileFontDescriptor + 56 (MAPreferences.c:645) 11 MediaAccessibility 0x00000001c50abf3c MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 184 (MACaptionAppearance.c:716) 12 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233) 13 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 14 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 15 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 16 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 17 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 18 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 19 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 5 name: Thread 5: 0 libicucore.A.dylib 0x000000019e0259a0 0x19dddd000 + 2394528 1 libsystem_c.dylib 0x000000019c4f69a8 bsearch + 68 (bsearch.c:66) 2 libicucore.A.dylib 0x000000019de34ff4 LocaleIDInfo::initBaseNames(char const*, LocIDCharStorage&, UErrorCode*) + 220 (ualoc.cpp:974) 3 libicucore.A.dylib 0x000000019de357e0 ualoc_localizationsToUse + 608 (ualoc.cpp:1144) 4 CoreFoundation 0x000000019450883c _CFBundleCreateMutableArrayOfFallbackLanguages + 340 (CFBundle_Locale.c:1090) 5 CoreFoundation 0x000000019450844c _CFBundleCopyPreferredLanguagesInList + 496 (CFBundle_Locale.c:1156) 6 CoreFoundation 0x00000001945081cc _CFBundleCopyLocalizationsForPreferences + 76 (CFBundle_Locale.c:1207) 7 CoreFoundation 0x0000000194508164 CFBundleCopyPreferredLocalizationsFromArray + 84 (CFBundle_Locale.c:1248) 8 MediaAccessibility 0x00000001c50abd9c MACaptionAppearancePrefCopySystemLanguage + 88 (MACaptionAppearancePref.c:451) 9 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563) 10 MediaAccessibility 0x00000001c50ab974 MACaptionAppearanceGetTextEdgeStyle + 48 (MACaptionAppearance.c:805) 11 MediaToolbox 0x00000001a551d5f8 mediaAccessibilityDidChangeDoAsync + 300 (FigCaptionRendererMACache.c:233) 12 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 13 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 14 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 15 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 16 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 17 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 18 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 6 name: Thread 6: 0 libsystem_kernel.dylib 0x00000001dbc2d178 mach_msg2_trap + 8 (:-1) 1 libsystem_kernel.dylib 0x00000001dbc2cf10 mach_msg2_internal + 80 (mach_msg.c:201) 2 libsystem_kernel.dylib 0x00000001dbc2ce28 mach_msg_overwrite + 436 (mach_msg.c:0) 3 libsystem_kernel.dylib 0x00000001dbc2cc68 mach_msg + 24 (mach_msg.c:323) 4 CoreFoundation 0x00000001944d3a9c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624) 5 CoreFoundation 0x00000001944d1994 __CFRunLoopRun + 1208 (CFRunLoop.c:3007) 6 CoreFoundation 0x00000001944d13f8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420) 7 Foundation 0x00000001934643ec -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373) 8 Foundation 0x00000001934916ac -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420) 9 UIKitCore 0x0000000196859710 -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1208) 10 Foundation 0x00000001934e7d40 NSThread__start + 732 (NSThread.m:991) 11 libsystem_pthread.dylib 0x00000001fe5d04d4 _pthread_start + 136 (pthread.c:904) 12 libsystem_pthread.dylib 0x00000001fe5cfa10 thread_start + 8 (:-1)
Thread 7 name: Thread 7: 0 libsystem_c.dylib 0x000000019c4f6980 bsearch + 28 (bsearch.c:0) 1 CoreFoundation 0x00000001944e06cc CFLocaleCreateCanonicalLanguageIdentifierFromString + 340 (CFLocaleIdentifier.c:1777) 2 MediaAccessibility 0x00000001c50abdec MACaptionAppearancePrefCopySystemLanguage + 168 (MACaptionAppearancePref.c:459) 3 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563) 4 MediaAccessibility 0x00000001c50ac99c _copyValue + 60 (MACaptionAppearance.c:266) 5 MediaAccessibility 0x00000001c50acf78 MACaptionAppearanceGetForegroundOpacity + 72 (MACaptionAppearance.c:400) 6 MediaToolbox 0x00000001a551d574 mediaAccessibilityDidChangeDoAsync + 168 (FigCaptionRendererMACache.c:233) 7 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 8 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 9 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 10 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 11 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 12 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 13 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 8 name: Thread 8: 0 CoreFoundation 0x00000001944b0e90 CFArrayGetCount + 8 (CFArray.c:550) 1 CoreFoundation 0x00000001945081a8 _CFBundleCopyLocalizationsForPreferences + 40 (CFBundle_Locale.c:1206) 2 CoreFoundation 0x0000000194508164 CFBundleCopyPreferredLocalizationsFromArray + 84 (CFBundle_Locale.c:1248) 3 MediaAccessibility 0x00000001c50abd9c MACaptionAppearancePrefCopySystemLanguage + 88 (MACaptionAppearancePref.c:451) 4 MediaAccessibility 0x00000001c50aba98 MACaptionAppearancePrefCopyActiveProfileID + 100 (MACaptionAppearancePref.c:563) 5 MediaAccessibility 0x00000001c50ab974 MACaptionAppearanceGetTextEdgeStyle + 48 (MACaptionAppearance.c:805) 6 MediaAccessibility 0x00000001c50ac0b8 MACaptionAppearanceCopyFontDescriptorWithStrokeForStyle + 564 (MACaptionAppearance.c:716) 7 MediaToolbox 0x00000001a551d5d4 mediaAccessibilityDidChangeDoAsync + 264 (FigCaptionRendererMACache.c:233) 8 libdispatch.dylib 0x000000019c49e300 _dispatch_client_callout + 20 (object.m:561) 9 libdispatch.dylib 0x000000019c4a5894 _dispatch_lane_serial_drain + 748 (queue.c:3885) 10 libdispatch.dylib 0x000000019c4a63c4 _dispatch_lane_invoke + 380 (queue.c:3976) 11 libdispatch.dylib 0x000000019c4b1004 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:6913) 12 libdispatch.dylib 0x000000019c4b0878 _dispatch_workloop_worker_thread + 404 (queue.c:6507) 13 libsystem_pthread.dylib 0x00000001fe5cf964 _pthread_wqthread + 288 (pthread.c:2629) 14 libsystem_pthread.dylib 0x00000001fe5cfa04 start_wqthread + 8 (:-1)
Thread 0 crashed with ARM Thread State (64-bit): x0: 0x000000016b99cd98 x1: 0x000000016b99cd88 x2: 0x0000000104505b30 x3: 0x000000016b99cc80 x4: 0xfffffffffffffe20 x5: 0x0000000000000020 x6: 0x0000000107f5eb88 x7: 0x0000000107f5ec70 x8: 0x0000000000000000 x9: 0x0000000000000000 x10: 0x0000000000000003 x11: 0x0000000000000000 x12: 0x0000000000000001 x13: 0x0000000000000001 x14: 0x0000000107f5eb88 x15: 0x0000000107f5eb88 x16: 0x00000001fe523ea0 x17: 0x00000001e764cde0 x18: 0x0000000000000000 x19: 0x000000016b99ce18 x20: 0x0000000000000000 x21: 0x0000000000000007 x22: 0x000000016b99d1a0 x23: 0x00000002814de350 x24: 0x0000000107f53c40 x25: 0x000000016b99d3a0 x26: 0x0000000107f53c40 x27: 0x000000016b99d940 x28: 0x0000000107f53c40 fp: 0x000000016b99ce00 lr: 0x00000001044f80ac sp: 0x000000016b99c7b0 pc: 0x0000000000000000 cpsr: 0x80001800 esr: 0x82000006 (Instruction Abort) Translation fault
Binary Images:
0x10445c000 - 0x10446ffff TikTok-Example arm64 <76a66448510d382da920da9fff472f0a> /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/TikTok-Example
0x1044d4000 - 0x104503fff VideoPlayerContainer arm64 <2497c7465ef534a990f43c7f9410f75d> /private/var/containers/Bundle/Application/6163006F-5B66-4218-A786-B65841D1D00B/TikTok-Example.app/Frameworks/VideoPlayerContainer.framework/VideoPlayerContainer
0x1047cc000 - 0x1047d7fff libobjc-trampolines.dylib arm64e
EOF `
sorry for bringing this problem to you, I'll try to reproduce the bug and fix this problem asap
#11