Skip to content

[Bug] [Crash] [InputStatemanager.dll] WinUI3 Apps have a chance to throw a uncatchable fail-fast exception every time they are touched #10929

@BMS-Malcolm

Description

@BMS-Malcolm

Describe the bug

Applications made using WinUI3 have a chance to crash due to an uncatchable fail-fast exception thrown from Microsoft.InputStateManager.dll (source obtained from Windows Event Viewer) whenever the screen is tapped (not clicked). This can be observed on a completely blank brand new WinUI3 application. It does not matter what was tapped on the screen, the fact that a input was registered at all appears to be the trigger.

The frequency of crashing appears to depend on the computer. Faster computers see this issue occur far left often than slower ones. Microsoft Surface Pro tablets appear to have this issue happen disproportionately more than desktops or other Windows tablets. This bug is observable on more than one Windows build version, and is observable on both Windows 10 and Windows 11.

This issue is confirmed on WinUI3 applications using Windows SDK 1.6.2, 1.7.x and 1.8.x

However, using Windows SDK 1.6.2 reduces the frequency. 1.7.x and 1.8.x both appear to be similar.

Why is this important?

My users need to be able to use my application without frequent crashes throughout the day, and should not be required to buy high-end tablet computers to run a relatively simple application.

This issue has been occurring for a long period of time and is disruptive to the operations of my users and is embarrassing for us as we do not have a solution available for this issue as it is outside of our control.

If this is never resolved we are going to have to entirely remake our product using something that works properly, which is going to be an enormous resource sink.

Steps to reproduce the bug

Create a WinUI3 application from Visual Studio
Launch it
TAP (do not click -- tap) with at least 4 fingers (6 preferred) as quickly as you can.

For the sake of your wrists, use the worst quality hardware you can while testing this. My work machine can take me up to a few minutes to crash, whereas older model Microsoft Surface Pro tablets can experience this crash within seconds and do not need multiple fingers.

Actual behavior

Eventually the application will crash.

Expected behavior

The application does not crash

Screenshots

Here is a screenshot of the event viewer entry for a blank WinUI app
Image

And here is a video of receiving this crash from a blank dotnet maui application using WinUI
https://github.com/user-attachments/assets/fd0093e8-f3de-44e9-83c0-a89ba5e20888

NuGet package version

None

Windows version

No response

Additional context

Here is some info we have been able to discern from dmp files etc. from these crashes. Hopefully this will be helpful

ExceptionCode: 0xC0000409 (Security check failure or stack buffer overrun)
ExceptionAddress: Microsoft_InputStateManager!InProcInputHandler::PopulateContactInFrame+0x5a4
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT

WinDbg Analysis of .dmp:
!gle
LastErrorValue: 0x12a (298) - Too many posts were made to a semaphore.
!error 0x80070578 → Invalid window handle

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingteam-CompInputIssue for IXP (Composition, Input) team

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions