All WPF x86 applications crash at startup

1

One of our customers has several 64-bit Windows 7 machines which are having trouble running our WPF applications. Unfortunately the framework is crashing in such a way that I've been unable to catch the error and get a stack trace, either via AppDomain.CurrentDomain.UnhandledException or via Dispatcher.UnhandledException. I've been able to figure out the following:

  • WinForms applications work fine
  • WPF applications do NOT work unless the platform is set to x64.
  • There are dozens of unaffected machines running the same OS

So basically all x86 WPF applications targeting the latest framework are failing immediately at startup on these machines. This is problematic for us because we normally only build an x86 version on account of a handful of customers that still use 32-bit machines. "Any CPU" is not an option for us presently because of a few native dependencies.

The application itself doesn't seem to matter. A simple window with one button and no extra dependencies will fail nicely on these machines:

<Window x:Class="WpfTestApp2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Button x:Name="btnOK" Content="OK" Width="75"
                HorizontalAlignment="Center" VerticalAlignment="Center"
                Click="btnOK_Click" />
    </Grid>
</Window>

This simple one-window app fails for Any CPU or x86 platforms, but works if I target x64.

The application event log offers the following information, which has not lead me to a solution:

Faulting module name: KERNELBASE.dll, version: 6.1.7601.24059, time stamp: 0x5aa1f588
Exception code: 0xc06d007e
Fault offset: 0x0000c54f
Faulting process id: 0x1bc4

We've tried all of the following so far:

  • Uninstall and reinstall .NET Framework 4.7.2
  • Repair .NET Framework 4.7.2
  • Removing security updates KB3126587 and KB3126593 (mentioned in a post referencing the exception code/fault offset)
  • The unhandled exception events mentioned above, which never fire

I'm looking for any ideas for how to keep troubleshooting this issue.

c#
wpf
asked on Stack Overflow May 22, 2019 by RogerN

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0