ios - 应用程序仅在 ipa 文件中崩溃,使用 xcode 安装到设备时不会崩溃

标签 ios objective-c uitableview crash xcode8

我陷入了一种非常奇怪的情况。当我创建一个 IPA 并将其安装到任何设备时,它会在一个固定点崩溃。但是当我直接从 xcode 安装到设备时,它工作得很好并且没有崩溃。尝试了几乎所有可能的解决方案,删除构建文件夹、清理、删除文件并再次添加等。 以下是崩溃日志以供引用。任何帮助将不胜感激谢谢

Exception Type:  EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: 
EXC_CORPSE_NOTIFY Triggered by Thread:  0

Application Specific Information: abort() called

Filtered syslog: None found

Last Exception Backtrace: 
0   CoreFoundation          0x185e681c0 __exceptionPreprocess + 124
1   libobjc.A.dylib         0x1848a055c objc_exception_throw + 56
2   CoreFoundation          0x185e68108 +[NSException raise:format:] + 116
3   Foundation              0x1868565ac -[NSString rangeOfString:options:range:locale:] + 352
4   Foundation              0x186949f5c -[NSString containsString:] + 68
5   TM iSwift               0x100157528 -[KossexViewController tableView:heightForHeaderInSection:] (KossexViewController.m:1373)
6   UIKit                   0x18bd90b20 -[UITableView _delegateWantsHeaderForSection:] + 528
7   UIKit                   0x18bd8f7b0 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 208
8   UIKit                   0x18c180b7c -[UITableViewRowData _ensureSectionOffsetIsValidForSection:] + 348
9   UIKit                   0x18bd8f61c -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 576
10  UIKit                   0x18bd8f380 -[UITableViewRowData heightForTable] + 60
11  UIKit                   0x18bd8f1b4 -[UITableView _updateContentSize] + 220
12  UIKit                   0x18bfed6f0 -[UITableView _rebuildGeometry] + 44
13  UIKit                   0x18bd94b64 -[UITableView didMoveToWindow] + 140
14  UIKit                   0x18bcadc1c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1544
15  UIKit                   0x18bcd1714 -[UIScrollView _didMoveFromWindow:toWindow:] + 92
16  UIKit                   0x18bcacd90 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 156
17  UIKit                   0x18bcacbe8 -[UIView(Hierarchy) _postMovedFromSuperview:] + 792
18  UIKit                   0x18bcb8ad0 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1788
19  UIKit                   0x18bcb83bc -[UIView(Hierarchy) addSubview:] + 828
20  TM iSwift               0x100152428 __34-[KossexViewController createBody]_block_invoke (KossexViewController.m:397)
21  libdispatch.dylib       0x184cf1200 _dispatch_call_block_and_release + 24
22  libdispatch.dylib       0x184cf11c0 _dispatch_client_callout + 16
23  libdispatch.dylib       0x184cf5d6c _dispatch_main_queue_callback_4CF + 1000
24  CoreFoundation          0x185e15f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
25  CoreFoundation          0x185e13b18 __CFRunLoopRun + 1660
26  CoreFoundation          0x185d42048 CFRunLoopRunSpecific + 444
27  GraphicsServices        0x1877c5198 GSEventRunModal + 180
28  UIKit                   0x18bd1c628 -[UIApplication _run] + 684
29  UIKit                   0x18bd17360 UIApplicationMain + 208
30  TM iSwift               0x1001384c0 main (main.m:18)
31  libdyld.dylib           0x184d245b8 start + 4

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed: 
0   libsystem_kernel.dylib  0x0000000184e36014 __pthread_kill + 8
1   libsystem_pthread.dylib 0x0000000184efd460 pthread_kill + 112
2   libsystem_c.dylib       0x0000000184daa3f4 abort + 140
3   libc++abi.dylib         0x00000001848752d4 __cxa_bad_cast + 0
4   libc++abi.dylib         0x0000000184892cc0 default_unexpected_handler() + 0
5   libobjc.A.dylib         0x00000001848a0844 _objc_terminate() + 124
6   libc++abi.dylib         0x000000018488f66c std::__terminate(void (*)()) + 16
7   libc++abi.dylib         0x000000018488ef84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 0
8   libobjc.A.dylib         0x00000001848a0690 _objc_exception_destructor(void*) + 0
9   CoreFoundation          0x0000000185e68108 -[NSException initWithCoder:] + 0
10  Foundation              0x00000001868565ac -[NSString rangeOfString:options:range:locale:] + 352
11  Foundation              0x0000000186949f5c -[NSString containsString:] + 68
12  TM iSwift               0x0000000100157528 -[KossexViewController tableView:heightForHeaderInSection:] (KossexViewController.m:1373)
13  UIKit                   0x000000018bd90b20 -[UITableView _delegateWantsHeaderForSection:] + 528
14  UIKit                   0x000000018bd8f7b0 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 208
15  UIKit                   0x000000018c180b7c -[UITableViewRowData _ensureSectionOffsetIsValidForSection:] + 348
16  UIKit                   0x000000018bd8f61c -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 576
17  UIKit                   0x000000018bd8f380 -[UITableViewRowData heightForTable] + 60
18  UIKit                   0x000000018bd8f1b4 -[UITableView _updateContentSize] + 220
19  UIKit                   0x000000018bfed6f0 -[UITableView _rebuildGeometry] + 44
20  UIKit                   0x000000018bd94b64 -[UITableView didMoveToWindow] + 140
21  UIKit                   0x000000018bcadc1c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1544
22  UIKit                   0x000000018bcd1714 -[UIScrollView _didMoveFromWindow:toWindow:] + 92
23  UIKit                   0x000000018bcacd90 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 156
24  UIKit                   0x000000018bcacbe8 -[UIView(Hierarchy) _postMovedFromSuperview:] + 792
25  UIKit                   0x000000018bcb8ad0 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1788
26  UIKit                   0x000000018bcb83bc -[UIView(Hierarchy) addSubview:] + 828
27  TM iSwift               0x0000000100152428 __34-[KossexViewController createBody]_block_invoke (KossexViewController.m:397)
28  libdispatch.dylib       0x0000000184cf1200 _dispatch_call_block_and_release + 24
29  libdispatch.dylib       0x0000000184cf11c0 _dispatch_client_callout + 16
30  libdispatch.dylib       0x0000000184cf5d6c _dispatch_main_queue_callback_4CF + 1000
31  CoreFoundation          0x0000000185e15f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
32  CoreFoundation          0x0000000185e13b18 __CFRunLoopRun + 1660
33  CoreFoundation          0x0000000185d42048 CFRunLoopRunSpecific + 444
34  GraphicsServices        0x00000001877c5198 GSEventRunModal + 180
35  UIKit                   0x000000018bd1c628 -[UIApplication _run] + 684
36  UIKit                   0x000000018bd17360 UIApplicationMain + 208
37  TM iSwift               0x00000001001384c0 main (main.m:18)
38  libdyld.dylib           0x0000000184d245b8 start + 4

最佳答案

请看这些行 (i) [KossexViewController tableView:heightForHeaderInSection:] (KossexViewController.m:1373

(ii) [KossexViewController createBody]_block_invoke (KossexViewController.m:397

如果所有想法都是完美的,那么将您的方案从 Debug模式编辑到 Release模式。

关于ios - 应用程序仅在 ipa 文件中崩溃,使用 xcode 安装到设备时不会崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42936713/

相关文章:

ios - 如何快速访问滚动条位置

iPhone 标签栏应用程序 : Is it possible to add subview inside the tabbar (on top of it)?

iphone - 在 objective C init 中工作

swift - 在动态 tableView 的 tableViewCell 中从动态 collectionViewCell 执行 Segue With Identifier,swift

iphone - TableView :didSelectRowAtIndexPath not firing after swipe gesture is called

ios - 如何从常规 View Controller 推送 TableView Controller ?

ios - 在不继承 UIControl 的情况下实现目标- Action 模式

ios - 将闭包传递给私有(private) API

ios - 如何在登录/退出时自动更新 RearViewRevealController 中的 UILabels?

ios - CMSampleBuffer 将 BGRA 转换为 YUV 420f