none
CompositeFontParser Fail after installing .NET Framework Update

    Question

  • Hello all,

    I have encountered an exception in our client program (C#) when calling Fonts.SystemFontFamilies (System.Windows.Media.Fonts) using a Windows 7 system:

    -> System.IO.FileFormatException: No FontFamily element found in FontFamilyCollection that matches current OS or greater: Windows7SP1

    Using Windows 10, this problem does not occur. Also, rolling back the latest security updates on the Windows 7 systems fixes that error, so after some investigation, I think the most probable package that is connected to that exception is KB4055532, which is a .NET 4.7.1 security update for Windows 7 / Server 2008 released on January 9th.

    Could that be a bug in the mentioned security update?

    Kind regards,

    Frank Nanninga



    Thursday, January 11, 2018 10:22 AM

All replies

  • Hallo Frank!

    I can more or less confirm your observation!

    After installing KB4055532 Windows Powershell 5.1 ISE cannot be started as it crashes with System.IO.FileFormatException too. This is on Windows 7 SP1 with all important updates installed.
    When this update is uninstalled, Powershell 5.1 ISE can be started without problems.
    I had this same problem on about 8 computers yesterday at work and at my personal computer at home.

    Kind regards,
    Patrik Ehringer

    Thursday, January 11, 2018 11:50 AM
  • KB4055002 has similar problem with fonts on Windows 7.

    Thursday, January 11, 2018 1:17 PM
  • KB4055002 has similar problem with fonts on Windows 7.

    This is the KB you'll see on Windows 7 (only) of you install KB4055532.

    But yes, this is the relevant update.

    Thursday, January 11, 2018 2:05 PM
  • Hi FrankNanninga,

    Thank you for posting here.

    For your question, what is the exception?

    I use Win7 with Visual Studio 2017 to test the Fonts.SystemFontFamilies Property without installing KB4055532. Based on my test, it is not a bug in the mentioned security update.

      private void button1_Click(object sender, EventArgs e)
            {
                FillFontComboBox(comboBox1);
            }
            public void FillFontComboBox(ComboBox comboBoxFonts)
            {
                // Enumerate the current set of system fonts,
                // and fill the combo box with the names of the fonts.
                foreach (System.Windows.Media.FontFamily fontFamily in Fonts.SystemFontFamilies)
                {
                    // FontFamily.Source contains the font family name.
                    comboBoxFonts.Items.Add(fontFamily.Source);
                }
    
                comboBoxFonts.SelectedIndex = 0;
            }
    

    Please add reference of PresentationCore.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 12, 2018 6:55 AM
    Moderator
  • Hi Wendy!

    It IS a bug caused by this update.

    This update replaces at least
    'GlobalUserInterface.CompositeFont' in
    'c:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF\Fonts'
    with a newer version which seems to miss information for Windows 7.
    It seems that all programs which are based on WPF and use 'System.Windows.Media.Fonts' and somehow try to find a FontFamily are affected - with many of them just crashing (because no font family can be found because of missing Windows 7 entry in 'GlobalUserInterface.CompositeFont').
    In the meantime one can find a lot of reports on the websites of affected programs.

    Hope this helps,

    Best regards,
    Patrik

    Friday, January 12, 2018 8:38 AM
  • Yes I confirm the behaviour described by Patrik
    We have the same issue on our application and more and more customers are impacted!!

    The update corrups the framework installation and the only workaround is to uninstall the KB (and on some Pcs to reinstall the .NET framework)

    Best regards

    Stéphane

    Friday, January 12, 2018 9:23 AM
  • Microsoft released an official statement about this issue here (includes workarounds): https://github.com/dotnet/announcements/issues/53

    Stéphane

    Friday, January 12, 2018 9:57 AM
  • @Stéphane

    Thanks for this update!

    Friday, January 12, 2018 10:11 AM
  • Yes - thank you for the update Stéphane!
    Friday, January 12, 2018 3:08 PM
  • Hi Wendy,

    I've found this error occurs immediately after the installation of KB4055002 on my Windows 7 SP1 system.  It "hits" both the 32-bit and 64-bit versions of the ISE.  The command-line access to Powershell appears to work fine, but, I've not done extensive testing to verify (I normally use the ISE).

    Have you, or anyone else, heard whether this is an issue Microsoft is aware of and will be addressing in a future update?

    The error reporting dialog provides this information/detail (allowing the system to search for a solution comes back with nothing/no reply):

    Problem Event Name:                                            PowerShell
      NameOfExe:                                                        PowerShell_ISE.exe
      FileVersionOfSystemManagementAutomation:    6.3.9600.18728
      InnermostExceptionType:                                   System.IO.FileFormatException
      OutermostExceptionType:                                   System.Reflection.TargetInvocation
      DeepestPowerShellFrame:                                  indows.PowerShell.GuiExe.Internal.GPowerShell.Main
      DeepestFrame:                                                   System.RuntimeMethodHandle.InvokeMethod
      ThreadName:                                                      unknown
      OS Version:                                                        6.1.7601.2.1.0.256.48
      Locale ID:                                                          1033

    Thanks.
    Sunday, January 21, 2018 2:18 AM
  • Hi FrankNanninga,

    If your question has been solved, please mark the useful reply as answer to close the thread.This will make answer searching easier in the forum and be beneficial to community members.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, January 22, 2018 8:27 AM
    Moderator
  • Hi RickSNewton,

    The error caused by the KB, the update from Microsoft. You could post the question in UserVoice to let Microsoft Teams know and then to fix.

    https://microsoftteams.uservoice.com/forums/555103-public

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 22, 2018 8:29 AM
    Moderator
  • Hi Wendy,

    I'm new to this posting "thing," but when I look to the link you indicate the area "Microsoft Teams" doesn't appear to show any linkage to Powershell IDE.

    I'll keep looking -- I've tried the "Bugs" sub-forum within Microsoft Teams, but as yet have had no luck finding a topic on Powershell issues.  A search for the term "Powershell" only returns requests for features for various products associated with "teams."

    Perhaps there is another, more appropriate (?), place to let Microsoft know that these two Windows Updates are creating issues in Windows 7?  Windows 7, after all, still has two years of direct support left...

    Thanks.


    • Edited by RickSNewton Monday, January 22, 2018 4:57 PM
    Monday, January 22, 2018 4:56 PM
  • I can only confirm that KB4055002 caused critical errors on 2008R2.  

    Powershell_ise craching as someone has pointed out already, and also a critical error with a RPA suit we use. 

    Workaround: uninstall KB

    Thursday, January 25, 2018 10:31 PM
  • Richard,

    There is a response in this thread by Stéphane that provides a method of correction for this issue, at least for my Windows 7 SP1 system, that can still be applied successfully after installation of KB4074880 (the "corrective" replacement for KB4055002, that didn't result in a fix in my case), and may also be successful for those that have only gone as far as the installation of KB4055002).

    The informaiton that Stéphane provides involves the replacement of a single file, GlobalUserInterface.CompositeFont, in two locations (%windir%\Microsoft.NET\Framework\v4.0.30319\WPF\Fonts and %windir%\Microsoft.NET\Framework64\v4.0.30319\WPF\Fonts).  The replacement file is available from the link as well as the three methods for replacing the file.

    Perhaps these same steps will resolve the issue on your 2008R2 server after applying KB4074880.

    Hope this helps.
    Thursday, January 25, 2018 11:17 PM