Camera preview is freezing when rotating and using FlyoutPage on iOS
Description
On iOS the app will freeze after taking a photo if you rotate it after you open the capture photo view. But it will only happen if you use FlyoutPage, with Shell it works as it should.
The problem is both with .NET 8 and .NET 9 (rc2)
Steps to Reproduce
- Clone the repo
- Start the app
- Rotate to landscape
- Click the button
- Rotate back to portrait
- Take a photo
Now the app is freezed and you cannot click the accept button for example.
Link to public reproduction project repository
https://github.com/dhindrik/CameraFreezeProblem
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 17 and 18
Did you find any workaround?
No workaround found.
Relevant log output
No response
This issue has been verified using Visual Studio 17.12.0 Preview 2.1(8.0.82 & 9.0.0-rc.1.24453.9). Can repro this issue on iOS platform.
No attention on this one?
Is using non-shell more or less abandoned, when it comes to issues? This one is a true pain for us, but we have quit a long way migrating to shell. Can we expect any light on this one in the near future?
@PureWeen @jfversluis Do you know the answers to the questions @Brosten has?
Anyone...?
Fun fuct, you dont really have to take a picture. Just: Landscape Enter picture taking screen Portrait Cancel
Freeze.
I've found a propable fix for this, Ill create a PR in some while. Basically in Microsoft.Maui.Controls.Handlers.Compatibility.PhoneFlyoutPageRenderer.ChildViewController.ViewDidLayoutSubviews there is an inifinite loop
@dhindrik You can take a look at #31971 @Brosten
Thanks a lot @Pastajello for having a look at this. From what I can see, the PR hasn't passed needed checks in order to generate the artifacts I need to test it?
Yes, I guess someone has to run the pipelines
The rotation issue seems to be gone with ios 26. At least I can't reproduce it any more. (I can still reproduce it on ios 18.7.2)