Reputation: 615
I've started seeing regular crashes in my app when moving between tabs in my Tab based application. If I clean my project the problem doesn't go away. The problem is only happening on a specific ViewController which has a UIStackView with a few items (see pic below). Any ideas? Here's the crash details. Is it possible the problem is the view I'm coming from not this VC?
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/JS/Library/Developer/CoreSimulator/Devices/0EB640A8-A38D-451B-81DF-124F43ED521D/data/Containers/Bundle/Application/69891CB7-3978-41AA-8770-DD34202BBED6/Entelechy.app> (loaded)' with name 'D7U-k5-h22-view-pa4-wP-GXp' and directory 'Main.storyboardc''
*** First throw call stack:
(
0 CoreFoundation 0x01a8d494 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01547e02 objc_exception_throw + 50
2 CoreFoundation 0x01a8d3bd +[NSException raise:format:] + 141
3 UIKit 0x0292caf0 -[UINib instantiateWithOwner:options:] + 554
4 UIKit 0x026b9380 -[UIViewController _loadViewFromNibNamed:bundle:] + 429
5 UIKit 0x026b9db8 -[UIViewController loadView] + 189
6 UIKit 0x026ba1c4 -[UIViewController loadViewIfRequired] + 154
7 UIKit 0x026baab1 -[UIViewController view] + 35
8 UIKit 0x0271bd33 -[UITabBarController _viewForViewController:] + 33
9 UIKit 0x02728491 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 606
10 UIKit 0x027273ae -[UITabBarController transitionFromViewController:toViewController:] + 76
11 UIKit 0x02722a7e -[UITabBarController _setSelectedViewController:] + 453
12 UIKit 0x02722885 -[UITabBarController setSelectedViewController:] + 252
13 UIKit 0x027271d9 -[UITabBarController _tabBarItemClicked:] + 587
14 libobjc.A.dylib 0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84
15 UIKit 0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118
16 UIKit 0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
17 UIKit 0x02946fd3 -[UITabBar _sendAction:withEvent:] + 525
18 libobjc.A.dylib 0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84
19 UIKit 0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118
20 UIKit 0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
21 UIKit 0x0268ff3b -[UIControl sendAction:to:forEvent:] + 79
22 UIKit 0x026902d4 -[UIControl _sendActionsForEvents:withEvent:] + 433
23 UIKit 0x0268ff7b -[UIControl sendActionsForControlEvents:] + 48
24 UIKit 0x0294cdc3 -[UITabBar(Static) _buttonUp:] + 123
25 libobjc.A.dylib 0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84
26 UIKit 0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118
27 UIKit 0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
28 UIKit 0x0268ff3b -[UIControl sendAction:to:forEvent:] + 79
29 UIKit 0x026902d4 -[UIControl _sendActionsForEvents:withEvent:] + 433
30 UIKit 0x0268f2c1 -[UIControl touchesEnded:withEvent:] + 714
31 UIKit 0x0256c52e -[UIWindow _sendTouchesForEvent:] + 1095
32 UIKit 0x0256d5cc -[UIWindow sendEvent:] + 1159
33 UIKit 0x0250ebe8 -[UIApplication sendEvent:] + 266
34 UIKit 0x024e3769 _UIApplicationHandleEventQueue + 7795
35 CoreFoundation 0x0199fe5f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
36 CoreFoundation 0x01995aeb __CFRunLoopDoSources0 + 523
37 CoreFoundation 0x01994f08 __CFRunLoopRun + 1032
38 CoreFoundation 0x01994846 CFRunLoopRunSpecific + 470
39 CoreFoundation 0x0199465b CFRunLoopRunInMode + 123
40 GraphicsServices 0x05759664 GSEventRunModal + 192
41 GraphicsServices 0x057594a1 GSEventRun + 104
42 UIKit 0x024e9eb9 UIApplicationMain + 160
43 Entelechy 0x000b36da main + 138
44 libdyld.dylib 0x053b7a25 start + 1
45 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Upvotes: 0
Views: 243
Reputation: 557
This type of problem occurs when nib
fails to load.
First try Product--> Clean
or
You might have added files that might not be referenced correctly or you renamed it.
Remove such file's references and clean your project, give correct references and rerun.
Upvotes: 1