mrackwitz / MRProgress

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

iOS 8.1 Issues [EXC_BAD_ACCESS, No Overlay Background Shown) #73

Closed Deadpikle closed 9 years ago

Deadpikle commented 9 years ago

Hi, I just updated my app to iOS 8.1, and there are two separate issues I'm having with MRProgress. Perhaps they are related. The app often crashes with EXC_BAD_ACCESS when I show an MRProgressOverlayView, and the overlay view does not have its fancy white background when it happens to not crash. It is a bit random, and unfortunately I haven't been able to get a stack trace. When it does not crash, the only thing shown is the progress view's title and the blue [in]determinate circle.

Things of note: -I am showing the overlay view in viewDidLoad in [self view]. If I move it to viewDidAppear, it seems to work, but that is not optimal since then the user sees the screen before the loading view is shown! -I do have the fix from the iPad non-flickering branch "installed," but this was also happening before I installed it.

Thanks.

mrackwitz commented 9 years ago

Which version of the pod do you use exactly? Is it the last prerelease? If not try that perhaps, but beware there are known issues with the "classic" mode on iPhone 6+, too. It would be definitively helpful if you can paste the stacktraces in here. Furthermore you should show the overlay in viewWillAppear, this should solve your issues.

Deadpikle commented 9 years ago

Hi! Thanks for replying so quickly. I'm not actually using Cocoapods at the moment. I'm simply drag+dropping the source files into my project. I'm using the latest version that I downloaded just today (20 October), so I believe that implies I'm on 0.8.0-alpha1. Seeing as how I didn't realize I was installing an alpha, I "downgraded" to 0.7.0 and everything works as expected. So, uh, false alarm on things being broken in 8.1. I apologize. I'm not sure whether to close this bug or not seeing as how 0.8 is an alpha.

For clarifications sake, here's a screenshot of a simple view that only has a text view inside of it (along with a navigation bar) running on 0.8.0-alpha1 in 8.1 on an iPad Air. Nothing novel in viewDidLoad, but in viewWillAppear I have the following stereotypical code: [MRProgressOverlayView showOverlayAddedTo:[self view] animated:YES];

mrprogress 0 80 alpha

With that code, the app proceeds to crash sometimes. I had to do it at least twice to get it to crash again. Here's the stack trace for the main thread:

Thread 1Queue : com.apple.main-thread (serial)
#0  0x00000001843bdcec in ___forwarding___ ()
#1  0x00000001842c2c1c in _CF_forwarding_prep_0 ()
#2  0x0000000188e365b8 in __62+[_UIReplicantView snapshotWithView:fromRect:capInsets:defer:]_block_invoke ()
#3  0x0000000184372124 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#4  0x000000018437122c in __CFRunLoopDoBlocks ()
#5  0x000000018436f850 in __CFRunLoopRun ()
#6  0x000000018429d1f4 in CFRunLoopRunSpecific ()
#7  0x000000018d3ef5a4 in GSEventRunModal ()
#8  0x0000000188bce784 in UIApplicationMain ()
#9  0x00000001000ceddc in main at /Users/---/Documents/sharesynch-ios-app/ShareSynch/main.m:17
#10 0x000000019542aa08 in start ()

Edit: And I also got this in the console with Zombies on -- -[_UIReplicantContentView layer]: message sent to deallocated instance 0x17419ab60

jpaas commented 9 years ago

I haven't seen any EXC_BAD_ACCESS yet, but I am intermittently seeing cases where the white background is missing entirely and cases where instead of being white it appears to be a transparent blur of whatever's underneath it. This is using the 0.8.0-alpha1 cocoapod on iOS 8.1.

jpaas commented 9 years ago

Here's an example of the no white, but blurred background

ios simulator screen shot oct 31 2014 9 51 07 am

mrackwitz commented 9 years ago

@Deadpikle: Thanks for the clarification. @jpaas: Thanks for you further feedback. This problem occurs on mode or frame changes in combination with changing the mask of a UIVisualEffectView. You could circumvent it by using the factory method showOverlayAddedTo:title:mode:animated:.

mrackwitz commented 9 years ago

I have created a separate issue for the missing white background, see #77.

aksswami commented 9 years ago

@mrackwitz : I am also facing the same issue of EXC_BAD_ACCESS. NSZombieEnabled output is *\ -[_UIReplicantContentView layer]: message sent to deallocated instance 0x79e62990 I am using 0.8.0.alpha1 version. I am stuck because of this issue. screen shot 2014-11-05 at 8 22 46 pm

I am using MRProgress using [MRProgressOverlayView showOverlayAddedTo:self.view title:@"Fetching Loans..." mode:MRProgressOverlayViewModeDeterminateHorizontalBar animated:YES]; the problems comes in dismissal of progress bar.

jpaas commented 9 years ago

@mrackwitz, I am using the showOverlayAddedTo:title:mode:animated: factory method.

mrackwitz commented 9 years ago

I've a fixed version in master, but I still need to test it on a device. See also here. I would appreciate feedback.

Deadpikle commented 9 years ago

I just tested it out on the iPad Air that I found the initial bug on and everything seems to check out in my app, although I'm not testing every feature or anything. Unfortunately, I don't have more devices to test on. The Air has iOS 8.1 on it.

Thanks!

mrackwitz commented 9 years ago

Thanks for the feedback, the new version 0.8.0 is now released over CocoaPods and available with the next pod update MRProgress.