.net 5 trimming causes crash on copying text
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 5.0.101
* Windows version: 20H2
* Does the bug reproduce also in WPF for .NET Framework 4.8?: No
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/master/README.md#reporting-security-issues-and-security-bugs).
**Problem description:** I am building a self-contained trimmed publish release of a project using .net 5, and using trimming. If you try to copy from the Text boxes in the GUI it will crash. This only happens with trimming.
**Actual behavior:**
`Faulting application name: TestWPF.exe, version: 1.0.0.0, time stamp: 0x5fbf1139
Faulting module name: ntdll.dll, version: 10.0.19041.662, time stamp: 0x5f641e44
Exception code: 0xc0000409
Fault offset: 0x00087160
Faulting process id: 0x342c
Faulting application start time: 0x01d6cfff6daa978a
Faulting application path: C:\Users\Carbon\source\repos\TestWPF\TestWPF\bin\Release\net5.0-windows\publish\TestWPF.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: e5c5c421-412f-4a5f-aa52-d412120410da
Faulting package full name:
Faulting package-relative application ID: `
**Expected behavior:** it copies the text to clipboard.
**Minimal repro:** https://github.com/CarbonNeuron/WPFCopyCrash make sure to run the published file and not the debug one.
Contributor guide
Assessment
This issue has not been assessed yet.