News

WPF Images Suddenly Blacked Out? Here's the Fix for Update Glitch

Have images in your Windows Presentation Foundation (WPF) application suddenly gone black? The problem was likely caused by a recent update glitch, and Microsoft has published a workaround.

The Visual Studio forum was buzzing this week with complaints of WPF rendering problems, turning images blank or blacking them out.

The problem was also reported on Stack Overflow.

It turns out the issue was caused by a recent quality and security update, and Microsoft yesterday said it's aware of the problem and said "we are actively working on fixing this issue," while also publishing support guidance about the glitch and how to fix it.

The problems began to appear after this month's ".NET Framework September 2017 Security and Quality Rollup" that updated Windows 7 and later client versions and Windows Server 2008 and later server versions.

The image issue was reported Sept. 14 in the Visual Studio forum, and the user immediately recognized it was caused by the update, and removing the update fixed it.

Microsoft's support post published Tuesday identified the symptoms:

After you install the September 12, 2017, .NET Security and Quality Rollups that apply to the .NET Framework 4.6, 4.6.1, 4.6.2, and 4.7, you experience rendering issues in Windows Presentation Foundation (WPF) applications that use WPF types in a Windows service.

When this problem occurs, applications that use a WPF element for rendering generate a black image. This occurs if the application is running in the following situations:

  • In a non-interactive Window Station (for example, within Windows Services)
  • Running as a LocalSystem account
  • Interactively in Session 0 by using tools such as psexec.exe
And here's the workaround:
To work around this problem, temporarily remove the September 12, 2017, Security and Quality Rollup update, and then install the corresponding September 12, 2017, Security-Only update to make sure that systems are secured against the latest vulnerabilities.

The Corresponding Security-Only updates are the following:

  • 4040956 Security Only update for the .NET Framework 4.6, 4.6.1, 4.6.2, and 4.7 for Windows 8.1, Windows RT 8.1 and Windows Server 2012 R2: September 12, 2017
  • 4040955 Security Only update for the .NET Framework 4.6, 4.6.1, 4.6.2, and 4.7, for Windows Server 2012: September 12, 2017
  • 4040957 Security Only update for the .NET Framework 4.6, 4.6.1, 4.6.2, and 4.7 for Windows 7 SP1 and Windows Server 2008 R2 SP1 and for the .NET Framework 4.6 for Windows Server 2008 SP2: September 12, 2017

The glitch caused problems in real-world production systems, affecting ASP.NET apps and more, as this post on Microsoft's Connect site indicated: "This is impacting our production applications (ASP.NET) - complete failure to render." Several other users also chimed in on a number of sites about the headaches caused by the error.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Cloud-Focused .NET Aspire 9.1 Released

    Along with .NET 10 Preview 1, Microsoft released.NET Aspire 9.1, the latest update to its opinionated, cloud-ready stack for building resilient, observable, and configurable cloud-native applications with .NET.

  • Microsoft Ships First .NET 10 Preview

    Microsoft shipped .NET 10 Preview 1, introducing a raft of improvements and fixes across performance, libraries, and the developer experience.

  • C# Dev Kit Previews .NET Aspire Orchestration

    Microsoft's dev team has been busy updating the C# Dev Kit, a Visual Studio Code extension that enhances the C# development experience by providing tools for managing, debugging, and editing C# projects.

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

Subscribe on YouTube

Upcoming Training Events