App Crash,不知道为什么

时间:2012-07-25 12:59:04

标签: iphone crash crash-reports

我试图找出为什么我的应用程序有时会在客户设备上崩溃。设备是否越狱无关紧要。我的应用程序来自AppStore。其他崩溃日志几乎相同,尽管它们的崩溃线程不同。

Hardware Model:      iPhone3,1
Process:         [the APP] [296]
Path:            /var/mobile/Applications/06DF5BC5-F9C2-49EE-B2D5-5979C09B51A2/[the APP].app/[the APP]
Identifier:      [the APP]
Version:         3.3.0
Code Type:       ARM
Parent Process:  launchd [1]

Date/Time:       2012-07-22 15:15:18 +0000
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0xbbadbeef
Crashed Thread:  7

Thread 0:
0   libsystem_kernel.dylib              0x35c39004 mach_msg_trap + 20
1   CoreFoundation                      0x353673f3 __CFRunLoopServiceMachPort + 127
2   CoreFoundation                      0x353660f1 __CFRunLoopRun + 825
3   CoreFoundation                      0x352e94a5 CFRunLoopRunSpecific + 301
4   CoreFoundation                      0x352e936d CFRunLoopRunInMode + 105
5   GraphicsServices                    0x36f85439 GSEventRunModal + 137
6   UIKit                               0x32df5cd5 UIApplicationMain + 1081
7   [the APP]                           0x0000b549 main (main.m:20)

Thread 1:
0   libsystem_kernel.dylib              0x35c393a8 kevent + 24
1   libdispatch.dylib                   0x3422cbc9 _dispatch_mgr_wakeup + 1

Thread 2:
0   libsystem_kernel.dylib              0x35c490d8 __psynch_mutexwait + 24
1   WebCore                             0x311454ef _ZL17_WebTryThreadLockb + 215
2   WebCore                             0x311a4173 _ZL19SendDelegateMessageP12NSInvocation + 707
3   WebKit                              0x3507ad87 -[_WebSafeForwarder forwardInvocation:] + 119
4   CoreFoundation                      0x35395a83 ___forwarding___ + 667
5   CoreFoundation                      0x352f0650 _CF_forwarding_prep_0 + 48
6   WebKit                              0x350816a1 WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(void (WebCore::PolicyChecker::*)(WebCore::PolicyAction), WebCore::NavigationAction const&, WebCore::ResourceRequest const&, WTF::PassRefPtr) + 221
7   WebCore                             0x3120b8b9 WebCore::PolicyChecker::checkNavigationPolicy(WebCore::ResourceRequest const&, WebCore::DocumentLoader*, WTF::PassRefPtr, void (*)(void*, WebCore::ResourceRequest const&, WTF::PassRefPtr, bool), void*) + 873
8   WebCore                             0x3120ae4d WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WTF::PassRefPtr) + 913
9   WebCore                             0x312092b9 WebCore::FrameLoader::load(WebCore::DocumentLoader*) + 169
10  WebCore                             0x312091e5 WebCore::FrameLoader::load(WebCore::ResourceRequest const&, WebCore::SubstituteData const&, bool) + 241
11  WebKit                              0x350b3f5f -[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:] + 1119
12  WebKit                              0x350b3797 -[WebFrame _loadHTMLString:baseURL:unreachableURL:] + 79
13  WebKit                              0x350b37bb -[WebFrame loadHTMLString:baseURL:] + 31
14  WebCore                             0x311950b5 HandleRunSource + 365
15  CoreFoundation                      0x35367ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16  CoreFoundation                      0x35367335 __CFRunLoopDoSources0 + 365
17  CoreFoundation                      0x35366045 __CFRunLoopRun + 653
18  CoreFoundation                      0x352e94a5 CFRunLoopRunSpecific + 301
19  CoreFoundation                      0x352e936d CFRunLoopRunInMode + 105
20  WebCore                             0x311e8ca3 _ZL12RunWebThreadPv + 403
21  libsystem_c.dylib                   0x32756735 _pthread_start + 321

Thread 3:
0   libsystem_kernel.dylib              0x35c39004 mach_msg_trap + 20
1   CoreFoundation                      0x353673f3 __CFRunLoopServiceMachPort + 127
2   CoreFoundation                      0x3536612b __CFRunLoopRun + 883
3   CoreFoundation                      0x352e94a5 CFRunLoopRunSpecific + 301
4   CoreFoundation                      0x352e936d CFRunLoopRunInMode + 105
5   Foundation                          0x34e22bb9 +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6   Foundation                          0x34e22a81 -[NSThread main] + 73
7   Foundation                          0x34eb6591 __NSThread__main__ + 1049
8   libsystem_c.dylib                   0x32756735 _pthread_start + 321

Thread 4:
0   libsystem_kernel.dylib              0x35c49570 __select + 20
1   libsystem_c.dylib                   0x32756735 _pthread_start + 321

Thread 5:
0   libsystem_kernel.dylib              0x35c39004 mach_msg_trap + 20
1   CoreFoundation                      0x353673f3 __CFRunLoopServiceMachPort + 127
2   CoreFoundation                      0x3536612b __CFRunLoopRun + 883
3   CoreFoundation                      0x352e94a5 CFRunLoopRunSpecific + 301
4   CoreFoundation                      0x352e936d CFRunLoopRunInMode + 105
5   YouTube                             0x33e336c9 -[YTImageLoader(Internal) _startLoader] + 245
6   Foundation                          0x34e22a81 -[NSThread main] + 73
7   Foundation                          0x34eb6591 __NSThread__main__ + 1049
8   libsystem_c.dylib                   0x32756735 _pthread_start + 321

Thread 6:
0   libsystem_kernel.dylib              0x35c49cd4 __workq_kernreturn + 8

Thread 7 Crashed:
0   WebCore                             0x311454e2 _ZL17_WebTryThreadLockb + 202
1   WebCore                             0x3114540f WebThreadLock + 55
2   UIKit                               0x32e5537b -[UIWebTiledView layoutSubviews] + 43
3   UIKit                               0x32e5534b -[UIWebDocumentView layoutSubviews] + 127
4   UIKit                               0x32dcaf37 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 183
5   CoreFoundation                      0x352f21fb -[NSObject performSelector:withObject:] + 43
6   QuartzCore                          0x321c2aa5 -[CALayer layoutSublayers] + 217
7   QuartzCore                          0x321c26bd CA::Layer::layout_if_needed(CA::Transaction*) + 217
8   QuartzCore                          0x321c6843 CA::Context::commit_transaction(CA::Transaction*) + 227
9   QuartzCore                          0x321c657f CA::Transaction::commit() + 315
10  QuartzCore                          0x3220dd01 CA::Transaction::release_thread(void*) + 37
11  libsystem_c.dylib                   0x327490ff _pthread_tsd_cleanup + 171
12  libsystem_c.dylib                   0x32748d7b _pthread_exit + 123
13  libsystem_c.dylib                   0x3275a0f3 pthread_exit + 31
14  Foundation                          0x34e3237b +[NSThread exit] + 11
15  Foundation                          0x34eb65af __NSThread__main__ + 1079
16  libsystem_c.dylib                   0x32756735 _pthread_start + 321

Thread 8:
0   libsystem_kernel.dylib              0x35c49cd4 __workq_kernreturn + 8

Thread 9:
0   libsystem_kernel.dylib              0x35c49cd4 __workq_kernreturn + 8

Thread 10:
0   libsystem_kernel.dylib              0x35c49cd4 __workq_kernreturn + 8

Thread 11:
0   libsystem_kernel.dylib              0x35c49cd4 __workq_kernreturn + 8

Thread 7 crashed with ARM Thread State:
    r0: 0xffffffff     r1: 0x00001100     r2: 0x2ffc850c     r3: 0x00000000 
    r4: 0xbbadbeef     r5: 0x00000000     r6: 0x0054b000     r7: 0x2ffc8b4c 
    r8: 0x0ca32800     r9: 0x3399fc2c    r10: 0x2ffc8be4    r11: 0x2ffc8ebc 
    ip: 0x3ee8e270     sp: 0x2ffc8b40     lr: 0x35790fef     pc: 0x32c7f4e2 
  cpsr: 0x60000030 

Binary Images:
[cut cause of char limit]

我不知道发生了什么,有人有想法吗?

3 个答案:

答案 0 :(得分:4)

问题是您从后台线程向UI对象发送消息,这是禁止的。

线程7与堆栈跟踪崩溃进入UIView的布局机制。线程7在此代码中的事实可能是由setNeedsLayout或从该后台线程发送的其他方法产生的。

答案 1 :(得分:3)

我认为网页视图已完成加载并尝试重新加载视图,但视图控制器已加速并发布,您需要在viewWillDisappear方法中添加此视图:

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    if ([webView isLoading]) {
        [webView stopLoading];
    }
}

答案 2 :(得分:0)

我所在的项目看到了在WebKit上运行的基于WinTel的GWT应用程序的类似异常。已确定只有在WebKit内存不足时才会出现此特定问题。