This is a migrated thread and some comments may be shown as answers.

Error Creating Window Handle

1 Answer 2928 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Francisco
Top achievements
Rank 1
Francisco asked on 19 Jul 2019, 09:29 AM

Hi there,

We're facing this error in one of our recent deployments to one of our customers and it has never happened before to us. When it's happening, a big red cross it's displayed instead of one of the controls, usually in the parent window using either GridView or PageView.

There are different stack traces for the same exception message, but all of them involve some calls to Telerik controls and nothing to our own code. See some examples from the most common errors:

Stack Trace 1:

at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)    
at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()    
at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32 interval)    
at System.Windows.Forms.Timer.set_Enabled(Boolean value)    
at Telerik.WinControls.MouseHoverTimer.Start(RadElement element)    
at Telerik.WinControls.ComponentInputBehavior.SelectElementOnMouseOver(MouseEventArgs e)    
at Telerik.WinControls.ComponentInputBehavior.OnMouseMove(MouseEventArgs e)    
at Telerik.WinControls.RadControl.OnMouseMove(MouseEventArgs e)    
at System.Windows.Forms.Control.WmMouseMove(Message& m)    
at System.Windows.Forms.Control.WndProc(Message& m)    
at Telerik.WinControls.RadControl.WndProc(Message& m)    
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Stack Trace 2:

at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)    
at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()    
at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32 interval)    
at System.Windows.Forms.Timer.set_Enabled(Boolean value)    
at Telerik.WinControls.ComponentInputBehavior.EnsureElementUnderMouseMonitorTimer()    
at Telerik.WinControls.ComponentInputBehavior.SelectElementOnMouseOver(MouseEventArgs e)    
at Telerik.WinControls.ComponentInputBehavior.OnMouseMove(MouseEventArgs e)    
at Telerik.WinControls.RadControl.OnMouseMove(MouseEventArgs e)    
at System.Windows.Forms.Control.WmMouseMove(Message& m)    
at System.Windows.Forms.Control.WndProc(Message& m)    
at Telerik.WinControls.RadControl.WndProc(Message& m)    
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Stack Trace 3:

at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)    
at System.Windows.Forms.Timer.TimerNativeWindow.EnsureHandle()    
at System.Windows.Forms.Timer.TimerNativeWindow.StartTimer(Int32 interval)    
at System.Windows.Forms.Timer.set_Enabled(Boolean value)    
at Telerik.WinControls.MouseHoverTimer.Start(RadElement element)    
at Telerik.WinControls.ComponentInputBehavior.SelectElementOnMouseOver(MouseEventArgs e)    
at Telerik.WinControls.ComponentInputBehavior.OnMouseMove(MouseEventArgs e)    
at Telerik.WinControls.RadHostItem.hostedControl_MouseMove(Object sender, MouseEventArgs e)    
at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)    
at System.Windows.Forms.Control.WmMouseMove(Message& m)    
at System.Windows.Forms.Control.WndProc(Message& m)    
at System.Windows.Forms.TextBox.WndProc(Message& m)    
at Telerik.WinControls.UI.HostedTextBoxBase.WndProc(Message& message)    
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Unfortunately, it's happening very randomly, so we're totally unable to replicate it, but it seems to be related with our client's users still using Windows 7 (yeah, quite old, I know).

We have already checked the number of User objects and handles created by the application when crashes and they look fine (between 500 and 1,000 for both in the worst cases). Regular machines are laptops using Windows 7 with 4GB of memory.

We don't know what else we could check, but we were wondering whether you have ever faced an error like this or not. Any light or ideas into this case will be welcomed.

BTW, the Telerik version we're using is 2018.1.220.40 (mainly GridView and PageViewer) and the .NET Framework version is 4.6.1.

Thank you in advanced.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 22 Jul 2019, 02:34 PM
Hello Francisco,

Thank you for writing.

We are not aware of issue in the controls resulting in an exception similar to the one reported by your clients. Such an error usually indicates that there is not enough resources on the machine to allow a normal execution of the program. It is hard to debug similar errors as there are no clear steps to reproduce them. You can check the following blog post discussing in details a similar error: https://weblogs.asp.net/fmarguerie/cannot-create-window-handle-desktop-heap.

I hope this will be useful.

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Francisco
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or