Xamarin.forms: [Bug] Font Icon Disappears when Minimizing Window in UWP

Created on 30 Oct 2019  路  14Comments  路  Source: xamarin/Xamarin.Forms

Description

In a XF UWP app, the font icon seems to disappear after minimizing the window a few times. Seems to disappear after minimizing and opening the window 4 times for me. But I've observed it to be inconsistent at times, sometimes after minimizing 2 times, others more than 10 times.

Steps to Reproduce

  1. Run simple reproduction example below.
  2. Minimize and open window on UWP until icon disappears.

Expected Behavior

Icon remains in view.

Actual Behavior

Icon disappears.

Basic Information

  • Version with issue: XF 4.3.0.947036
  • Last known good version: N/A
  • IDE: VS Enterprise 2019
  • Platform Target Frameworks:

    • UWP: 16299 (also tested on 17763 with same results)

  • Affected Devices: UWP

Screenshots

Reproduction Link

XFFontIconBug Repo

UWP bug

All 14 comments

@djrpascu I've been minimizing and restoring this window for several minutes now, and the icon is still there. I think we might be missing some details.

Do you have multiple monitors?
Are you reproducing this in desktop mode or tablet mode?

@hartez hmm... i have a laptop on a dock and 2 monitors (24"), so 3 screens all together. Not sure about desktop/tablet mode. I just try it from within VS under "Local Machine", Debug, x86. I also try running the version that gets installed on my machine after debugging. Let me know if there is any further detail I can provide. I'm going to have a co-worker try it on his machine as well.

I ask about the multiple monitors because we've had a couple of UWP bugs in the past that only show up when running on a secondary monitor.

I wonder if you're encountering this problem: https://github.com/xamarin/Xamarin.Forms/issues/7505

Possible duplicate of #7505 - once that's merged, we should get a build to @djrpascu to test.

@hartez thanks, I took my laptop off the dock and tried with just that single monitor and was still able to reproduce the issue.. still waiting on co-worker results.. send me the build, glad to test it out.. thanks much!

just wanted to follow-up on this... i'm still seeing the issue.. tried switching to UWP version 1903 build 18362, but still same.. my co-worker doesn't experience it on his machine.. can get difference in build specs if needed..

Same behaviour here... In my case it's happening after around 10 mins.

I can constantly able to reproduce it by minimizing an application and activate another application.

Any update or workaround for this issue will be helpful.

I am not experiencing the issue but some of my colleagues are. It happens when the app is minimised for them.

A machine where it was failing was running at 1920x1080 @ 125% DPI scale on Windows 1909 OS Build 18363.900. My machine when I tried switching to those display settings (Windows 1903 OS Build 18632.900) did not have the issue.

It seems that the fix was merged here: https://github.com/xamarin/Xamarin.Forms/pull/10161, Analyzing the fix, It seems that it only applies to Toolbar Items and ImageRenderers. So if you use a button with ImageSource, this seems to be not covered by the fix. I'm still experiencing this on my buttons with fonticonsource.

It seems that the fix was merged here: #10161, Analyzing the fix, It seems that it only applies to Toolbar Items and ImageRenderers. So if you use a button with ImageSource, this seems to be not covered by the fix. I'm still experiencing this on my buttons with fonticonsource.

I agree with @rueldognidon regarding PR 10161. Same fix needs to be applied to other controls. Button, ImageButton and Image all still have this problem.

My notes:

Tested with:

  • Visual Studio 2019 (V16.7.4)
  • XF Version with issue: 4.8.0.1451
  • Platform Target Frameworks: UWP: 18362

I tested with new approach of using ExportFont and including font in main project but still had same problems as old way (old way = including font in UWP project and mapping it through a static resource).

New test repo with this new approach is here for reference:
https://github.com/randyrenwick/XF.UWP.FontImageSourceDisappearSample

Not sure if this has every worked in any version for UWP. For iOS it works fine.

Consistently happens for me if I minimize the window for 5 seconds and then restore it. Video demo here:
https://github.com/randyrenwick/XF.UWP.FontImageSourceDisappearSample/raw/master/UWP%20FontImageSource%20Minimize%20Disappearing%20Images.mp4

Note the same problem happens if I start the app and then go to the Windows Lock screen and then sign in again.

Once images disappear I can't get them back without restarting the app.

I did my testing on a laptop without any external monitors connected. 1920 x 1080 resolution. 125% scale. Testing in Desktop mode.

Happens for these controls: Button, ImageButton, Image

Confirmed this is still reproduceable in 5.0.0.1487-pre1 as well.

I can also confirm that this bug is in XF 4.8 SR 1. This is strange because we have discussed it in https://github.com/xamarin/Xamarin.Forms/issues/8783 and it seemed to disappear suddenly in XF 4.8 on my computer. But now it is back. I had to reinstall Windows on that computer some time ago so I am not sure if the return of the bug was caused by some changes between 4.8 and 4.8 SR 1, or if it is caused by the OS reinstall.

Was this page helpful?
0 / 5 - 0 ratings