iOS/报错/崩溃bug原因详解集合(一)
来源:互联网 发布:mac 涂层脱落 编辑:程序博客网 时间:2024/05/17 20:23
1.原因:应用程序试图在LoginViewController上模态出一个空的视图控制器。
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <LoginViewController: 0x7fc692e0d300>.'
2.一个navigationController不能push出navigationController,可以present出navigationController;
只有navigationController才能用push方法;
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'
3。应用程序需要一个启动控制器,(查看工程---Deployment--main interface如果不是加载的mainstoryBoard中的控制器,把main删掉;如果自己新建的storyBoard,查看箭头有没有指向要加载的控制器)
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
4..不允许在隔离的控制器上present出一个控制器
. Presenting view controllers on detached view controllers is discouraged <LeftSortsViewController: 0x7fbccb525540>.
5,约束问题
Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with items <UIButton: 0x7f909150fb50; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0x7f909150fdf0>> and <UIView: 0x7f9091745800; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x7f909173ffa0>> because they have no common ancestor. Does the constraint reference items in different view hierarchies? That's illegal.'
*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs'
6,不允许模态出一个已经在前台的控制器()
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <MainTabBarController: 0x7fe7c3050800>.'
7.链接问题,有重名的文件
clang: error: linker command failed with exit code 1 (use -v to see invocation)
8.属性命名不能有关键字.不能以new开头
9.scrollView 中添加控制器的view;
问题: 程序 一运行 就像 线程阻塞一样卡死 十几秒后 崩溃
解决:将控制器的view直接添加到scrollerview的view上,不过需要注意的是在scrollerView中创建控制器时一定要强引用这个控制器,也就是说scrollerView的控制器没死时,就要保证创建的控制器不能死。
- iOS/报错/崩溃bug原因详解集合(一)
- 【Bug/Cplex】不明原因报错集合
- iOS崩溃常见原因
- 浏览器崩溃原因大集合
- iOS 各种报错集合
- IOS 神奇的崩溃原因
- App崩溃的原因(iOS)
- Eclipse打包apk报错原因分析(一)
- iOS 修改通讯录联系人地址(address)崩溃原因分析
- (转载)ios崩溃日志详解
- ios 定位bug闪退,崩溃点
- iOS开发--使用崩溃地址找BUG
- 关于引入TabLayout崩溃的bug报错找不到Class的解决办法
- iOS 与Js 交互崩溃原因
- iOS -- 通过堆栈查找崩溃原因
- iOS开发笔记之二十——空值(nil值)导致的app崩溃(bug总结一)
- iOS:bug list(一)
- iOS 报错 clang: error: no input files ~解决bug
- 基本HQL语句学习
- 开篇
- 数据可视化——Matplotlib模块入门(一)
- Android Animation Interpolator
- 秘密
- iOS/报错/崩溃bug原因详解集合(一)
- php.ini中.注释符号是什么?
- python实现欧拉计划第十四题
- 22. Generate Parentheses
- Perfect Squares
- cAdvisor的安装与使用
- Android - toolbar 优化 title修改边距和navigation icon修改padding值
- Socket
- Android开发:notification通知以及通知不显示的问题