UIButton BUtton with application type crashing in iOS 8

This is a really weird mistake. I had to upgrade my Xcode to 6.0 because an error occurred only in iOS 8. Therefore, I recompiled and ran the application in iOS 8 to see this problem, and the application will work on any UIButton that is initialized with [UIButton buttonWithType:].

Now the problem is when it stops on this line of code, the error message is not displayed, and if I click on next, the application will load without problems. Damn, I can even press the button in question and it works great! Why is my exception not showing when the application starts? Why UIButton buttonWithType]does the program crash?

Here's the return line, maybe someone can help. The line before I call UIButton buttonWithType is just the initializer for the view:

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
+4
source share
1 answer

You need to remove any custom fonts added (or make sure they exist):

  • Open the plist application file, commonly called "AppName-Info.plist".
  • Double-check that the fonts listed in the "Fonts provided by the application" section exist. If they do not, remove it from plist or add it to your resources (usually under the "AppNameResources" folder in the root directory.

enter image description here

Hope this helps!

0
source

All Articles