2012-11-28 5 views
0

계기 도구 (누수)를 사용하여 누출을 진단하고 있지만 코드를 어떻게 되돌릴 수 있는지 잘 모르겠습니다. 아무도 내가 어떻게 더 진단 할 수 있는지 안다?xCode 및 iOS : 누출로 디버그

Xcode 4.5 & iPad에서 프로파일 링 (iOS 4.3.5) 프로파일 링.

UPDATE는 :

thread #4: tid = 0x3203, 0x35dffd7a libicucore.A.dylib`utext_hasMetaData + 546, stop reason = EXC_BAD_ACCESS (code=2, address=0x0) 
    frame #0: 0x35dffd7a libicucore.A.dylib`utext_hasMetaData + 546 
    frame #1: 0x003c17d0 
    frame #2: 0x35da6746 libicucore.A.dylib`icu::RuleBasedBreakIterator::handleNext(icu::RBBIStateTable const*) + 806 
    frame #3: 0x35da6406 libicucore.A.dylib`icu::RuleBasedBreakIterator::next() + 82 
    frame #4: 0x35da5cde libicucore.A.dylib`icu::RuleBasedBreakIterator::following(int) + 218 
    frame #5: 0x35db0538 libicucore.A.dylib`ubrk_following + 8 
    frame #6: 0x32bb0bc8 WebCore`WebCore::textBreakFollowing(WebCore::TextBreakIterator*, int) + 8 
    frame #7: 0x32b9baee WebCore`WebCore::nextBreakablePosition(unsigned short const*, int, int, bool) + 270 
    frame #8: 0x32bd0dc8 WebCore`WebCore::RenderBlock::findNextLineBreak(WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, bool, bool&, bool&, bool&, WebCore::EClear*) + 6920 
    frame #9: 0x32b8ce02 WebCore`WebCore::RenderBlock::layoutInlineChildren(bool, int&, int&) + 1922 
    frame #10: 0x32b8a1ae WebCore`WebCore::RenderBlock::layoutBlock(bool) + 690 
    frame #11: 0x32b897c2 WebCore`WebCore::RenderBlock::layout() + 26 
    frame #12: 0x32b8b956 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&) + 414 
    frame #13: 0x32b8b24c WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, int&) + 428 
    frame #14: 0x32b8a1bc WebCore`WebCore::RenderBlock::layoutBlock(bool) + 704 
    frame #15: 0x32b897c2 WebCore`WebCore::RenderBlock::layout() + 26 
    frame #16: 0x32b8b956 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&) + 414 
    frame #17: 0x32b8b24c WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, int&) + 428 
    frame #18: 0x32b8a1bc WebCore`WebCore::RenderBlock::layoutBlock(bool) + 704 
    frame #19: 0x32b897c2 WebCore`WebCore::RenderBlock::layout() + 26 
    frame #20: 0x32b8b956 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&) + 414 
    frame #21: 0x32b8b24c WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, int&) + 428 
    frame #22: 0x32b8a1bc WebCore`WebCore::RenderBlock::layoutBlock(bool) + 704 
    frame #23: 0x32b897c2 WebCore`WebCore::RenderBlock::layout() + 26 
    frame #24: 0x32b8b956 WebCore`WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, int&, int&) + 414 
    frame #25: 0x32b8b24c WebCore`WebCore::RenderBlock::layoutBlockChildren(bool, int&) + 428 
    frame #26: 0x32b8a1bc WebCore`WebCore::RenderBlock::layoutBlock(bool) + 704 
    frame #27: 0x32b897c2 WebCore`WebCore::RenderBlock::layout() + 26 
    frame #28: 0x32b8974e WebCore`WebCore::RenderView::layout() + 334 
    frame #29: 0x32b85cba WebCore`WebCore::FrameView::layout(bool) + 1486 
    frame #30: 0x32b82c12 WebCore`WebCore::Document::implicitClose() + 794 
    frame #31: 0x32b828f6 WebCore`WebCore::FrameLoader::checkCallImplicitClose() + 86 
    frame #32: 0x32b827fe WebCore`WebCore::FrameLoader::checkCompleted() + 134 
    frame #33: 0x32b82380 WebCore`WebCore::FrameLoader::finishedParsing() + 64 

Screenshot of Leaks

UPDATE : 확장 세부 사항 계기 여기에 역 추적입니다. 아직 소스를 가리키고 있지 않습니다. 대신 기계 코드를 가리 킵니다. 당신이 확장 된 상세보기를 열면

with Extended Detail

답변

1

, 당신은 당신이 상세 뷰에서 누출을 선택할 때 호출 스택을 볼 수 있어야합니다. 또한 호출 트리보기로 전환하면 코드에서 누수가 발생한 위치를 확인할 수 있습니다. 점프 바를 사용하여 호출 트리보기로 전환하십시오.

호출 트리보기로 전환하면 호출 트리 왼쪽에 일련의 확인란이 표시됩니다. 반전 호출 트리 및 시스템 라이브러리 숨기기 확인란을 선택하면 호출 트리에서 코드를 찾을 수 있습니다. 호출 트리에서 함수 중 하나를 두 번 클릭하면 누수 된 메모리를 할당하는 코드 줄이 표시됩니다.

+0

감사합니다. 당신이 지시 한대로 행해졌지만, 여전히 올바른 길을 가리키고 있지 않습니다. 질문을 업데이트했습니다. – Raptor

+0

스크린 샷의 확장 상세보기가 호출 스택의 소스를 보여줍니다. 단지 기계어 코드를 보여 주었다면, 함수 이름 대신 호출 스택에 메모리 주소를 가져올 수 있습니다. 호출 트리보기는 코드를 찾는 데 더 좋습니다. 호출 트리 뷰에 함수 이름 대신 메모리 주소가 표시되면 프로젝트에서 디버그 기호가 생성되는지 확인하십시오. –