Ableton / LinkKit

iOS SDK for Ableton Link, a new technology that synchronizes musical beat, tempo, and phase across multiple applications running on one or more devices.
http://ableton.github.io/linkkit
Other
147 stars 10 forks source link

Crashes when calling ABLLinkDelete because layoutMargins observer is not removed in ABLSettingsViewController.mm. #49

Closed cerupcat closed 5 years ago

cerupcat commented 5 years ago

ABLSettingsViewController observes the layoutMargins key, but doesn't remove the observer on dealloc and therefore a crash can occur when it gets deallocated.

cerupcat commented 5 years ago

Please add [self.tableView removeObserver:self forKeyPath:"layoutMargins"] to the deinit call in ABLESettingsViewController.mm

fgo-ableton commented 5 years ago

Thanks for reporting this. I made a new release with the suggested fix. Please give it a try. How did you run into this? Are you using the precompiled release or do you use the VC alone?

cerupcat commented 5 years ago

@fgo-ableton I'm using the precompiled release and I saw some crashes come in from crashlytics. It's fairly rare, but I was able to reproduce it at random and narrowed it down to this.

fgo-ableton commented 5 years ago

@cerupcat Thanks for the info! According to Apple this should only be an issue with older iOS versions. Maybe that is why it did not come up earlier.