mrackwitz / MRProgress

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

App crashes when trying to display #88

Closed Daltron closed 9 years ago

Daltron commented 9 years ago

Hey again!

I posted an exact same issue a few weeks ago but I am getting another error.

Here is my method call:

-(void)viewDidAppear:(BOOL)animated{
     [MRProgressOverlayView showOverlayAddedTo:_inspectedView.window title:@"Uploading..." mode:MRProgressOverlayViewModeDeterminateCircular animated:true];
}

This is what I get back in return: The compiler throws a breakpoint in the snapshot method of MRBlurView.m

// Translate to draw at the absolute origin of the receiver
    CGContextTranslateCTM(context, -origin.x, -origin.y);

    // Draw the window
    [window.layer renderInContext:context]; <------------ This is where the breakpoint occurs

    // Capture the image and exit context
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

I also get this in the console:

Assertion failed: (transform_is_valid(m)), function CGPathRef CGPathCreateWithRect(CGRect, const CGAffineTransform *), file Paths/CGPath.cc, line 179.

Any help would be appreciated!

Thanks

mrackwitz commented 9 years ago

One thing, which directly jumps in my eyes is, you either forgot to call the super method, or you removed it from the condensed sample code, you posted here:

 -(void)viewDidAppear:(BOOL)animated{
+    [super viewDidAppear:animated];
     [MRProgressOverlayView showOverlayAddedTo:_inspectedView.window title:@"Uploading..." mode:MRProgressOverlayViewModeDeterminateCircular animated:true];

Is _inspectedView always initialized, when this happens?

Daltron commented 9 years ago

That was indeed the case! Sorry for not reporting back earlier!

mrackwitz commented 9 years ago

Still thanks for the feedback!