In our app we show the Camera modally on top of another UIViewController. On iOS 8.x only, about 1/10 of the time if you zoom you wind up with a crash:
PLImagePickerCameraView didHideZoomSlider:]: message sent to deallocated instance
There is an existing SO post which has a supposed workaround - How-to find out what causes a didHideZoomSlider error on IOS 8? - but every variation I have tried fails to solve the crash. The suggestion involves putting a delay before dismissViewControllerAnimated:completion: . No matter what delay I try I can still reproduce the crash.
It only occurs (1) if you zoom the camera view (2) either choose Cancel or take a photo and exit the camera, all shortly before the zoom indication animation fades away. It appears to be a problem in iOS 8.x which Apple hasn't fixed. It crashes in Apple's code with no involvement in anything we have.
I do see "Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates." but this seems to be unrelated and is also referring to code inside the UIImagePickerController not anything we are doing.
I am about to deal with Apple DTS to see if we can find some way to avoid this or what in the environment might be causing this to happen. I thought to ask here in case anyone has another idea.
This crash did not occur under iOS 7.X. Happens on any model iPhone or iPad.
The answer from Apple is "it's a bug, file it in Radar" which of course says nothing about when it will be fixed. There is no workaround other than to tell users to wait a little until the slider fades (which our support people tell the users). There is nothing you can do other than implement your own camera and zoom support and do it yourself correctly.
Perhaps Apple will fix it in 8.2.
Related
I have a app that opens straight to a camera that is based on this WWDC sample: https://developer.apple.com/library/ios/samplecode/AVCam/Introduction/Intro.html
A few users have been experiencing a bug where the camera does not turn on and does not allow them to capture content.
I just ran into the same issue last night and this is what I observed:
I was debugging a separate issue and the camera was working 100% ok, then all of a sudden, it stopped working.
Every time I would open the app or navigate back to the camera, it would show a dark view of whatever it was currently pointing at, but the image was frozen. Its like it worked for 1 second, then the capture preview would freeze.
I tried force closing and reopening, same problem.
I tried uninstalling and reinstalling, same problem.
I then restarted my phone and the issue was solved.
How is it possible that this bug persists between separate installs?
Does anyone know what might be causing the camera to fail?
How should I go about debugging it if it only occurred once after months of using it and I have no idea what triggers it?
Are you running iOS 9?
That might be an iOS 9 software internal bug.
I had exactly the same non-reproducible issues but with MapKit's map view rendering.
In my case map view was showing just rectangle grid without any map objects - no streets, lakes, rivers, etc.
I've tried to google over internet to find potential reason of such weird issue, but without any luck. Then I've restarted device and that helped, the same as in your case.
Sure, my info is not a full answer, just want to share my experience.
Your process does not have direct access to the camera hardware, but rather through a device manager. It is the state of that manager that determines if things will work.
To confirm, when your app is experiencing issues, kill it then open the default Camera app. If it shows a blank or still frame preview, then you know it's not necessarily a problem in your app.
I've having an issue with UIWebView and running HTML 5 games (that another developer is working on). We've tried two different options, and neither is optimal.
Option 1: He renders the HTML 5 game with "canvas drawing". When he does it this way, nothing crashes, however in iOS 9 when we go back into the app from the background, the Web View loads back up, but the game is moving much slower than normal (issue not on iOS 7.1 and above). By much slower I'm talking about the animations are not moving the same velocity that they were when we first load the game. The weird thing about this issue is that even if the user opens up a different HTML 5 game (we're adding multiple games) the animations are slower for that game as well. I've tried dismissing the Web View Controller when the UIApplicationWillResignActiveNotification gets posted. When I set the game up this way, the slowness only happens if the app is in the for 4 seconds (it's very strange).
Option 2: He renders the game with "WebGL". When he renders it this way, the app crashes when the app gets backgrounded on iOS 8.0 and above. My research into the crash is that iOS can't draw OpenGL ES in the background. I'm assuming that the WebGL commands are running similar commands as OpenGL ES would do, hence the crash. Dismissing the Web View Controller on UIApplicationWillResignActiveNotification still causes the crash to happen.
Has anyone else ever dealt with a situation like this?
I've not found a good solution to the problem, but I did find a work around.
When I get the App Will Resign Active message, I remove the UIWebView from the UIWebViewController's subview. When I get the Did Become Active message, I add the UIWebView to the UIWebViewController's subview.
This solution works for both cases.
Yesterday I updated my iPhone 5 to iOS 7.1 and found a strange bug in my current application. There is few UINavigationControllers. After few transition in it the animation of transition become to fast, like there is no animation at all. But more strange that all system animation became to fast, default UITableCell animation, modal window animation and so on.
Does someone know what is this? On device with 7.0.6 there is no such problem.
Looks like it starts to happen after few calls of:
[navController setViewControllers:popViewControllers animated:animated];
PS: One more thing - my app is still using iOS 6.1 SDK.
PPS: i don't use custom default animations.
UPDATE: With 7.1 SDK problem still exists.
I have similar problem after updating my iPhone from iOS 7.0.3 to 7.1. I go back and forth several times using the navigation bar and after a few tries there is no transition animation. All animations are broken when it happens, eg. device rotation animation. After reaching this state, few more back and forth transitions cause a crash.
Edit 3:
In my case the problem was because of accessing GUI objects from a background queue. If you experience this issue make sure all GUI objects are accessed from the main thread. Many thanks to Eugene for helping me figure this out.
I have a strange situation...
I implemented an in-app camera based on Apple's AVCam sample. It works just fine. My question is not about the actual camera implementation, but rather... What could cause a view's buttons to work on one iPhone 5S but fail on another iPhone 5S. Both are using the same build of the app, they have the same iOS version installed (7.0.4), etc.
The problem is...the camera starts and the camera preview displays just fine, but the buttons on that view (i.e. the shutter release, flash options, front/back camera switch, etc) all fail to respond. His iPhone 5S is the only one out of 4 iPhone 5S's that has the problem.
Trying to narrow down what can be different until I can hook the "sad" iPhone 5S up to my debugger in a few days when I see my client again (it's his)... we did notice that my phone asked for permission to access my photos and his did not...
Is there perhaps some system setting that he could have enabled that would cause this check to be skipped? I ask because I wonder if the camera scene's view controller is waiting for something from that check and therefor hanging the UI.
Any ideas would be appreciated
Finally tracked down the issue...
The difference was that on my developer phone, I had a few hundred to 1000 pictures in my camera roll. On my client's phone, he had about 6,000 pictures, so obviously getting those takes longer. If we were patient, the view eventually did come back alive after the enumeration block finished.
Also, I was asking my UICollectionView to scroll to the end (where the newest photos are) after it had finished loading all the camera roll images into itself. With few photos, the timing was fine, but with lots of photos, the timing was off and it was trying to scroll before it had finished enumerating. The solution, since there is no callback for "didFinishReloadingData" was no call the scroll method using -performSelector:withObject:withDelay to ensure that it gets called AFTER the enumeration block and reloadData are finished.
we're having a bit of a headache with some apps, Perhaps anyone of you may be able to alleviate the pain, here goes:
We have an OpenGLES(1) application, and it works fine on any device yet tested, from ipod touch on 3.2 to iphone 4, ipad 1, with iOS 4.2.
however, when the user clicks 'home' twice while the app is running, the application view moves up to accommodate the phone's 'taskbar', but then the view turns white.
I suspect after reading various posts this is because I have not yet implemented the 'applicationWillResignActive' delegate method, but I'm unsure if this is indeed the case, and if so, how I would go about avoiding the white screen. Incidentally, there is also the problem that the background EAGLView goes white (or away ?) when an UIAlertView is added to the mainWindow.view, which seems to me a related problem.
I would much appreciate any suggestions.
Jonathan
Your framebuffer is being destroyed, probably in EAGLView or somewhere similar.
Rebuild the framebuffer after you get control back.