jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

Crash on -[MBProgressHUD done] #537

Open smajekp opened 6 years ago

smajekp commented 6 years ago

Hello, I have crash on my app on -[MBProgressHUD done]. I have this lib on my project from November 2016 and I never have any problem with MBProgressHud till now. On fabric I have many crashes on this method. All crashes are on iOS 11.

This is usage of your library on my project:

- (void)showWaitHUD {
    [self addSubview:self.progressHUD];
    [self.progressHUD showAnimated:YES];
}

- (void)hideWaitHUD {
    [self.progressHUD hideAnimated:YES];
}

static void *kProgressHUDKey;

- (MBProgressHUD *)progressHUD {
    MBProgressHUD *progressHUD = objc_getAssociatedObject(self, &kProgressHUDKey);
    if (!progressHUD) {
        progressHUD = [[MBProgressHUD alloc] initWithView:self];
    //custom view configuration here
        objc_setAssociatedObject(self, &kProgressHUDKey, progressHUD, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    }
    return progressHUD;
}
matej commented 6 years ago

This has no information on the actual crash.

smajekp commented 6 years ago

This is stack trace from fabric.


0  libobjc.A.dylib                0x180940910 objc_msgSend + 16
1  UIKit                          0x18b77aef8 __UIViewWasRemovedFromSuperview + 192
2  UIKit                          0x18b359e58 -[UIView(Hierarchy) removeFromSuperview] + 492
3  MBProgressHUD                  0x103a99728 -[MBProgressHUD done] (MBProgressHUD.m:307)
4  UIKit                          0x18b33d7ac -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 760
5  UIKit                          0x18b33d134 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 312
6  UIKit                          0x18b427048 -[UIViewAnimationState animationDidStop:finished:] + 296
7  QuartzCore                     0x1858f8774 CA::Layer::run_animation_callbacks(void*) + 284
8  libdispatch.dylib              0x181064ae4 _dispatch_client_callout + 16
9  libdispatch.dylib              0x1810716e0 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1012
10 CoreFoundation                 0x18171b070 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
11 CoreFoundation                 0x181718bc8 __CFRunLoopRun + 2272
12 CoreFoundation                 0x181638da8 CFRunLoopRunSpecific + 552
13 GraphicsServices               0x18361b020 GSEventRunModal + 100
14 UIKit                          0x18b61978c UIApplicationMain + 236
15 Project Name                   0x102e0b470 main (main.m:13)
16 libdyld.dylib                  0x1810c9fc0 start + 4
542604974 commented 6 years ago

I have this crash , self.alpha = 0.0f;