使用NSZombie调试EXC_BAD_ACCESS

时间:2014-12-25 13:50:41

标签: ios xcode memory-management nszombie

我得到一个相当特殊的EXC_BAD_ACCESS问题。在基于库存的应用程序中,创建收据时...如果车辆已经存在于数据库中,则应用程序正常工作,并且当正在查看新车辆的收据时崩溃。

我尝试使用NSZombieEnabled运行应用程序,但当应用程序崩溃时除lldb外没有任何内容登录到控制台。

所以问题是如果NSZombieEnabled不起作用,我如何确定导致应用程序崩溃的原因。

我正在运行Xcode 5(最新版本)进行开发。

修改在命令提示符下运行bt。我得到的回溯

(lldb) bt
* thread #1: tid = 0x16915d, 0x006e427f OpenGLES`+[EAGLContext setCurrentContext:] + 80, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xc)
frame #0: 0x006e427f OpenGLES`+[EAGLContext setCurrentContext:] + 80
frame #1: 0x0c725f2a CoreImage`CIEAGLContextTexImageIOSurface + 389
frame #2: 0x0c70b6a8 CoreImage`CI::GLESTextureManager::attach_IOSurface(__IOSurface*, bool, int, unsigned int, int, int, int, bool) + 950
frame #3: 0x0c70f6ab CoreImage`CI::GLESContext::bind_surface(__IOSurface*, int, bool, bool, bool) + 261
frame #4: 0x0c70ec6a CoreImage`CI::GLESContext::bind_textures(CI::SerialObjectPtrArray*, CI::Kernel*) + 336
frame #5: 0x0c70e7a7 CoreImage`CI::GLESContext::render_apply_node(CI::Node const*, bool) + 151
frame #6: 0x0c70e5bb CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 697
frame #7: 0x0c70e498 CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 406
frame #8: 0x0c70e36b CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 105
frame #9: 0x0c70e498 CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 406
frame #10: 0x0c70e36b CoreImage`CI::GLESContext::recursive_render(CI::Node const*, bool) + 105
frame #11: 0x0c70f068 CoreImage`CI::GLESContext::render(CI::Node*) + 176
frame #12: 0x0c71bfa9 CoreImage`CI::image_get_cgimage(CI::Context*, CI::Image*, CGRect, CGColorSpace*, CI::PixelFormat) + 2069
frame #13: 0x0c6f41c3 CoreImage`-[CIContext createCGImage:fromRect:format:colorSpace:] + 671
frame #14: 0x0c6f3eb6 CoreImage`-[CIContext createCGImage:fromRect:] + 99
frame #15: 0x0c55a82f CoreUI`-[CUITextEffectStack drawProcessedMask:atBounds:inContext:withScale:] + 909
frame #16: 0x0c55b8dd CoreUI`-[CUITextEffectStack drawGlyphs:inContext:usingFont:atPositions:count:lineHeight:inBounds:atScale:] + 540
frame #17: 0x0c565460 CoreUI`-[CUICatalog drawGlyphs:atPositions:inContext:withFont:count:stylePresetName:styleConfiguration:foregroundColor:] + 1770
frame #18: 0x0c3e0c05 UIFoundation`-[NSLineFragmentRenderingContext drawAtPoint:inContext:] + 3657
frame #19: 0x0c41721a UIFoundation`__NSStringDrawingEngine + 18606
frame #20: 0x0c41a10b UIFoundation`-[NSAttributedString(NSExtendedStringDrawing) drawWithRect:options:context:] + 622
frame #21: 0x01bd6891 UIKit`-[UILabel _drawTextInRect:baselineCalculationOnly:] + 6626
frame #22: 0x01bd4574 UIKit`-[UILabel drawTextInRect:] + 581
frame #23: 0x01bd6996 UIKit`-[UILabel drawRect:] + 98
frame #24: 0x01a4b95c UIKit`-[UIView(CALayerDelegate) drawLayer:inContext:] + 519
frame #25: 0x00a7fd61 QuartzCore`-[CALayer drawInContext:] + 118
frame #26: 0x00a7fc97 QuartzCore`backing_callback(CGContext*, void*) + 96
frame #27: 0x009644fe QuartzCore`CABackingStoreUpdate_ + 2788
frame #28: 0x00a7fc2f QuartzCore`___ZN2CA5Layer8display_Ev_block_invoke + 93
frame #29: 0x00ab5416 QuartzCore`x_blame_allocations + 15
frame #30: 0x00a7fa95 QuartzCore`CA::Layer::display_() + 1591
frame #31: 0x00a7fce6 QuartzCore`-[CALayer _display] + 33
frame #32: 0x00a7f456 QuartzCore`CA::Layer::display() + 142
frame #33: 0x00a7fcc0 QuartzCore`-[CALayer display] + 33
frame #34: 0x00a73ef6 QuartzCore`CA::Layer::display_if_needed(CA::Transaction*) + 322
frame #35: 0x00a73f7c QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 38
frame #36: 0x009d23c6 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 284
frame #37: 0x009d378c QuartzCore`CA::Transaction::commit() + 392
frame #38: 0x009d3e58 QuartzCore`CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
frame #39: 0x032df9de CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #40: 0x032df920 CoreFoundation`__CFRunLoopDoObservers + 400
frame #41: 0x032d535a CoreFoundation`__CFRunLoopRun + 1226
frame #42: 0x032d4bcb CoreFoundation`CFRunLoopRunSpecific + 443
frame #43: 0x032d49fb CoreFoundation`CFRunLoopRunInMode + 123
frame #44: 0x0622124f GraphicsServices`GSEventRunModal + 192
frame #45: 0x0622108c GraphicsServices`GSEventRun + 104
frame #46: 0x019c08b6 UIKit`UIApplicationMain + 1526
* frame #47: 0x0028951d Racks`main(argc=1, argv=0xbff245a8) + 141 at main.m:16
frame #48: 0x03dbdac9 libdyld.dylib`start + 1

0 个答案:

没有答案