how to understand Crash Log of iPhone

前端 未结 5 2013
[愿得一人]
[愿得一人] 2020-12-16 17:28

i only know it Crash not run out of memory.

how did i know which it cause of error?

Incident Identifier: 242C320A-763C-407E-BD40-443E3E9B611C
CrashRe         


        
5条回答
  •  我在风中等你
    2020-12-16 18:06

    I came across the same issue and found a repro case: When I flick through the images in the FlowCoverView and immediately hit the done button, it crashes with the exact same crash log.

    Looks like the done action causes the FlowCoverViewController to be released, which causes the FlowCoverView’s delegate to zombie out.

    If the FlowCoverView’s touchesEnded is in progress during this time, it leads to a crasher.

    There may be a better way to fix this, but here’s what I attempted that seemed to have solved this problem:

    In the FlowCoverViewController’s dealloc method, I tried to access the FlowCoverView to set it’s delegate to nil:

    -(void)dealloc
    {
    NSArray *viewsArray = [self.view subviews];
    for (UIView*v in viewsArray)
    {
    if ([v isKindOfClass:[FlowCoverView class]])
    {
    FlowCoverView *fcv = (FlowCoverView*)v;
    fcv.delegate = nil;
    }
    }
    ...
    }
    

    Let me know if this solved your crash.

提交回复
热议问题