MortimerGoro / MGSwipeTableCell

An easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions.
MIT License
6.96k stars 1.07k forks source link

iOS 11 Crash #294

Closed vanderhooft closed 7 years ago

vanderhooft commented 7 years ago

Steps to reproduce:

crashes here: https://github.com/MortimerGoro/MGSwipeTableCell/blob/d623fb9c4c75f6c5bf7307eff961cb96073b439c/MGSwipeTableCell/MGSwipeTableCell.m#L978 objc[288]: Cannot form weak reference to instance (0x10212e200) of class UITableView. It is possible that this object was over-released, or is in the process of deallocation.

More info:

MortimerGoro commented 7 years ago

Hi @vanderhooft

Thank you very much for the detailed info about this crash, it was really helpful.

I decided to get rid of the _cachedParentTable reference. Using __unsafe_unretained seems a bit dangerous and may lead to other difficult to debug crashes. Doing the lookup is fast enough and it's only done in specific moments (when swipe starts or ends). So it's not vital to cache it.

MortimerGoro commented 7 years ago

I just published 1.6.1 release with this fix included

vanderhooft commented 7 years ago

Thanks for the update! Tested; works great.