runtime: Unmanaged crashes (heap corruption) on Windows 11
Description
I have a commercial application (WinForms on .NET 6) which seems to crash on the user’s machine. The app just disappears. In the event log the following can be found:
Faulting application name: RoyalTS.exe, version: 6.0.60122.0, time stamp: 0x614cbf2c
Faulting module name: ntdll.dll, version: 10.0.22000.527, time stamp: 0x931cda92
Exception code: 0xc0000374
Fault offset: 0x000000000010c0a9
Faulting process id: 0x25e4
Faulting application start time: 0x01d8535d3d0462d1
Faulting application path: C:\ Program Files \Royal TS V6\ RoyalTS.exe
Faulting module path: C: \WINDOWS\SYSTEM32\ntdll.dll
Report Id: 0574e239-a686-46d4-841-5afec8e69292
Faulting package full name:
(Faulting package-relative application ID:
In WinDBG analyzing a mini dump submitted by an affected user I always see “A heap has been corrupted” (see below):
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ff91284c0a9 (ntdll!Rt]ReportFatalFailure+0x0000000000000009)
ExceptionCode: c0000374
ExceptionFlags: 00000081
NumberParameters: 1
Parameter[0]: 00007ff912867780
PROCESS_NAME: RoyalTS.exe
ERROR_CODE: (NTSTATUS) 0xc0000374 - A heap has been corrupted.
EXCEPTION_CODE_STR: c0000374
EXCEPTION PARAMETER1: 00007ff912867780
ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread: [PSEUDO_THREAD]
FAULTING_THREAD: ffffffff
STACK TEXT:
00000000 00000000 00000000 00000000 heap_corruption! RoyalTS.exe+0x0
STACK_COMMAND: !heap ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb
SYMBOL_NAME: heap_corruption!RoyalTS.exe
MODULE_NAME: heap corruption
IMAGE_NAME: heap_corruption
FAILURE_BUCKET _ID: HEAP_CORRUPTION ACTIONABLE_InvalidArgument_c0000374_heap_corruption!RoyalTS.exe
OS VERSION: 10.0.22000.1
BUILDLAB_ STR: co release
OSPLATFORM TYPE: ×64
OSNAME: Windows 10
FAILURE_ID_HASH: {cd9e1d73-3699-a96d-41€4-5a3250a197ce}
Reproduction Steps
It seems that only a hand full of users are affected (out of 1000s). Some of them can’t even start the app, other users report that out of the blue (closing a dialog, for example), the app just crashes.
For us devs, we failed to reproduce this issue on any of our machines.
Expected behavior
The app should not crash.
Actual behavior
The app crashes.
Regression?
No response
Known Workarounds
It seems that putting the .exe in Windows 8 compatibility mode resolves the issue or at least improves the behavior.
Configuration
- all .NET Versions 6 (maybe even .NET 5) seems to be affected
- it seems to be a Windows 11 issue as far as we can tell
- x64
Other information
I’m not sure if this report is passing all the requirements. If there’s anything I can do to improve this issue report, let me know. If a mini dump is required, I can ask for permission to send it to an engineer. Since our app is dealing with IT infrastructure, passwords, etc., I wont be able to upload dump files publicly.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (11 by maintainers)
@giulianomart Since this is a bug in Windows 11, only Microsoft can rollout a fix. Following the discussion here, it’s still undecided whether or not the fix will be “backported” to existing builds or if it will only ship in Win 11 22H2.
Thank you both so much for the information you’ve given! We’re considering servicing the fix to released builds of Windows 11. Of course I can’t give any promises about timelines or that it will get serviced (legal legal legal legal legal) but we are looking into it 😃.
Thanks again!