NSManagedObject dealloc崩溃

时间:2015-02-17 10:48:12

标签: ios objective-c core-data crash nsmanagedobject

我的用户收到了一些崩溃报告,下面复制了一个神秘的内容。不幸的是我无法重现它,所以我不能给任何代码和平。我没有太多体验如何分析这个崩溃,我认为在我的应用程序中有一个NSManagedObject子类没有得到适当保留(也许它是弱而不是强?)。

我尝试使用NSZombies调试我的应用,但它没有帮助(因为在我看来,消息被发送到一个无效的对象)。

欢迎任何想法,我能够更接近解决方案。

(线程6崩溃了,而不是主线程。)

Incident Identifier: 00CFA055-D5C3-43B4-8FFB-C6DBFAB8DB91
CrashReporter Key:   890F7AB9-9E86-425F-BE09-12D9B1AEB42F
Hardware Model:      iPhone6,1
Process:         MySuperApp [10987]
Path:            /Users/USER/MySuperApp.app/MySuperApp
Identifier:      com.mysuperapp.mysuperappapp
Version:         528
Code Type:       ARM-64
Parent Process:  launchd [1]

Date/Time:       2015-02-14T18:00:23Z
OS Version:      iPhone OS 7.1.2 (11D257)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x23cbbeb8
Crashed Thread:  6

Application Specific Information:
objc_msgSend() selector name: _queueForDealloc:

Thread 0:
0   CoreText                             0x0000000186176b5c TAATMorphTableMorx::GetChain(unsigned int&) + 12
1   CoreText                             0x0000000186183234 TShapingEngine::ShapeGlyphs(TLine&, TCharStream const*, CFRange&, TGlyphList<TDeletedGlyphIndex>*) + 324
2   CoreText                             0x0000000186182ad8 TTypesetter::TTypesetter(__CFArray const*, __CFString const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*) + 192
3   CoreText                             0x00000001861828f0 CTTypesetterCreateWithRunArray + 88
4   UIFoundation                         0x000000018eafded8 -[NSATSGlyphStorage createCTTypesetter] + 1464
5   UIFoundation                         0x000000018eaf8efc -[NSATSTypesetter _ctTypesetter] + 332
6   UIFoundation                         0x000000018eb01b34 -[NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 140
7   UIFoundation                         0x000000018eaf9a68 -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 2144
8   UIFoundation                         0x000000018eb07874 -[NSSingleLineTypesetter createRenderingContextForCharacterRange:typesetterBehavior:usesScreenFonts:hasStrongRight:maximumWidth:] + 412
9   UIFoundation                         0x000000018eb38aac __NSStringDrawingEngine + 16812
10  UIFoundation                         0x000000018eb3a248 -[NSAttributedString boundingRectWithSize:options:context:] + 1508
11  UIKit                                0x00000001889ad868 -[UILabel _drawTextInRect:baselineCalculationOnly:] + 792
12  UIKit                                0x0000000188a1dca0 -[UILabel drawTextInRect:] + 524
13  UIKit                                0x0000000188a1da34 -[UIView drawLayer:inContext:] + 364
14  QuartzCore                           0x00000001885b4f7c -[CALayer drawInContext:] + 140
15  QuartzCore                           0x000000018859f55c CABackingStoreUpdate_ + 2432
16  QuartzCore                           0x000000018859ebc8 x_blame_allocations + 108
17  QuartzCore                           0x000000018859e758 CA::Layer::display_() + 1256
18  QuartzCore                           0x000000018857f01c CA::Layer::display_if_needed(CA::Transaction*) + 240
19  QuartzCore                           0x000000018857ece4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 40
20  QuartzCore                           0x000000018857e560 CA::Context::commit_transaction(CA::Transaction*) + 276
21  QuartzCore                           0x000000018857e304 CA::Transaction::commit() + 420
22  QuartzCore                           0x0000000188577c38 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 76
23  CoreFoundation                       0x000000018598f858 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
24  CoreFoundation                       0x000000018598cae0 __CFRunLoopDoObservers + 368
25  CoreFoundation                       0x000000018598ce6c __CFRunLoopRun + 760
26  CoreFoundation                       0x00000001858cddd0 CFRunLoopRunSpecific + 452
27  GraphicsServices                     0x000000018b5b5c0c GSEventRunModal + 168
28  UIKit                                0x00000001889fefc4 UIApplicationMain + 1156
29  MySuperApp                             0x000000010011ee88 main (main.m:16)
30  libdyld.dylib                        0x00000001924cbaa0 start + 0


Thread 6 Crashed:
0   libobjc.A.dylib                      0x0000000191ee81d0 objc_msgSend + 16
1   CoreData                             0x00000001856e0bd0 -[NSManagedObject release] + 168
2   CoreData                             0x00000001856d6aa8 -[_PFArray dealloc] + 96
3   libobjc.A.dylib                      0x0000000191ef1474 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 520
4   libdispatch.dylib                    0x00000001924b72e4 _dispatch_root_queue_drain + 596
5   libdispatch.dylib                    0x00000001924b74fc _dispatch_worker_thread2 + 72
6   libsystem_pthread.dylib              0x00000001926456bc _pthread_wqthread + 356
7   libsystem_pthread.dylib              0x000000019264554c start_wqthread + 4


Thread 6 crashed with ARM-64 Thread State:
    pc: 0x0000000191ee81d0     fp: 0x00000001100b39c0     sp: 0x00000001100b39a0     x0: 0x0000000171e5a040 
    x1: 0x00000001858968c2     x2: 0x000000017aad6ea0     x3: 0x00000001925ffcdc     x4: 0x0000000000000001 
    x5: 0x0000000000000010     x6: 0x0000000175ccff80     x7: 0x0000000000000000     x8: 0x00000001928b1430 
    x9: 0x0000000023cbbea8    x10: 0x0000000000000000    x11: 0x00000088000000ff    x12: 0x000000014f060e10 
   x13: 0xbadd0ade23cbbead    x14: 0xffffffffffffffff    x15: 0x0000000000000001    x16: 0x0000000191ee81c0 
   x17: 0x00000001856e0b24    x18: 0x0000000000000000    x19: 0x000000017aad6ea0    x20: 0x00000001928d1000 
   x21: 0x000000019291e200    x22: 0x00000001928d1000    x23: 0x0000000000000000    x24: 0x0000000000000010 
   x25: 0x000000010e674038    x26: 0xa3a3a3a3a3a3a3a3    x27: 0x0000000000000001    x28: 0x0000000000000000 
    lr: 0x00000001856e0bd0   cpsr: 0x0000000020000000 

1 个答案:

答案 0 :(得分:0)

所以,我找到了基于this awesome framework的原因来调试CD并发性。原因与自动释放池和NSManagedObject的章节中描述的in this tutorial完全相同。