简体   繁体   中英

XCode 6 project crashing after segue on ios 7.1

My project runs fine on the iOS 8 simulator and my device (iPhone 5S, iOS 8) but when I run on the 7.1 simulator it crashes each time I do a segue...

I am pasting part of the log.

If I deactivate autolayout, it runs without any problems. I tried killing the constraints on the view controllers to which I segue but no difference...

2014-11-15 02:39:14.574 My Project[26240:607] Objective: {objective 0x79163360: <251:84> + <750:-1.42636e-07>*0x78f7c920.negError{id: 215} + <999:2>*0x78fdf120.negError{id: 1389} + <999:2>*0x78fdf230.negError{id: 1392} + <999:1>*_UILayoutGuide:0x78fdf0b0.Width{id: 1390} + <999:1>*_UILayoutGuide:0x78fdf190.Width{id: 1393}}
2014-11-15 02:39:14.578 My Project[26240:607] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<NSISEngine: 0x79186230>{ Rows:
    0x78fdf120.posErrorMarker{id: 1388} == 0 + 1*0x78fdf120.negError{id: 1389} + 1*_UILayoutGuide:0x78fdf0b0.Width{id: 1390}
    0x78fdf230.posErrorMarker{id: 1391} == 0 + 1*0x78fdf230.negError{id: 1392} + 1*_UILayoutGuide:0x78fdf190.Width{id: 1393}
    UILayoutContainerView:0x78f5e630.Height{id: 276} == 960 + 2*0x78f7a4f0.marker{id: 285} + 1*0x78f81890.marker{id: 293}
    UILayoutContainerView:0x78f5e630.Width{id: 273} == 640 + 2*0x78f7a490.marker{id: 282} + 1*0x78f81860.marker{id: 290}
    UILayoutContainerView:0x78f5e630.minX{id: 279} == 0 + 2*0x78f6e210.marker{id: 278} + 

.... blah blah blah

  Integralization Adjustments:
(none)

  Statistics:
    26 rows. Variable counts:
          1 ->   9
          2 ->  12
          3 ->   4
          5 ->   1
}: internal error.  Cannot find an outgoing row head for incoming head 0x78f7c920.negError{id: 215}, which should never happen.'
*** First throw call stack:
(
    0   CoreFoundation                      0x002d91e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x01a978e5 objc_exception_throw + 44
    2   CoreFoundation                      0x002d8fbb +[NSException raise:format:] + 139
    3   Foundation                          0x007a6079 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 256
    4   Foundation                          0x007a5ee3 -[NSISEngine optimize] + 183
    5   Foundation                          0x0091a6d8 -[NSISEngine withBehaviors:performModifications:] + 183
    6   Foundation                          0x007aa3c5 -[NSISEngine withAutomaticOptimizationDisabled:] + 48
    7   UIKit                               0x00bdb830 -[UIView(Hierarchy) _postMovedFromSuperview:] + 313
    8   UIKit                               0x00bd9b0a __UIViewWasRemovedFromSuperview + 226
    9   UIKit                               0x00bd970a -[UIView(Hierarchy) removeFromSuperview] + 264
    10  UIKit                               0x00cbcb3b -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 339
    11  UIKit                               0x00cb4963 __49-[UINavigationController _startCustomTransition:]_block_invoke + 206
    12  UIKit                               0x012c4810 -[_UIViewControllerTransitionContext completeTransition:] + 99
    13  UIKit                               0x00b6ec94 __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke103 + 680
    14  UIKit                               0x00be1435 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 306
    15  UIKit                               0x00bca6dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
    16  UIKit                               0x00bca9c8 -[UIViewAnimationState animationDidStop:finished:] + 80
    17  QuartzCore                          0x04a8abb4 _ZN2CA5Layer23run_animation_callbacksEPv + 304
    18  libdispatch.dylib                   0x0215d4d0 _dispatch_client_callout + 14
    19  libdispatch.dylib                   0x0214b726 _dispatch_main_queue_callback_4CF + 340
    20  CoreFoundation                      0x0033e43e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
    21  CoreFoundation                      0x0027f5cb __CFRunLoopRun + 1963
    22  CoreFoundation                      0x0027e9d3 CFRunLoopRunSpecific + 467
    23  CoreFoundation                      0x0027e7eb CFRunLoopRunInMode + 123
    24  GraphicsServices                    0x03cf45ee GSEventRunModal + 192
    25  GraphicsServices                    0x03cf442b GSEventRun + 104
    26  UIKit                               0x00b7af9b UIApplicationMain + 1225
    27  My Project                         0x0014744e top_level_code + 78
    28  My Project                         0x0014748b main + 43
    29  libdyld.dylib                       0x023a16d9 start + 1
    30  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I am getting a similar crash. App running OK in iOS 8 and crashing every time a particular segue is performed in iOS 7. Apart from the crash, they layout of my View Controller's view is incorrect when running in iOS 7 and fine in iOS 8.

Are you using proportional height/width constraints? I was using quite a few of them in Scene A and the app was always crashing after a segue to Scene B. I disabled all the proportional height/width constraints in Scene A and the app no longer crashes although the layout is obviously wrong.

It seems like a bug to me.

I just ran across a similar problem. It took a couple days to figure out what was triggering it.

My app was crashing in iOS 7 on the iPhone 5s (in the simulator), but not on iOS 8 or on other devices. I was getting this same error ("Cannot find an outgoing row head for incoming head ...") when my controllers were being popped... and also when controllers were being scrolled away from in a UIPageViewController.

In both cases, the problem was triggered by the fact that I had full-screen views stacked on top of each other using APIs like UIView.insertSubview:belowSubview: and UIView.bringSubviewToFront: . The solution/workaround was to change our code to dynamically add/remove our views instead of stacking them and shuffling their order.

Hope this helps anyone else who hits the same problem.

It is late for the the question, but I think my answer may help someone.

This crash also happens to me, and the situation and the output is almost the same.

I'm pretty sure it is a bug. To solve it, control-click your storyboard and choose Show File Inspector . In the inspector panel, set storyboard's build version to iOS 8.0 and Later . Everything works fine now.

It's a layout problem. Try to delete some suspected subviews and run. I solved the problem with this method. By the way, I think it's a bug in iOS7, which is solved in iOS 8.

DEFINITELY an iOS7 IB bug. I had this issue and what solved it by first identifying the offending constraint then removing it from IB. Then simply instantiate the constraint programmatically in viewDidLoad with NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:

I came across the issue that seems to be similar. I put push segue in my view to transition to the another view. And what. Every time simulator crashed. The reason in my case is simple. To use push segue the ViewController has to be managed from Navigation Controller. If not it crashes immediately, printing in the console something like "Can't find the ViewController in storyboard". There are two ways how to get out: - embed the view in the Navigation Controller (there is tool for it: menu Editor->Embed In -> Navigation Controller - use Modal Segue insted.

I hope this answer can help to solve some "weird" crashes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM