Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

.net9 causes crash when OpenFileDialog called #10483

Open
theGuiltyMan opened this issue Feb 19, 2025 · 2 comments
Open

.net9 causes crash when OpenFileDialog called #10483

theGuiltyMan opened this issue Feb 19, 2025 · 2 comments
Assignees
Labels
area-NetSDK Investigate Requires further investigation by the WPF team.

Comments

@theGuiltyMan
Copy link

Describe the bug

After the powertoys updated to use .net9 some crashes started to happen. I initially thought it was a problem with powertoys itself but after some tests found out that it is a .net9 issue. I am linking the original issue: microsoft/PowerToys#37254 (comment)

To Reproduce

This is the repository I used for testing the issue: https://github.com/mantaionut/ExtractAssociatedIconTest
When compiled with .net9 all buttons causes crash, .net8 binary works without a problem

Exceptions (if any)

Image

Further technical details

Ide: VS 2022
dotnet --info output:

.NET SDK:
 Version:           9.0.200
 Commit:            90e8b202f2
 Workload version:  9.0.200-manifests.b4a8049f
 MSBuild version:   17.13.8+cbc39bea8

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.200\

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.2
  Architecture: x64
  Commit:       80aa709f5d

.NET SDKs installed:
  9.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found
@baronfel baronfel transferred this issue from dotnet/sdk Feb 19, 2025
@h3xds1nz
Copy link
Member

h3xds1nz commented Feb 19, 2025

Same story as in #10305 (comment)

Only here its most likely C:\Program Files (x86)\Internet Download Manager\IDMShellExt64.dll

The workaround would be for Power Toys to apply for the project:
<CETCompat>false</CETCompat>

The real fix would have to be done in NetFX. @dipeshmsft is this anything that could be brought up internally?
I've seen already so many apps having to disable CET which is a real shame as its a great security mitigation, and the WPF case is that here we're using the windows dialogs that causes the regular shell extensions to load that have NetFX as dependency.

@dipeshmsft
Copy link
Member

@h3xds1nz, thanks for pinging me. I am involved in other areas as of now, so I will need some time for this.

Never the less I will try to devote some time this week to understand these issues, and why have they started coming up in .NET 9 specifically. Moreover, if the changes need to be in .NET Fx, it would be hard to get it done. Anyhow, let me get back to you on this issue.

@siagupta0202 siagupta0202 added Investigate Requires further investigation by the WPF team. and removed Untriaged labels Feb 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-NetSDK Investigate Requires further investigation by the WPF team.
Projects
None yet
Development

No branches or pull requests

4 participants