Closed jandillmann closed 10 years ago
I found the cause for this bug by enabling zombie elements and instrumenting the demo app. The cellConfigurations dictionary gets released too early, so reloading leads to EXC_BAD_ACCESS crashes. The pull request above correctly initializes the dictionary, which prevents this bug.
podspec has been updated so this should be all set. Just give it an update.
Thanks, it seems to work now.
But I'm a bit confused about your versioning scheme, had to change my podfile to pod 'RZCellSizeManager', :head
to get the changes. It's probably a good idea to use semantic versioning and updating the version in the podspec accordingly.
@jandillmann Glad to hear it worked, and sorry you had to hack the podfile - we didn't actually change any of the code, only the podspec, so I didn't think there was a need for semantic versioning this time, but we will definitely keep that in mind for the future.
I'm wondering whether in this particular case it might have been because you were trying to update your pods after they were already installed? For example, I just did a fresh checkout of your example project, and everything worked just fine - note the -fobjc-arc
flag.
Thanks again for helping us find and fix the issue.
Ah, my bad. Checking version 1.1 out again works, too.
Thanks for your help, @ndonald2 :+1:
Hi,
I'm trying to use this library for a collection view, however the app crashes when I call
[self.collectionView reloadData]
. I'm using version 1.1.0 from cocoapods and created a demo app which can be downloaded here: https://github.com/jandillmann/CollectionViewCellSizeDemo Clicking reload in this demo crashes the app in line 475 of RKCellSizeManager.m in- (RZCellSizeManagerCellConfiguration *)configurationForObject:(id)object reuseIdentifier:(NSString *)reuseIdentifier
when calling[self.cellConfigurations enumerateKeysAndObjectsUsingBlock:^(id key, RZCellSizeManagerCellConfiguration* obj, BOOL *stop) {
.Am I using something wrong or is this a bug in the library?
Cheers, Jan