2014-09-29 65 views
4

这是一个非常奇怪的错误。我不得不更新我的Xcode到6.0,因为只有iOS 8发生了一个错误。所以我重新编译并运行iOS 8中的应用程序,以查看在使用[UIButton buttonWithType:]初始化的任何UIButton上的问题和应用程序崩溃。iOS 8中的UIButton BUtton类型崩溃应用程序

现在的问题是,当它在代码行停止时没有显示错误消息,如果按继续,应用程序加载没有问题。地狱,我甚至可以按下按钮,它完美的作品!为什么运行应用程序时我的异常不显示错误?为什么UIButton buttonWithType]开始崩溃的程序?

这是回溯,也许有人可以帮忙。该行之前我所说的UIButton的buttonWithType只是视图的初始化:您需要删除任何添加的自定义字体(或确保它们的存在)

frame #0: 0x381fc5d0 libc++abi.dylib`__cxa_begin_catch 
frame #1: 0x3177f9ac libFontParser.dylib`TFont::CreateFontEntitiesForFile(char const*, bool, TSimpleArray<TFont*>&, bool, short, char const*) + 6784 
frame #2: 0x3177d9cc libFontParser.dylib`FPFontCreateFontsWithPath + 224 
frame #3: 0x2b5a62d0 libCGXType.A.dylib`create_private_data_with_path + 12 
frame #4: 0x2b46bfb8 CoreGraphics`CGFontCreateFontsWithPath + 24 
frame #5: 0x2b4bd4e2 CoreGraphics`CGFontCreateFontsWithURL + 310 
frame #6: 0x324cdf4e GraphicsServices`AddFontsFromURLOrPath + 66 
frame #7: 0x324d1a3a GraphicsServices`__Initialize_block_invoke + 934 
frame #8: 0x00331ad6 libdispatch.dylib`_dispatch_client_callout + 22 
frame #9: 0x00332740 libdispatch.dylib`dispatch_once_f + 100 
frame #10: 0x324cd7a2 GraphicsServices`Initialize + 194 
frame #11: 0x388c24d8 libobjc.A.dylib`_class_initialize + 536 
frame #12: 0x388c805e libobjc.A.dylib`lookUpImpOrForward + 254 
frame #13: 0x388c7f56 libobjc.A.dylib`_class_lookupMethodAndLoadCache3 + 34 
frame #14: 0x388ce1d8 libobjc.A.dylib`_objc_msgSend_uncached + 24 
frame #15: 0x2e720b1e UIKit`-[UIButton initWithFrame:] + 506 
frame #16: 0x2e721494 UIKit`+[UIButton buttonWithType:] + 692 
+0

我有同样的问题,删除自定义字体解决了问题,然后我逐个添加它们,直到找到造成问题的问题字体。 – Tanhan 2014-11-14 11:44:44

回答

0

  1. 打开应用程序的plist中文件,通常称为“AppName-Info.plist”。
  2. 仔细检查“应用程序提供的字体”下列出的字体是否存在。如果他们不这样做,无论是从plist中删除或添加到您的资源(通常,一个名为您的根目录,“AppNameResources”文件夹下。

enter image description here

希望这有助于!