**一、NSInternalInconsistencyException negative sizes are not supported in the flow layout CoreFoundation ___exceptionPreprocess **app
出错缘由:ide
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath 设置Size为负数
二、-[NSNull countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x1b705...指针
出错缘由: 对NSNull类型进行遍历致使崩溃。code
三、unrecognized seletor对象
出错缘由:这种状况很简单,给一个对象发送了一条它不认识的消息。好比说你的.h中声明了某一个方法,可是.m中却没有实现,并且你没有对异常消息处理(消息转发)就会形成这种现象。图片
解决办法:首先排查本身的某一些方法是否实现,其次看一下哪些对象接收了它不应接收的消息。it
四、EXC_BAD_ACCESS异常:io
出错缘由:这种大多数是对象提早释放,访问了野指针的错误,也多是因为memcpy的数据超出的给定的长度,致使破坏了后面对象的堆栈,出现处处乱崩的问题。变量
解决办法:排查全部声明为weak对象的使用,是否在没有持有的状况下再次访问了该对象(该对象已经被释放),第二在MRC状况下,排查一下因此已经release的对象(声明一点,MRC中全局变量最好在dealloc方法中进行释放),第三排查一下全部block,是否block被正常赋值等。object
五、UIApplicationInvalidInterfaceOrientation Supported orientations has no common orientation with the application, and [UIAlertController shouldAutorotate] is returning YES
出错缘由:横屏时推出UIAlertController
解决办法:重写UIAlertContrller 的shouldAutorotate 方法
- (BOOL)shouldAutorotate { return NO; }
六、真机 The application bundle does not contain a valid identifier
解决办法:删除全部Xcode的构建文件 Xcode > Preferences > Locations > Derived Data