6

I got crash issue from Crashlytics.

UIKit -[UIView(Internal) _addSubview:positioned:relativeTo:]

Fatal Exception: NSInvalidArgumentException NSInvalidArgumentException Can't add self as subview

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x2e9a0f4b __exceptionPreprocess + 130
1  libobjc.A.dylib                0x391376af objc_exception_throw + 38
2  CoreFoundation                 0x2e9a0e8d -[NSException initWithCoder:]
3  UIKit                          0x3111f48f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 110
4  UIKit                          0x3111f417 -[UIView(Hierarchy) addSubview:] + 30
5  UIKit                          0x312e7c2f __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 1402
6  UIKit                          0x311256e5 +[UIView(Animation) performWithoutAnimation:] + 72
7  UIKit                          0x312e7479 -[_UINavigationParallaxTransition animateTransition:] + 728
8  UIKit                          0x312a4ba7 -[UINavigationController _startCustomTransition:] + 2614
9  UIKit                          0x311c2273 -[UINavigationController _startDeferredTransitionIfNeeded:] + 418
10 UIKit                          0x311c207d -[UINavigationController __viewWillLayoutSubviews] + 44
11 UIKit                          0x311c2015 -[UILayoutContainerView layoutSubviews] + 184
12 UIKit                          0x31113da3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 346
13 QuartzCore                     0x30d9ac6b -[CALayer layoutSublayers] + 142
14 QuartzCore                     0x30d9647b CA::Layer::layout_if_needed(CA::Transaction*) + 350
15 QuartzCore                     0x30d9630d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16
16 QuartzCore                     0x30d95d1f CA::Context::commit_transaction(CA::Transaction*) + 230
17 QuartzCore                     0x30d95b2f CA::Transaction::commit() + 314
18 QuartzCore                     0x30d8f85d CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 56
19 CoreFoundation                 0x2e96c1cd 
20 CoreFoundation                 0x2e969b71 __CFRunLoopDoObservers + 284
21 CoreFoundation                 0x2e969eb3 __CFRunLoopRun + 730
22 CoreFoundation                 0x2e8d4c27 CFRunLoopRunSpecific + 522
23 CoreFoundation                 0x2e8d4a0b CFRunLoopRunInMode + 106
24 GraphicsServices               0x335c8283 GSEventRunModal + 138
25 UIKit                          0x31178049 UIApplicationMain + 1136
26 Tapastic                       0x000764ef main (main.m:16)
27 Tapastic                       0x00075bf0 start

I cannot find where this crash happened in codes. So how can I find where this crash is and fix it? Please let me know. Thanks in advance.

Soo
  • 387
  • 2
  • 10
  • 19
  • Related: http://stackoverflow.com/questions/19560198/ios-app-error-cant-add-self-as-subview – Matthias Bauch Jan 10 '14 at 19:57
  • 2
    In xcode lefthand pane, go to breakpoints view (looks like a chevron icon). At the lower left press '+' sign to add one. Menu will appear that allows you to "Add Exception Breakpoint". Rerun and the app will stop on your source line that starts the crash. It looks like a view is trying to add itself as a subview to itself. – danh Jan 10 '14 at 20:30

0 Answers0