UIImageView crash in [UIImageView isAnimating]

Hi,

I see for a certain low percentage of usage a crash in a routine that is dispatched async to the main thread - for multiple iOS Versions. Has anybody an idea what might be the reason?

Thanks!

Code Block
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000a275a9dec
libobjc.A.dylib 0x1a005a2e4 objc_opt_class + 16
1 UIKitCore 0x18ded3408 -[UIImageView isAnimating] + 48
2 UIKitCore 0x18ded37f8 -[UIImageView setBackgroundColor:] + 56
3 SomeApp 0x1042abc10 -[SomeView updateViewWithImage] + yyy (SomeView.m:yyy)


Code Block
- (void) updateViewWithImage {}
// Lots of geometry calculation removed
if (_logoView && self.logoImage) {
// crash here:
_logoView.backgroundColor = [UIColor clearColor];
_logoView.frame = CGRectMake(0, round((self.frame.size.height - imgHeight) / 2), round(imgWidth), round(imgHeight));
_logoView.image = self.logoImage;
}
}




If you remove _logoView.backgroundColor = [UIColor clearColor];

Code Block
if (_logoView && self.logoImage) {
// crash here:
_logoView.backgroundColor = [UIColor clearColor];

Does the app crash on next instruction ?

Could you show how you launch animation ?
  • The UIImage is just a plain [UIImage imageWithData:...] generated in a background thread, the UI update is dispatched to the main thread.

  • I couldn't reproduce it yet. The code is run on every app execution, the probability to have this crash seems to be 1:5000.

I see for a certain low percentage of usage a crash in a routine that
is dispatched async to the main thread

Please post a full Apple crash report for this. Use the text attachment feature (the paperclip icon) to avoid clogging up the timeline.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
UIImageView crash in [UIImageView isAnimating]
 
 
Q