アプリ起動時に StoryBoard 読み込みでクラッシュ
実機 (iOS 11.3) でアプリ起動時にクラッシュするのですが、原因が分からず困っています。
(シミュレーターではクラッシュしませんでした。)
クラッシュログの Backtrace に [UIStoryboard storyboardWithName:bundle:]
とあるので、
おそらく StoryBoard の読み込みでクラッシュしているのだと思うのですが、
StoryBoard のコネクションをチェックしても問題が見つかりませんでした。
Last Exception Backtrace:
0 CoreFoundation 0x1837e2d8c __exceptionPreprocess + 228
1 libobjc.A.dylib 0x18299c5ec objc_exception_throw + 55
2 UIKit 0x18dd31728 +[UIStoryboard storyboardWithName:bundle:] + 783
3 UIKit 0x18d793fb8 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 91
4 UIKit 0x18d3b1254 -[UIApplication _loadMainInterfaceFile] + 275
5 UIKit 0x18d37f550 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1411
6 UIKit 0x18d9afa0c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 783
7 UIKit 0x18d37ee4c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 159
8 UIKit 0x18d37ece8 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 239
9 UIKit 0x18d37db78 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 723
10 UIKit 0x18e01372c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 295
11 UIKit 0x18d37d268 -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 431
12 UIKit 0x18ddf89b8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 219
13 UIKit 0x18df46ae8 _performActionsWithDelayForTransitionContext + 111
14 UIKit 0x18d37cc88 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 247
15 UIKit 0x18d37c624 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 367
16 UIKit 0x18d37965c -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 539
17 UIKit 0x18d3793ac -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 363
18 FrontBoardServices 0x185fe0470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 363
19 FrontBoardServices 0x185fe8d6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 223
20 libdispatch.dylib 0x1830d4ae4 _dispatch_client_callout + 15
21 libdispatch.dylib 0x1830dc1f4 _dispatch_block_invoke_direct$VARIANT$mp + 223
22 FrontBoardServices 0x186014878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 35
23 FrontBoardServices 0x18601451c -[FBSSerialQueue _performNext] + 403
24 FrontBoardServices 0x186014ab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 55
25 CoreFoundation 0x18378b404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 23
26 CoreFoundation 0x18378ac2c __CFRunLoopDoSources0 + 275
27 CoreFoundation 0x18378879c __CFRunLoopRun + 1203
28 CoreFoundation 0x1836a8da8 CFRunLoopRunSpecific + 551
29 GraphicsServices 0x18568b020 GSEventRunModal + 99
30 UIKit 0x18d68978c UIApplicationMain + 235
31 xxxxxxxxxxx 0x1004989c0 main + 35264 (SearchViewController.swift:16)
32 libdyld.dylib 0x183139fc0 start + 3
また NSSetUncaughtExceptionHandler
で callStackSymbols
しても、何も出力されませんでした。
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
NSSetUncaughtExceptionHandler { exception in print(exception.callStackSymbols) }
return true
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
NSSetUncaughtExceptionHandler { exception in print(exception.callStackSymbols) }
return true
}
他に何かクラッシュの原因を探る方法はありますでしょうか?
何卒よろしくお願いします。
開発環境: Xcode 9.3
開発言語: Swift 4
実行環境: iOS 11.3 (実機)