maui icon indicating copy to clipboard operation
maui copied to clipboard

Camera preview is freezing when rotating and using FlyoutPage on iOS

Open dhindrik opened this issue 1 year ago • 5 comments

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

  1. Clone the repo
  2. Start the app
  3. Rotate to landscape
  4. Click the button
  5. Rotate back to portrait
  6. 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

dhindrik avatar Oct 10 '24 10:10 dhindrik

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.

Zhanglirong-Winnie avatar Oct 12 '24 10:10 Zhanglirong-Winnie

No attention on this one?

Brosten avatar Jan 30 '25 12:01 Brosten

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?

Brosten avatar Mar 14 '25 13:03 Brosten

@PureWeen @jfversluis Do you know the answers to the questions @Brosten has?

dhindrik avatar Mar 16 '25 20:03 dhindrik

Anyone...?

Brosten avatar Jun 17 '25 05:06 Brosten

Fun fuct, you dont really have to take a picture. Just: Landscape Enter picture taking screen Portrait Cancel

Freeze.

MerSpyro avatar Oct 09 '25 08:10 MerSpyro

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

Pastajello avatar Oct 11 '25 11:10 Pastajello

@dhindrik You can take a look at #31971 @Brosten

Pastajello avatar Oct 11 '25 14:10 Pastajello

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?

Brosten avatar Oct 13 '25 06:10 Brosten

Yes, I guess someone has to run the pipelines

Pastajello avatar Oct 13 '25 06:10 Pastajello

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)

Brosten avatar Nov 21 '25 08:11 Brosten