Unable to find reason for Crash on -[UIScrollView(UIScrollViewInternal) _scrollViewAnimationEnded:finished:]

后端 未结 3 748
日久生厌
日久生厌 2021-02-05 13:55

In my app many crashes with the following log are reported very often, but even with several test devices and iOS versions I am not able to reproduce it. So there\'s no way to f

相关标签:
3条回答
  • 2021-02-05 14:05

    You might want to take a look at this thread: Is there a way to cancel an animated UITableView/UIScrollView setContentOffset:animated:?

    That discussion suggests it might be a delegate that is dealloc'd before the scrollview sends the animation ended message.

    0 讨论(0)
  • 2021-02-05 14:06

    The SIGSEGV signal is sent to a process when it makes an invalid virtual memory reference, or segmentation fault. (see Wikipedia)

    So you are accessing an object that likely has been released. As this is an during an animation, maybe you defined a selector to be invoked after the animation finished or something like that? That would be were I would starting looking.

    0 讨论(0)
  • 2021-02-05 14:18

    I had the same crash. It turned out to be because we were animating a controller with [controller setContentOffset:newPt animated:YES], and we implemented the scrollViewDidScroll delegate method on the controller. Clicking a button on the screen let you advance to another controller, so if a user managed to click the button while the animation was in progress, we would hit the original poster's crash. The solution is simply to set the delegate to nil in dealloc.

    0 讨论(0)
提交回复
热议问题