Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

System.ComponentModel.Win32Exception: The parameter is incorrect #126

Closed
PhyxionNL opened this issue Jul 23, 2020 · 5 comments · Fixed by #127
Closed

System.ComponentModel.Win32Exception: The parameter is incorrect #126

PhyxionNL opened this issue Jul 23, 2020 · 5 comments · Fixed by #127
Labels
Milestone

Comments

@PhyxionNL
Copy link

Similar to #103, the mentioned new version doesn't solve it. In 4.3.1 this is still a problem.

System.ComponentModel.Win32Exception: The parameter is incorrect
at ControlzEx.Controls.GlowWindow.UpdateCore(ControlzEx.Standard.RECT rect) at offset 0
at ControlzEx.Controls.GlowWindow.Update() at offset 186
at ControlzEx.Controls.GlowWindow.OnOwnerActivated(System.Object sender, System.EventArgs e) at offset 6
at System.EventHandler.Invoke(System.Object sender, System.EventArgs e)
at System.Windows.Window.OnActivated(System.EventArgs e) at offset 31
at System.Windows.Window.WmActivate(System.IntPtr wParam) at offset 41
at System.Windows.Window.WindowFilterMessage(System.IntPtr hwnd, System.Int32 msg, System.IntPtr wParam, System.IntPtr lParam, System.Boolean& handled) at offset 221
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(System.IntPtr hwnd, System.Int32 msg, System.IntPtr wParam, System.IntPtr lParam, System.Boolean& handled) at offset 46
at MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, System.Int32 msg, System.IntPtr wParam, System.IntPtr lParam, System.Boolean& handled) at offset 48
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object o) at offset 54
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, System.Object args, System.Int32 numArgs) at offset 119
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object source, System.Delegate callback, System.Object args, System.Int32 numArgs, System.Delegate catchHandler) at offset 2

At the moment this causes an unhandled exception / app crash.

@punker76
Copy link
Member

@Phyxion What is your environment? .NET core? .NET 5? Which OS? Inside a VM?

@PhyxionNL
Copy link
Author

PhyxionNL commented Jul 23, 2020

Sorry, missed that somehow.

Microsoft Windows 10 Home Single Language
10.0.18363.0
x64
.NET 4.7.2.

No VMs.

E: Looked up a couple more, some on .NET 472 others on .NET 48.

Microsoft Windows 10 Home
10.0.18362.0
x64

Microsoft Windows 10 Pro
10.0.18363.0
x64

Microsoft Windows 10 Home Insider Preview
10.0.19564.0
x64

@batzen
Copy link
Member

batzen commented Jul 23, 2020

@Phyxion are you able to reproduce the issue or does it only happen sporadically? Do you know what actions in your application cause the crash? This is a long standing issue and we already implemented many safe-guards to prevent this from happening, but were never able to reproduce the issue... So all those safe-guards were added "blindly"...

@PhyxionNL
Copy link
Author

PhyxionNL commented Jul 24, 2020

It only happens occasionally. I cannot reproduce it, but it happens frequently enough to be annoying. The application is usually launching. Why not catch this exception in UpdateCore (or remove the exception throw in SetWindowPos)? Surely it would be preferred to let the application continue rather than CTD.

@punker76 punker76 added the Bug label Jul 24, 2020
@punker76 punker76 added this to the 4.3.2 milestone Jul 24, 2020
punker76 added a commit that referenced this issue Jul 24, 2020
SetWindowPos: Throw last error only if necessary
@PhyxionNL
Copy link
Author

Thanks @punker76, I'll give this a try when 4.3.2 is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants