Comments (8)
The issue has been fixed in 899206 and the fix should be available in the latest .NET 4.8.
from dotnet-framework-early-access.
If you download .NET 4.8 you should have the fix.
This was introduced in .NET 4.8, and there isn't a new build available yet.
I downloaded again and the install fails:
.NET Framework 4.8 or a later update is already installed on this computer.
I the issue persists.
from dotnet-framework-early-access.
@Tanya-Solyanik @merriemcgaw
CC: @vatsan-madhavan
from dotnet-framework-early-access.
When Enter
is pressed, S.W.Forms.Application
looks up Control.FromChildHandleInternal(msg.hwnd)
and retrieves the previously closed ElementHost
instance, and forwards the keypress to it.
While this is happening, Form.Close()
=> S.W.Forms.Form.WmClose()
is also called, which leads to the ElementHost
being Dispose()
'd
WindowsFormsIntegration.dll!System.Windows.Forms.Integration.ElementHost.Dispose(bool disposing) Line 831 C#
System.dll!System.ComponentModel.Component.Dispose() Line 120 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.Dispose(bool disposing) Line 6045 C#
System.Windows.Forms.dll!System.Windows.Forms.Form.Dispose(bool disposing) Line 3842 C#
recreateelementhostprocesscmdkeybug.exe!RecreateElementHostProcessCmdKeyBug.FormHostingWPF.Dispose(Boolean disposing) Line 13 Basic
System.Windows.Forms.dll!System.Windows.Forms.Form.WmClose(ref System.Windows.Forms.Message m) Line 7115 C#
System.Windows.Forms.dll!System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message m) Line 7550 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Line 14606 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) Line 14661 C#
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam) Line 795 C#
By the time the keypress reaches the ElementHost
, it is no longer valid, and it throws.
WindowsFormsIntegration.dll!System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) Line 468 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.PreProcessMessage(ref System.Windows.Forms.Message msg) Line 10163 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.PreProcessControlMessageInternal(System.Windows.Forms.Control target, ref System.Windows.Forms.Message msg) Line 10262 C#
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(ref System.Windows.Forms.NativeMethods.MSG msg) Line 3666 C#
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(ref System.Windows.Forms.NativeMethods.MSG msg) Line 3798 C#
So WinForms should either...
- .. not close the
ElementHost
before sendingProcessCmdKey
, or - ... not send messages to the
ElementHost
afterClose
-ing it.
from dotnet-framework-early-access.
The issue has been fixed in 899206 and the fix should be available in the latest .NET 4.8.
When will that happen?
from dotnet-framework-early-access.
If you download .NET 4.8 you should have the fix.
from dotnet-framework-early-access.
@M-Lipin can you please validate what update this is in?
@EngAJ - can you attach the setup logs so I can confirm precisely what you've got on your system. You can run http://aka.ms/vscollect.exe and then attach the resulting vslogs.cab (from your temp directory).
from dotnet-framework-early-access.
@merriemcgaw Here are the files.
vslogs.zip
from dotnet-framework-early-access.
Related Issues (20)
- VisualStyleState return weird number HOT 6
- Windows Update Removes 4.8, installer thinks it's still there HOT 1
- SHA3 support HOT 4
- System.Windows.Forms.ListView HideSelection Default Value Incorrect HOT 5
- Merge ObjectIdGenerator Changes To 4.8 HOT 12
- Subtitle/Closed Caption HOT 1
- System.NullReferenceException in .net 4.8 AutomationPeer HOT 3
- Visual Studio crashes HOT 4
- Support Persian Calendar
- 4.8 release notes missing Vector2 fix
- Any chance of porting ContidionalWeakTable IEnumerable support? HOT 5
- Moving a WPF window upwards gets stuck and stops updating HOT 4
- Environment.SetEnvironmentVariable() messing up system variables and registry keys HOT 7
- missing fix from coreclr: Fiber-friendly Vectored Exception Handling #20746
- Screen of Death when moving some WPF windows between multiple monitors with different DPIs HOT 1
- .Net Framework 4.8 - bug when using System.Web.Caching HOT 11
- Failover Cluster Manager bug on Server 2019 after .NET 4.8 installed - unable to type more than two characters in to the IP fields
- NullReferenceException originating from a catch when expression results in an AccessViolation
- String.Replace bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-framework-early-access.