iOS 应用崩溃:ZL36GetSFTrimCharSetForChineseOrJapanesePPK9TFontInfo_block_invoke

5
我在XCode的“组织者”中发现了错误“ZL36GetSFTrimCharSetForChineseOrJapanesePPK9TFontInfo_block_invoke”。我尝试将我的iPhone设置为日语或中文,但该错误未发生。可能是什么原因导致此错误,我该如何解决呢?对于我的糟糕英语,我感到抱歉。
以下是崩溃日志:
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   CoreFoundation                  0x22475196 CFStringHasPrefix + 10 (CFInternal.h:627)
1   CoreText                        0x247af94e ___ZL36GetSFTrimCharSetForChineseOrJapanesePPK9TFontInfo_block_invoke + 158 (SplicedFontSupport.cpp:8959)
2   libdispatch.dylib               0x220c180e _dispatch_client_callout + 22 (init.c:819)
3   libdispatch.dylib               0x220d3172 dispatch_once_f$VARIANT$mp + 62 (once.c:60)
4   CoreText                        0x24761360 MakeSpliceDescriptor(unsigned long) + 648 (once.h:68)
5   CoreText                        0x2474d84e TSplicedFontStashImp::CopySpliceFontAtIndex(long) const + 74 (TDescriptorSource.cpp:3694)
6   CoreText                        0x247a9ea0 TSplicedFontStashImp::CopySplicedDescriptorForName(__CFString const*, bool) const + 32 (TDescriptorSource.cpp:3705)
7   CoreText                        0x2474cbca TSplicedFontStashImp::CopySplicedDescriptorsForRequest(__CFDictionary const*, unsigned long) const + 134 (TDescriptorSource.cpp:3727)
8   CoreText                        0x247a84c4 TDescriptorSource::CopyDescriptorsForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long, TCFRef<__CFArray const*>*) const + 172 (TDescriptorSource.cpp:3630)
9   CoreText                        0x2474c0ea TDescriptorSource::CopyDescriptorForRequest(__CFDictionary const*, __CFSet const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long) const + 86 (TDescriptorSource.cpp:1663)
10  CoreText                        0x2474bf1c TDescriptor::CreateMatchingDescriptorInternal(__CFSet const*, bool) const + 424 (TDescriptor.cpp:538)
11  CoreText                        0x2474bca8 TDescriptor::InitBaseFont(bool) + 24 (TDescriptor.cpp:642)
12  CoreText                        0x2475eaa2 TDescriptor::CreateMatchingDescriptor(__CFSet const*, float, unsigned long) const + 278 (TDescriptor.h:62)
13  CoreText                        0x2475e942 CTFontCreateWithFontDescriptor + 34 (CTFont.cpp:93)
14  CoreText                        0x2475d85a CTFontCreateUIFontForLanguage + 22 (CTFont.cpp:152)
15  UIFoundation                    0x26a7531c +[UIFont systemFontOfSize:traits:] + 360 (UIFont.m:279)
16  UIKit                           0x26ad6216 -[UILabel _commonInit] + 86 (UILabel.m:504)
17  UIKit                           0x26ad60b0 -[UILabel initWithFrame:] + 76 (UILabel.m:531)
18  UIKit                           0x26aeeaf4 -[UIView init] + 44 (UIView.m:2343)
19  UIKit                           0x26b6ed28 -[UINavigationItemView initWithNavigationItem:] + 196 (UINavigationBar.m:9834)
20  UIKit                           0x26debe9e -[UINavigationItem _defaultTitleView] + 130 (UINavigationBar.m:1469)
21  UIKit                           0x26b6ec34 -[UINavigationItem _titleView] + 116 (UINavigationBar.m:1479)
22  UIKit                           0x26c094bc -[UINavigationBar _removeItemsFromSuperview:] + 140 (UINavigationBar.m:6931)
23  UIKit                           0x26deed7c -[UINavigationBar _setDecodedItems:] + 496 (UINavigationBar.m:2697)
24  UIKit                           0x26dee99c -[UINavigationBar initWithCoder:] + 484 (UINavigationBar.m:2662)
25  UIKit                           0x2709910e UINibDecoderDecodeObjectForValue + 782 (UINibDecoder.m:705)
26  UIKit                           0x27098df4 -[UINibDecoder decodeObjectForKey:] + 296 (UINibDecoder.m:792)
27  UIKit                           0x26deaf16 -[UINavigationItem initWithCoder:] + 734 (UINavigationBar.m:548)
28  UIKit                           0x2709910e UINibDecoderDecodeObjectForValue + 782 (UINibDecoder.m:705)
29  UIKit                           0x27098df4 -[UINibDecoder decodeObjectForKey:] + 296 (UINibDecoder.m:792)
30  UIKit                           0x26f814a4 -[UIRuntimeConnection initWithCoder:] + 160 (UIRuntimeConnection.m:23)
31  UIKit                           0x2709910e UINibDecoderDecodeObjectForValue + 782 (UINibDecoder.m:705)
32  UIKit                           0x270990a0 UINibDecoderDecodeObjectForValue + 672 (UINibDecoder.m:602)
33  UIKit                           0x27098df4 -[UINibDecoder decodeObjectForKey:] + 296 (UINibDecoder.m:792)
34  UIKit                           0x26f80a0a -[UINib instantiateWithOwner:options:] + 1110 (UINib.m:345)
35  UIKit                           0x26e33aa2 -[UIViewController _loadViewFromNibNamed:bundle:] + 322 (UIViewController.m:2309)
36  UIKit                           0x26c06ffa -[UIViewController loadView] + 142 (UIViewController.m:2438)
37  UIKit                           0x26acca1e -[UIViewController loadViewIfRequired] + 150 (UIViewController.m:2537)
38  UIKit                           0x26acc970 -[UIViewController view] + 24 (UIViewController.m:2598)
39  UIKit                           0x26ad3638 -[UIWindow addRootViewControllerViewIfPossible] + 68 (UIWindow.m:1445)
40  UIKit                           0x26ad0b3c -[UIWindow _setHidden:forced:] + 276 (UIWindow.m:1529)
41  UIKit                           0x26b45a5c -[UIWindow makeKeyAndVisible] + 48 (UIWindow.m:4929)
42  Electrical Calculations FREE    0x0008bb68 0x4d000 + 256872
43  UIKit                           0x26b41784 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 392 (UIApplication.m:1865)
44  UIKit                           0x26d692d0 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3080 (UIApplication.m:2112)
45  UIKit                           0x26d6d284 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1588 (UIApplication.m:3355)
46  UIKit                           0x26d8183c __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3286 + 36 (UIApplication.m:12263)
47  UIKit                           0x26d6a7b2 -[UIApplication workspaceDidEndTransaction:] + 134 (UIApplication.m:2748)
48  FrontBoardServices              0x23bf6c06 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 18 (FBSSerialQueue.m:158)
49  FrontBoardServices              0x23bf6ab8 -[FBSSerialQueue _performNext] + 224 (FBSSerialQueue.m:177)
50  FrontBoardServices              0x23bf6db8 -[FBSSerialQueue _performNextFromRunLoopSource] + 48 (FBSSerialQueue.m:206)
51  CoreFoundation                  0x22515dfe __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 (CFRunLoop.c:1761)
52  CoreFoundation                  0x225159ec __CFRunLoopDoSources0 + 452 (CFRunLoop.c:1807)
53  CoreFoundation                  0x22513d5a __CFRunLoopRun + 794 (CFRunLoop.c:2536)
54  CoreFoundation                  0x22463228 CFRunLoopRunSpecific + 520 (CFRunLoop.c:2814)
55  CoreFoundation                  0x22463014 CFRunLoopRunInMode + 108 (CFRunLoop.c:2844)
56  UIKit                           0x26b3ac3c -[UIApplication _run] + 524 (UIApplication.m:2578)
57  UIKit                           0x26b35188 UIApplicationMain + 144 (UIApplication.m:3772)
58  Electrical Calculations FREE    0x00082920 0x4d000 + 219424
59  libdyld.dylib                   0x2210b872 start + 2 (start_glue.s:64)

你修好了吗?我也遇到了同样的问题 :( - Piotr Golinski
很遗憾,它还没有被解决。 - Ettore Gallina
你说错误显示在“Organizer”中,但是展示了一个异常调用堆栈。你能确认这个错误是否出现在“正常”的XCode视图中,还是真的出现在单独的“Organizer”中?如果有异常断点设置,你能否向我们展示发生错误的代码? - Ali Beadle
崩溃似乎与从nib或storyboard加载的UINavigationItem中的字体有关。您的应用程序是否使用了自定义字体?您是否尝试使用代码而不是storyboard加载UINavigationItem? - Jon Rose
我确认错误出现在一个单独的组织者中,在我的测试中从未发生过。我没有设置任何异常断点。我在我的 Nibs 中不使用自定义字体,并且通过 Interface Builder 创建了导航栏。我还尝试了 Instruments 中的“僵尸”(模拟内存警告),但错误并未发生。 - Ettore Gallina
1个回答

0

看起来像是一个对象被释放了,即使有对该对象的引用,因此代码认为它是有效的。 请尝试在Instruments中运行“Zombies”。它会告诉您向无效对象发送消息的位置。如果您正在使用iOS模拟器,请尝试在尝试重现崩溃时尽可能频繁地执行“硬件” -> “模拟内存警告”。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接