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

时间:2017-03-21 19:41:22

标签: ios objective-c uitableview crash xcode8

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

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

1 个答案:

答案 0 :(得分:1)

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

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

如果everythink是完美的,那么编辑你的方案从调试到发布模式。