mrackwitz / MRProgress

Collection of iOS drop-in components to visualize progress
MIT License
2.55k stars 306 forks source link

Crash in MRProgressOverlayView.m, line 766, objc_msgSend() selector name: _maskView #75

Closed romanr closed 9 years ago

romanr commented 9 years ago

iPad, iOS8.0

[MRProgressOverlayView manualLayoutSubviews] in MRProgressOverlayView.m, line 766 Reason: objc_msgSend() selector name: _maskView

trace:

objc_msgSend() selector name: _maskView

Thread 0 Crashed:
0   libobjc.A.dylib                      0x2f614f46 objc_msgSend + 6
1   UIKit                                0x254cd7a5 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 346
2   UIKit                                0x254cd7f1 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 422
3   UIKit                                0x254cd10f _UIViewVisitorEntertainDescendingTrackingVisitors + 760
4   UIKit                                0x250ffb71 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 174
5   UIKit                                0x250ffa4d -[UIView(Hierarchy) _postMovedFromSuperview:] + 426
6   UIKit                                0x25109e73 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1432
7   UIKit                                0x251098d3 -[UIView(Hierarchy) addSubview:] + 28
8   UIKit                                0x2510123d -[UIView _setMaskView:] + 214
9   UIKit                                0x2553fe01 -[UIVisualEffectView setMaskView:] + 422
10  app beta                          0x0026d295 -[MRProgressOverlayView manualLayoutSubviews] (MRProgressOverlayView.m:766)
11  UIKit                                0x25134563 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 480
12  UIKit                                0x25134377 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:] + 64
13  app beta                          0x0026b02b -[MRProgressOverlayView deviceOrientationDidChange:] (MRProgressOverlayView.m:237)
14  CoreFoundation                       0x21c1e4a1 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 10
15  CoreFoundation                       0x21b7a93d _CFXNotificationPost + 1782
16  Foundation                           0x228aa9b9 -[NSNotificationCenter postNotificationName:object:userInfo:] + 70
17  UIKit                                0x251042f3 -[UIDevice setOrientation:animated:] + 316
18  UIKit                                0x251040a3 -[UIApplication handleEvent:withNewEvent:] + 1564
19  UIKit                                0x251039c1 -[UIApplication sendEvent:] + 70
20  UIKit                                0x25168801 _UIApplicationHandleEvent + 630

Also sometimes it crashes with

\ Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM _maskView]:

mrackwitz commented 9 years ago

Could it be the case that the MRProgressOverlayView is not retained properly and is removed from the view hierarchy?

mrackwitz commented 9 years ago

I was able at least once to reproduce this issue, but not constantly. This won't appear with the 0.8.0 release as new iOS 8 APIs are not used there. Thanks for your feedback. If something like this happens again for you, please feel free to create a new issue.