기기 (iPhone 4)에서 애플리케이션을 실행할 때이 exc_bad_access가 표시됩니다. NSZombieEnabled를 YES로 설정하여 좀비 사용을 시도했습니다. 응용 프로그램이 exc_bad_access와 충돌하지만 충돌이 발생하지 않습니다.iPhone에서 EXC_BAD_ACCESS는 시뮬레이터에 없습니다.
신고 된 clang 분석기를 사용하여 빌드 및 분석, 스캔 빌드의 모든 오류를 수정했습니다. 시뮬레이터에서 완벽하게 작동합니다. 앱은 libxml2를 사용하여 XML을 파싱하고 UITableView에 콘텐츠를 표시합니다. 어떤 도움을 주시면 감사하겠습니다.
업데이트 : (gdb) 정보 스레드 응답을 추가했습니다. 내가 놓친 EXC_BAD_ACCESS를 디버깅하는 다른 방법이 있습니까?
(gdb) bt
#0 0x33a0daba in CALayerStateRelease()
#1 0x339f3d9e in CALayerFreeTransaction()
#2 0x339f3330 in CA::Transaction::commit()
#3 0x33a179bc in CA::Transaction::observer_callback()
#4 0x3082823c in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__()
#5 0x308280b0 in __CFRunLoopDoObservers()
#6 0x3081f28c in CFRunLoopRunSpecific()
#7 0x3081f17e in CFRunLoopRunInMode()
#8 0x31e445f2 in GSEventRunModal()
#9 0x31e4469e in GSEventRun()
#10 0x31e51122 in -[UIApplication _run]()
#11 0x31e4f12e in UIApplicationMain()
#12 0x0000285e in main (argc=1, argv=0x2ffff53c) at /Users/Home/Desktop/ProductNavigation_libxml2_regular/main.m:14
(gdb) info threads
6 (Thread 0x770b: user=0.000000 system=0.000000 cpu=0 sleep_time=0) 0x3027a19c in __workq_kernreturn()
5 (Thread 0x6e07: user=0.010000 system=0.010000 cpu=0 sleep_time=0) 0x30224060 in select$DARWIN_EXTSN()
4 (Thread 0x6103: user=0.030000 system=0.030000 cpu=0 sleep_time=0) 0x301ffc98 in mach_msg_trap()
3 (Thread 0x2003: user=0.000000 system=0.000000 cpu=0 sleep_time=0) 0x301ffc98 in mach_msg_trap()
2 (Thread 0x1703: user=0.000000 system=0.000000 cpu=0 sleep_time=0) 0x3022c330 in kevent()
* 1 (Thread 0x0307: user=1.160000 system=1.160000 cpu=0 sleep_time=0) 0x33a0daba in CALayerStateRelease()
(gdb)
업데이트 # 2 : 그것은 인쇄 문제가 될 수처럼 또 다른 스택 추적이 제한된 정보에서
#0 0x3002d844 in objc_msgSend_stret()
#1 0x31ed5b8e in -[UITableViewCellLayoutManager(UITableViewCellLayoutManagerStatic) _editingAccessoryRectForCell:offscreen:]()
#2 0x31ed5374 in -[UITableViewCellLayoutManager(UITableViewCellLayoutManagerStatic) _reorderSeparatorRectForCell:offscreen:]()
#3 0x31ed5266 in -[UITableViewCellLayoutManager reorderSeparatorEndingRectForCell:forNewEditingState:]()
#4 0x31ed48ae in -[UITableViewCellLayoutManager layoutSubviewsOfCell:]()
#5 0x3206ae24 in -[UITableViewCellLayoutManagerSubtitle layoutSubviewsOfCell:]()
#6 0x31ed37c0 in -[UITableViewCell layoutSubviews]()
#7 0x31e5cbc6 in -[UIView(CALayerDelegate) _layoutSublayersOfLayer:]()
#8 0x308362ea in -[NSObject(NSObject) performSelector:withObject:]()
#9 0x339f9948 in -[CALayer layoutSublayers]()
#10 0x339f9700 in CALayerLayoutIfNeeded()
#11 0x339f34ca in CA::Context::commit_transaction()
#12 0x339f32e0 in CA::Transaction::commit()
#13 0x33a179bc in CA::Transaction::observer_callback()
#14 0x3082823c in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__()
#15 0x308280b0 in __CFRunLoopDoObservers()
#16 0x3081f6ba in __CFRunLoopRun()
#17 0x3081f276 in CFRunLoopRunSpecific()
#18 0x3081f17e in CFRunLoopRunInMode()
#19 0x31e445f2 in GSEventRunModal()
#20 0x31e4469e in GSEventRun()
#21 0x31e51122 in -[UIApplication _run]()
#22 0x31e4f12e in UIApplicationMain()
당신이하고있는 일을 보여주는 코드를 제공 할 수 있습니다. –