草庐IT

ios - 这个崩溃是我造成的还是UIKit本身造成的?

coder 2024-01-13 原文

这份崩溃报告对我来说真的很难理解。我时不时地看到它,而且它几乎不可能修复,因为它并没有真正给我任何对我的代码的引用。

这是 Apple 造成的崩溃,我不必担心吗?

Date/Time:       2013-02-26 03:49:36 +0000
OS Version:      iPhone OS 6.1.2 (10B146)
Report Version:  104

Exception Type:  SIGTRAP
Exception Codes: #0 at 0x33973d24
Crashed Thread:  0

Thread 0 Crashed:
0   CoreFoundation                      0x33973d24 CFRetain + 8
1   UIKit                               0x359484f9 -[UIKeyboardCache displayView:imageWidth:withKey:fromLayout:] + 297
2   UIKit                               0x359483c7 -[UIKeyboardCache displayView:withKey:fromLayout:] + 91
3   UIKit                               0x35947b5b -[UIKBKeyplaneView displayLayer:] + 191
4   QuartzCore                          0x355f34f7 CA::Layer::display() + 95
5   QuartzCore                          0x355ea93b CA::Layer::display_if_needed(CA::Transaction*) + 203
6   QuartzCore                          0x355ea865 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 25
7   QuartzCore                          0x355ea243 CA::Context::commit_transaction(CA::Transaction*) + 239
8   QuartzCore                          0x355ea051 CA::Transaction::commit() + 317
9   QuartzCore                          0x355e9eb1 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 61
10  CoreFoundation                      0x33a096cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 21
11  CoreFoundation                      0x33a079c1 __CFRunLoopDoObservers + 277
12  CoreFoundation                      0x33a07d17 __CFRunLoopRun + 743
13  CoreFoundation                      0x3397aebd CFRunLoopRunSpecific + 357
14  CoreFoundation                      0x3397ad49 CFRunLoopRunInMode + 105
15  GraphicsServices                    0x3753c2eb GSEventRunModal + 75
16  UIKit                               0x35890301 UIApplicationMain + 1121
17  MyApp                               0x0004e60f main (main.m:16)

Thread 1:
0   libsystem_kernel.dylib              0x3bbbc648 kevent64 + 24
1   libdispatch.dylib                   0x3bae7df8 _dispatch_mgr_thread$VARIANT$up + 36

Thread 2:
0   libsystem_kernel.dylib              0x3bbbbeb4 mach_msg_trap + 20
1   CoreFoundation                      0x33a09045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x33a07da3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3397aebd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3397ad49 CFRunLoopRunInMode + 105
5   WebCore                             0x3996f505 RunWebThread(void*) + 445
6   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 3:
0   libsystem_kernel.dylib              0x3bbbbeb4 mach_msg_trap + 20
1   CoreFoundation                      0x33a09045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x33a07da3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3397aebd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3397ad49 CFRunLoopRunInMode + 105
5   Foundation                          0x3429df97 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 255
6   Foundation                          0x34341865 -[NSRunLoop(NSRunLoop) run] + 81
7   MyApp                               0x0003f7b5 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:161)
8   Foundation                          0x3434ae85 __NSThread__main__ + 973
9   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 4:
0   libsystem_kernel.dylib              0x3bbbbeb4 mach_msg_trap + 20
1   CoreFoundation                      0x33a09045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x33a07da3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3397aebd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3397ad49 CFRunLoopRunInMode + 105
5   Foundation                          0x342c73d5 +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6   Foundation                          0x3434ae85 __NSThread__main__ + 973
7   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 5:
0   libsystem_kernel.dylib              0x3bbcc594 __select + 20
1   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 6:
0   libsystem_kernel.dylib              0x3bbcc08c __psynch_cvwait + 24
1   libsystem_c.dylib                   0x3bb1daa5 pthread_cond_timedwait + 45
2   JavaScriptCore                      0x37932c75 WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 109
3   JavaScriptCore                      0x37a44557 JSC::BlockAllocator::blockFreeingThreadMain() + 83
4   JavaScriptCore                      0x37a56fab WTF::wtfThreadEntryPoint(void*) + 15
5   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 7:
0   libsystem_kernel.dylib              0x3bbbbeb4 mach_msg_trap + 20
1   CoreFoundation                      0x33a09045 __CFRunLoopServiceMachPort + 129
2   CoreFoundation                      0x33a07da3 __CFRunLoopRun + 883
3   CoreFoundation                      0x3397aebd CFRunLoopRunSpecific + 357
4   CoreFoundation                      0x3397ad49 CFRunLoopRunInMode + 105
5   AudioToolbox                        0x3345c703 GenericRunLoopThread::Entry(void*) + 139
6   AudioToolbox                        0x3343d885 CAPThread::Entry(CAPThread*) + 297
7   libsystem_c.dylib                   0x3bb25311 _pthread_start + 309

Thread 8:
0   libsystem_kernel.dylib              0x3bbccd98 __workq_kernreturn + 8
1   libsystem_c.dylib                   0x3bb1aa16 _pthread_wqthread + 366

Thread 9:
0   libsystem_kernel.dylib              0x3bbccd98 __workq_kernreturn + 8
1   libsystem_c.dylib                   0x3bb1aa16 _pthread_wqthread + 366

最佳答案

这不是苹果造成的。下面一行是崩溃的入口点。确保一些相关的对象/ View 没有被释放。

 MyApp    0x0003f7b5 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:161

更新:

我收回我的对象​​释放声明。我怀疑这种崩溃可能是由于在后台线程中创建\更新了 UI 元素而发生的。我的意思是在网络回调方法中创建/更新的 UI 元素。

该问题的解决方案是在 main_queue 中添加一个 dispatch_async 来执行 UI 更新。

关于ios - 这个崩溃是我造成的还是UIKit本身造成的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15574088/

有关ios - 这个崩溃是我造成的还是UIKit本身造成的?的更多相关文章

  1. ruby - 我需要将 Bundler 本身添加到 Gemfile 中吗? - 2

    当我使用Bundler时,是否需要在我的Gemfile中将其列为依赖项?毕竟,我的代码中有些地方需要它。例如,当我进行Bundler设置时:require"bundler/setup" 最佳答案 没有。您可以尝试,但首先您必须用鞋带将自己抬离地面。 关于ruby-我需要将Bundler本身添加到Gemfile中吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4758609/

  2. ruby - 检查 "command"的输出应该包含 NilClass 的意外崩溃 - 2

    为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar

  3. Ruby Readline 在向上箭头上使控制台崩溃 - 2

    当我在Rails控制台中按向上或向左箭头时,出现此错误:irb(main):001:0>/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/rb-readline-0.4.2/lib/rbreadline.rb:4269:in`blockin_rl_dispatch_subseq':invalidbytesequenceinUTF-8(ArgumentError)我使用rvm来管理我的ruby​​安装。我正在使用=>ruby-2.0.0-p247[x86_64]我使用bundle来管理我的gem,并且我有rb-readline(0.4.2)(人们推荐的最少

  4. ruby - 如何验证 IO.copy_stream 是否成功 - 2

    这里有一个很好的答案解释了如何在Ruby中下载文件而不将其加载到内存中:https://stackoverflow.com/a/29743394/4852737require'open-uri'download=open('http://example.com/image.png')IO.copy_stream(download,'~/image.png')我如何验证下载文件的IO.copy_stream调用是否真的成功——这意味着下载的文件与我打算下载的文件完全相同,而不是下载一半的损坏文件?documentation说IO.copy_stream返回它复制的字节数,但是当我还没有下

  5. Ruby 文件 IO 定界符? - 2

    我正在尝试解析一个文本文件,该文件每行包含可变数量的单词和数字,如下所示:foo4.500bar3.001.33foobar如何读取由空格而不是换行符分隔的文件?有什么方法可以设置File("file.txt").foreach方法以使用空格而不是换行符作为分隔符? 最佳答案 接受的答案将slurp文件,这可能是大文本文件的问题。更好的解决方案是IO.foreach.它是惯用的,将按字符流式传输文件:File.foreach(filename,""){|string|putsstring}包含“thisisanexample”结果的

  6. Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting - 2

    1.错误信息:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:requestcanceledwhilewaitingforconnection(Client.Timeoutexceededwhileawaitingheaders)或者:Errorresponsefromdaemon:Gethttps://registry-1.docker.io/v2/:net/http:TLShandshaketimeout2.报错原因:docker使用的镜像网址默认为国外,下载容易超时,需要修改成国内镜像地址(首先阿里

  7. ruby - 这个 ruby​​ 注入(inject)魔术是如何工作的? - 2

    我今天看到了一个ruby​​代码片段。[1,2,3,4,5,6,7].inject(:+)=>28[1,2,3,4,5,6,7].inject(:*)=>5040这里的注入(inject)和之前看到的完全不一样,比如[1,2,3,4,5,6,7].inject{|sum,x|sum+x}请解释一下它是如何工作的? 最佳答案 没有魔法,符号(方法)只是可能的参数之一。这是来自文档:#enum.inject(initial,sym)=>obj#enum.inject(sym)=>obj#enum.inject(initial){|mem

  8. ruby - 为什么不能使用类IO的实例方法noecho? - 2

    print"Enteryourpassword:"pass=STDIN.noecho(&:gets)puts"Yourpasswordis#{pass}!"输出:Enteryourpassword:input.rb:2:in`':undefinedmethod`noecho'for#>(NoMethodError) 最佳答案 一开始require'io/console'后来的Ruby1.9.3 关于ruby-为什么不能使用类IO的实例方法noecho?,我们在StackOverflow上

  9. ruby-on-rails - Ruby 流量控制 : throw an exception, 返回 nil 还是让它失败? - 2

    我在思考流量控制的最佳实践。我应该走哪条路?1)不要检查任何东西并让程序失败(更清晰的代码,自然的错误消息):defself.fetch(feed_id)feed=Feed.find(feed_id)feed.fetchend2)通过返回nil静默失败(但是,“CleanCode”说,你永远不应该返回null):defself.fetch(feed_id)returnunlessfeed_idfeed=Feed.find(feed_id)returnunlessfeedfeed.fetchend3)抛出异常(因为不按id查找feed是异常的):defself.fetch(feed_id

  10. ruby - 使用哪个,eruby 还是 erb? - 2

    eruby和erb有什么区别?哪些考虑因素会促使我选择其中之一?我的应用程序正在为网络设备(路由器、负载平衡器、防火墙等)生成配置文件。我的计划是对配置文件进行模板化,在源文件中使用嵌入式ruby​​(通过eruby或erb)来执行诸如迭代生成路由器的所有接口(interface)配置block之类的操作(这些block都非常相似,仅在标签上有所不同和IP地址)。例如,我可能有这样一个配置模板文件:hostnamesample-routerlogging10.5.16.26当通过嵌入式ruby​​解释器(erb或eruby)运行时,会产生以下输出:hostnamesample-rout

随机推荐