Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS 9推送序列导致我的应用程序崩溃_Ios_Segue_Uistoryboardsegue_Ios9_Xcode7 Beta5 - Fatal编程技术网

iOS 9推送序列导致我的应用程序崩溃

iOS 9推送序列导致我的应用程序崩溃,ios,segue,uistoryboardsegue,ios9,xcode7-beta5,Ios,Segue,Uistoryboardsegue,Ios9,Xcode7 Beta5,在iOS 8.4“模拟器和电话”中,我的performSegue呼叫没有问题,但在Xcode 7 beta 5上使用模拟器时,当performSegue呼叫发出时,它会崩溃。调用堆栈在下面 *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds [0 .. 1]' *** Fir

在iOS 8.4“模拟器和电话”中,我的performSegue呼叫没有问题,但在Xcode 7 beta 5上使用模拟器时,当performSegue呼叫发出时,它会崩溃。调用堆栈在下面

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds [0 .. 1]'
*** First throw call stack:
(
0   CoreFoundation                      0x00000001137509b5 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x00000001131c8deb objc_exception_throw + 48
2   CoreFoundation                      0x00000001136179d5 -[__NSArrayM insertObject:atIndex:] + 901
3   Foundation                          0x0000000110c42aa1 -[NSKeyValueSlowMutableArray insertObject:atIndex:] + 106
4   CoreFoundation                      0x000000011366beb2 -[NSMutableArray insertObjects:count:atIndex:] + 162
5   CoreFoundation                      0x000000011366bc1f -[NSMutableArray insertObjectsFromArray:range:atIndex:] + 335
6   CoreFoundation                      0x000000011366baa3 -[NSMutableArray addObjectsFromArray:] + 723
7   UIKit                               0x00000001119ef467 -[UIRuntimeOutletCollectionConnection performConnect] + 860
8   CoreFoundation                      0x0000000113691590 -[NSArray makeObjectsPerformSelector:] + 224
9   UIKit                               0x000000011173ccaa -[UINib instantiateWithOwner:options:] + 1864
10  UIKit                               0x0000000111531df4 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
11  UIKit                               0x0000000111532720 -[UIViewController loadView] + 178
12  UIKit                               0x0000000111532a22 -[UIViewController loadViewIfRequired] + 138
13  UIKit                               0x0000000111538e33 -[UIViewController __viewWillAppear:] + 120
14  UIKit                               0x0000000111565cba -[UINavigationController _startCustomTransition:] + 1177
15  UIKit                               0x00000001115752f7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
16  UIKit                               0x00000001115761ad -[UINavigationController __viewWillLayoutSubviews] + 57
17  UIKit                               0x00000001117082d1 -[UILayoutContainerView layoutSubviews] + 248
18  UIKit                               0x0000000111459a3b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 710
19  QuartzCore                          0x00000001110f336a -[CALayer layoutSublayers] + 146
20  QuartzCore                          0x00000001110e7bd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
21  QuartzCore                          0x00000001110e7a4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
22  QuartzCore                          0x00000001110dc1d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
23  QuartzCore                          0x00000001111099f0 _ZN2CA11Transaction6commitEv + 508
24  UIKit                               0x00000001113d5eb0 _afterCACommitHandler + 174
25  CoreFoundation                      0x000000011367c457 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
26  CoreFoundation                      0x000000011367c3c7 __CFRunLoopDoObservers + 391
27  CoreFoundation                      0x000000011367201b __CFRunLoopRun + 1147
28  CoreFoundation                      0x0000000113671918 CFRunLoopRunSpecific + 488
29  GraphicsServices                    0x0000000115ee3ad2 GSEventRunModal + 161
30  UIKit                               0x00000001113ac99e UIApplicationMain + 171
31  MyApp                               0x000000010fbfe59f main + 111
32  libdyld.dylib                       0x000000011429c92d start + 1
33  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
它看起来与我的代码没有任何关系,因为它发生在转换期间,并且我自己的函数都不在调用堆栈中


有没有人经历过这种情况,和/或知道如何解决这个问题?我在第二个view controller的每个函数中都设置了断点,但没有一个被击中。

一些人报告说,将segue指向ViewController而不是NavigationController可以解决问题。如果合适的话,你可以试试那个选项


来源:

我确信这是一个bug。在我的情况下,是塞格指向塔巴维尤

 performSegueWithIdentifier("tabSegue",sender: nil)

当它开始崩溃时(这种情况一次又一次地发生而没有改变某人),我只是从情节提要中删除segue并重新创建它。这个问题与引用.xib文件中的Outlet集合的无效设置有关。对于我的特定项目,它与将同一个UIGestureRecognitor添加到多个视图的GestureRecognitor集合有关。这在ios 9之前就已经起作用了,但现在程序崩溃了,堆栈跟踪完全相同。如果您知道导致崩溃的视图控制器(听起来像是因为您能够重现崩溃),您应该能够在控制台中看到一个错误,告诉您发生了什么。如果没有,我将检查.xib文件中的每个引用插座集合,并尝试查找导致错误的插座。

它看起来像是程序中的错误,而不是系统中的错误。请查看connection inspector,查看是否存在任何意外的插座连接或断开的插座连接。

为我修复:我正在使用自定义segue进行推送。当我用show segue替换custom segue时,问题已修复。

看起来这只是Xcode的问题。在安装最终版本后,我仍然有这个问题。我卸载了Xcode并从应用商店重新安装,不再有问题了。谢谢所有建议的答案!我以前肯定在故事板中遇到过一个糟糕的片段问题,但这次,它只是Xcode。

你找到解决方案了吗?我在Xcode 7-iOS 9最终版本中也遇到了同样的问题。