You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenFileDialog / SaveFileDialog will shutdown WPF application with Error #10318
have an issue using OpenFileDialog/ SaveFileDialog in .NET 9.0 WPF Application. When shown the Dialog and hovering/clicking with the mouse on the Drive selection parts the WPF app will exit with the following error :
The program '[32780] WPFTESTS.exe' has exited with code 3221226505 (0xc0000409).
Note: Using the Quicklinks, and Selecting Files is working without any Errors. Reverting the Application to Target .NET 8 the error will go away. This is calling method.
This could be caused by a 3rd-party shell extension, possibly in tandem with the CET stack protection that is enabled by default for all .NET 9 apps. Can you enable the Windows Error Reporting to produce a memory dump for the crash (https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps)? That can be analyzed to find the culprit.
FYI, I still got that crash in an app compiled with <TargetFramework>net9.0-windows10.0.17763.0</TargetFramework>. Installed .NET 9 runtimes are only .NET 9.0.16 and .NET 9.0.17 according to dotnet --list-runtimes.
It occurred when I tried to open the context menu of a file from within an OpenFileDialog. Opening the context menu on the folder background worked.
Adding <CETCompat>false</CETCompat> to the csproj still resolves the issue.
This crash may be caused by some third-party context menu extension, of which there are several installed on my laptop (managed by the company). Most notably "TortoiseSVN", "BeyondCompare", and "Adobe PDF", but also several from Microsoft products.
I'm not sure from the mentioned issues if this should've been resolved with .NET 9.0.2 or if that resolved some .NET internal problem and cannot fix the OpenFileDialog problem.
Activity
filipnavara commentedon Jan 19, 2025
This could be caused by a 3rd-party shell extension, possibly in tandem with the CET stack protection that is enabled by default for all .NET 9 apps. Can you enable the Windows Error Reporting to produce a memory dump for the crash (https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps)? That can be analyzed to find the culprit.
lindexi commentedon Jan 20, 2025
@samanoudi Sorry, I can not repro your issues in my WPF demo. And I agree with @filipnavara .
By the ways, you can fire the wpf issues to https://github.com/dotnet/wpf/issues
h3xds1nz commentedon Jan 20, 2025
This would a duplicate of #10305 then.
I wonder, is dotnet/runtime#109548 out yet? Milestone is set to 9.0.2. Given the shadow stack fail with
FAST_FAIL_SET_CONTEXT_DENIED.filipnavara commentedon Jan 20, 2025
Yep, looks like the same issue.
No, it's not out yet. 9.0.2 will be released on February 11, 2025. (SDK 9.0.103 or 9.0.200)
You can check the commit history of https://github.com/dotnet/runtime/commits/v9.0.1/ and see that it didn't make it to 9.0.1.
h3xds1nz commentedon Jan 20, 2025
Felt easier to ask, not gonna lie.
lindexi commentedon Jan 22, 2025
@samanoudi Could you try #10305 (comment) ?
samanoudi commentedon Jan 29, 2025
@lindexi That is the solution
lindexi commentedon Feb 5, 2025
@samanoudi You can update the dotnet and re-enable the CETCompat by
<CETCompat>true</CETCompat>, after dotnet/runtime#109074 or dotnet/runtime#109548 merged.h3xds1nz commentedon Feb 5, 2025
Basically with 9.0.2 release which should be mid this month.
h3xds1nz commentedon Feb 12, 2025
@samanoudi Could you please re-test on .NET 9.0.2 (released yesterday) runtime without disabling CET on the project?
LWChris commentedon Jun 22, 2026
FYI, I still got that crash in an app compiled with
<TargetFramework>net9.0-windows10.0.17763.0</TargetFramework>. Installed .NET 9 runtimes are only.NET 9.0.16and.NET 9.0.17according todotnet --list-runtimes.It occurred when I tried to open the context menu of a file from within an
OpenFileDialog. Opening the context menu on the folder background worked.From the event viewer:
Adding
<CETCompat>false</CETCompat>to the csproj still resolves the issue.This crash may be caused by some third-party context menu extension, of which there are several installed on my laptop (managed by the company). Most notably "TortoiseSVN", "BeyondCompare", and "Adobe PDF", but also several from Microsoft products.
I'm not sure from the mentioned issues if this should've been resolved with .NET 9.0.2 or if that resolved some .NET internal problem and cannot fix the OpenFileDialog problem.
h3xds1nz commentedon Jun 22, 2026
I've explained it here:
#10305 (comment)
#10483 (comment)
jkotas commentedon Jun 23, 2026
Duplicate of #10305