prolificinteractive / Caishen

A Payment Card UI & Validator for iOS
MIT License
766 stars 119 forks source link

Caishen causing crash #136

Open korovyev opened 6 years ago

korovyev commented 6 years ago

It seems something is keeping a strong reference to CardTextField and is not releasing it

It then still seems to be registered for some internal notification that tries to access its superview, which it might not have at that point, causing crash. (In our case this is caused by a call to .setContentOffset(.. on a collectionView)

Heres the call stack screen shot 2018-02-27 at 14 41 48

And heres a screenshot of the memory graph showing the textfields still in memory after the view controller in which they reside is released screen shot 2018-02-27 at 14 42 08

Heres a sample project demonstrating the crash: CaishenCrash.zip

Steps to reproduce in the demo project:

Also, in our crashlytics data, this only seems to be happening on iOS 11 too, for some reason.