我在开发中遇到的bug
来源:互联网 发布:知乎封面图片尺寸 编辑:程序博客网 时间:2024/04/24 07:19
1.仿作91助手的时候,网络连接的时候没有崩溃,断开网络后运行时在点击搜索这个tabBar出现如下崩溃信息
崩溃信息:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102da1e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010281adeb objc_exception_throw + 48
2 CoreFoundation 0x0000000102da1d9d +[NSException raise:format:] + 205
3 Foundation 0x000000010250d089 +[NSJSONSerialization JSONObjectWithData:options:error:] + 67
4 AppÂä©Êâã 0x000000010215bbb3 __52-[SearchTableViewController getrecommendDatafromnet]_block_invoke + 147
5 CFNetwork 0x0000000104fb56b5 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19
6 CFNetwork 0x0000000104fc7a02 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 302
7 Foundation 0x000000010248f304 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
8 Foundation 0x00000001023cb035 -[NSBlockOperation main] + 101
9 Foundation 0x00000001023adf8a -[__NSOperationInternal _start:] + 646
10 Foundation 0x00000001023adb9b __NSOQSchedule_f + 194
11 libdispatch.dylib 0x000000010562d49b _dispatch_client_callout + 8
12 libdispatch.dylib 0x00000001056138ec _dispatch_queue_drain + 2215
13 libdispatch.dylib 0x0000000105612e0d _dispatch_queue_invoke + 601
14 libdispatch.dylib 0x0000000105615a56 _dispatch_root_queue_drain + 1420
15 libdispatch.dylib 0x00000001056154c5 _dispatch_worker_thread3 + 111
16 libsystem_pthread.dylib 0x000000010596568f _pthread_wqthread + 1129
17 libsystem_pthread.dylib 0x0000000105963365 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
出错原因:断开网络获得的数据参数是nil所以崩溃了
解决方法:
加全局断点,定位出错点
2.
崩溃信息:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(
0 CoreFoundation 0x000000010dbb1e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010d2a1deb objc_exception_throw + 48
2 CoreFoundation 0x000000010dbb1cca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010ceee4de -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 UIKit 0x000000010df5d218 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3122
5 UIKit 0x000000010df59e7b -[UIApplication workspaceDidEndTransaction:] + 188
6 FrontBoardServices 0x0000000111e33754 -[FBSSerialQueue _performNext] + 192
7 FrontBoardServices 0x0000000111e33ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
8 CoreFoundation 0x000000010dadda31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
9 CoreFoundation 0x000000010dad395c __CFRunLoopDoSources0 + 556
10 CoreFoundation 0x000000010dad2e13 __CFRunLoopRun + 867
11 CoreFoundation 0x000000010dad2828 CFRunLoopRunSpecific + 488
12 UIKit 0x000000010df597cd -[UIApplication _run] + 402
13 UIKit 0x000000010df5e610 UIApplicationMain + 171
14 仿91 0x000000010cd695af main + 111
15 libdyld.dylib 0x00000001101c192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
出错原因:应用程序在运行时没有设置根视图控制器
解决方法:
设置根视图控制器
3.
崩溃信息:
2016-03-21 00:09:39.896 GIFShow[31818:3506360] -[__NSArray0 objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7fad60d02670
2016-03-21 00:09:39.898 GIFShow[31818:3506360] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArray0 objectForKeyedSubscript:]: unrecognized selector sent to instance 0x7fad60d02670'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104e34e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000104524deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104e3d48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000104d8a90a ___forwarding___ + 970
4 CoreFoundation 0x0000000104d8a4b8 _CF_forwarding_prep_0 + 120
5 GIFShow 0x00000001009cd690 __41-[FirstTableViewController getDataSource]_block_invoke + 416
6 GIFShow 0x0000000100a21b68 __64-[AFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke49 + 40
7 libdispatch.dylib 0x00000001058f5e5d _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x000000010591649b _dispatch_client_callout + 8
9 libdispatch.dylib 0x00000001058fe2af _dispatch_main_queue_callback_4CF + 1738
10 CoreFoundation 0x0000000104d94d09 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11 CoreFoundation 0x0000000104d562c9 __CFRunLoopRun + 2073
12 CoreFoundation 0x0000000104d55828 CFRunLoopRunSpecific + 488
13 GraphicsServices 0x0000000106a55ad2 GSEventRunModal + 161
14 UIKit 0x00000001024fd610 UIApplicationMain + 171
15 GIFShow 0x00000001009dfe8f main + 111
16 libdyld.dylib 0x000000010594a92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
出错原因:
解决办法:- 我在开发中遇到的bug
- iOS开发中遇到的bug
- android开发中遇到的一些bug
- Xcode开发中遇到的Bug
- 开发过程中遇到的BUG
- andorid开发中遇到的bug
- Android开发中遇到的bug
- 开发工程中遇到的BUG
- java开发中遇到的Bug整理
- Android开发中遇到的bug
- Xcode开发中遇到的bug总结
- Android Studio 开发中遇到的bug
- Kotlin开发中遇到的bug
- 我在开发中遇到的管理困惑
- 我在ios游戏开发中遇到的一些问题
- 我在Android开发中遇到的一些问题
- 我在开发中遇到的小问题系列(一)
- 我在Android开发中遇到的问题
- 使用JXL将List集合写入到Excel表中
- Java面试题全集(上)
- javascript——回到顶端按钮的编写
- ZOJ 1346 Comparing Your Heroes - 状压dp
- 带位置的最短路径(经纬度版本)
- 我在开发中遇到的bug
- POJ 1111(数字很吉利嘛) 简单BFS
- hdu4734 F(x) (数位dp)
- HDU4135 Co-prime(容斥原理)
- 第39讲项目4——回文数(2)
- 后缀树系列二:线性时间内构建后缀树(包含代码实现)
- usaco 2.3.1 prefix
- 第三周项目6:穷举法解决组合问题---猜数字问题
- android控件框架介绍