IOS仅在发布时崩溃

时间:2015-06-26 09:18:58

标签: ios objective-c

我遇到了无法重现的崩溃,我真的不明白崩溃日志。我终于设法象征着崩溃日志,所以它应该有点用处。我只在构建发布时存档错误(存档并上传到hockeyapp)。谁能指出我正确的方向?我的Objective-c和iOS知识有点缺乏:

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

___exceptionPreprocess + 122
_objc_exception_throw + 34
+[NSException raise:format:] + 108
-[UINib instantiateWithOwner:options:] + 852
-[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 160
0x43a2e
-[UITableView _delegateViewForHeaderInSection:] + 36
___96-[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:willDisplay:]_block_invoke + 82
+[UIView(Animation) performWithoutAnimation:] + 68
-[UITableView _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:willDisplay:] + 542
-[UITableView _sectionHeaderViewWithFrame:forSection:floating:reuseViewIfPossible:willDisplay:] + 58
-[UITableView _updateVisibleHeadersAndFootersNow:] + 2374
-[UITableView _updateVisibleCellsNow:isRecursive:] + 2864
-[UITableView layoutSubviews] + 182
-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 510
-[CALayer layoutSublayers] + 132
CA::Layer::layout_if_needed(CA::Transaction*) + 356
CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 12
CA::Context::commit_transaction(CA::Transaction*) + 220
CA::Transaction::commit() + 320
__afterCACommitHandler + 128
___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
___CFRunLoopDoObservers + 274
___CFRunLoopRun + 910
_CFRunLoopRunSpecific + 472
_CFRunLoopRunInMode + 102
_GSEventRunModal + 132
_UIApplicationMain + 1436
0x28082
_tlv_initializer + 2
是的,我可以做一个发布版本但仍在调试吗?因为我在两个不同的物理设备以及任何模拟器上调试时都不会出现此错误。

1 个答案:

答案 0 :(得分:1)

Debug builds have no optimisation enabled (-O0), whereas release builds have optimisation enabled (-O3 or -Os). You can just go into the build settings on Xcode in the Debug configuration and temporarily turn up the optimisation level - this will keep all the other debug goodies (symbols etc) but hopefully also flush out the release mode bug.

also, you can set release mode:

1.Go to "Project" command in an Xcode application menu and chose "Edit Scheme"(Shortcut: ⌘< )

2.Select "Run Project name" in left pane

3.In right pane, under "Info" tab change "Build Configuration" to "Release"

enter image description here