Hi,
I am getting an unhandled exception somewhere in the Ribbon of the UltraToolbarsManager. I was not able to trace a code fragment inside my application where it happens, the stack trace shows only Infragistics and Windows Forms modules. The reproduction scenario is very rare, but the few times it has been seen was always when the machine was going to suspend mode. The exception is handled by the Application.ThreadException event handler and I have had no chance to catch from a different location (the form is loaded and run with Applicatioin.Run()).
Here are the exception details:
Das Handle ist ungültigSystem.ComponentModel.Win32ExceptionStack Trace: bei System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) bei System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize) bei System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize) bei Infragistics.Win.ControlUIElementBase.CaptureOldImage(UIElement element) bei Infragistics.Win.TransitionInfo..ctor(UIElement element, Transition transition, TransitionSettings settings) bei Infragistics.Win.ControlUIElementBase.InitiateTransition(TransitionSettings settings, Transition transition, UIElement element) bei Infragistics.Win.UIElement.InitiateTransition(TransitionSettings settings, UIElementTransitionType transitionType) bei Infragistics.Win.UltraWinToolbars.RibbonGroupUIElement.OnMouseLeave() bei Infragistics.Win.ControlUIElementBase.ElementEntered(UIElement element, Boolean triggerMouseLeavesOnly) bei Infragistics.Win.ControlUIElementBase.SyncMouseEntered(Boolean triggerMouseLeavesOnly, UIElementInputType inputType, Boolean ignoreLastElementEntered) bei Infragistics.Win.ControlUIElementBase.ProcessMouseLeave(Object sender, EventArgs e) bei Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) bei Infragistics.Win.UltraControlBase.OnMouseLeave(EventArgs e) bei Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseLeave(EventArgs e) bei System.Windows.Forms.Control.WmMouseLeave(Message& m) bei System.Windows.Forms.Control.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The exception is handled on the same thread as the form gets created, so I suppose that it is not caused by another thread modifying the UI.
I would appreciate any help or hints where to look at.
Best regards,
Michael
Oh and two more notes:
Infragistics NetAdvantage 2012 Vol. 1 is used.
The issue was only seen on Windows 8 so far, but as I said, the reproduction is very rare.
Hi mgroeger,
Is this still reproducible without using threads? Please note that our controls and components are not thread safe, so you would have to handle such scenarios yourself.
How can I reproduce this without using threads?
Thank you for your research and details! Could you please clarify what do you mean by suspend? What do I need to do?
Your computer needs to go into sleep mode (energy saving). On a notebook you normally and easilly can do this by tapping on the power button of the notebook.
You should not do this with the Start-Button, because that way the form looses focuis.
Hello,
I created the following case for you: 'CAS-115885-D7Z2M5' and will update you through it.
Do you have an update for this issue? I'm getting same error with the latest version of Infragistics.
Stack trace:
************** Exception Text **************System.ComponentModel.Win32Exception (0x80004005): The handle is invalid at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize) at Infragistics.Win.ControlUIElementBase.CaptureOldImage(UIElement element) at Infragistics.Win.TransitionInfo..ctor(UIElement element, Transition transition, TransitionSettings settings) at Infragistics.Win.ControlUIElementBase.InitiateTransition(TransitionSettings settings, Transition transition, UIElement element) at Infragistics.Win.UltraWinToolbars.RibbonGroupUIElement.OnMouseLeave() at Infragistics.Win.ControlUIElementBase.ElementEntered(UIElement element, Boolean triggerMouseLeavesOnly) at Infragistics.Win.ControlUIElementBase.SyncMouseEntered(Boolean triggerMouseLeavesOnly, UIElementInputType inputType, Boolean ignoreLastElementEntered) at Infragistics.Win.ControlUIElementBase.ProcessMouseLeave(Object sender, EventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseLeave(EventArgs e) at System.Windows.Forms.Control.WmMouseLeave(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Hi Pramod,
I created CAS-116354-D0K9H4 for you.
The issue related item is 142102.
You can view the status of all development issues connected to this case from the "Development Issues" tab, when viewing this case on the "My Support Requests" page of our website.
I think the fix is in 13.1 and later versions.
Hello,I have the same problem.When the notebook is on hold or suspended sometimes get the following error (see attached image toolbars): Note: This error does not always happen. It is random.
Regards, Lello
===================================================
System.ComponentModel.Win32Exception (0x80004005): Handle non valido in System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation) in System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize) in Infragistics.Win.ControlUIElementBase.CaptureOldImage(UIElement element) in Infragistics.Win.TransitionInfo..ctor(UIElement element, Transition transition, TransitionSettings settings) in Infragistics.Win.ControlUIElementBase.InitiateTransition(TransitionSettings settings, Transition transition, UIElement element) in Infragistics.Win.UIElement.InitiateTransition(TransitionSettings settings, UIElementTransitionType transitionType) in Infragistics.Win.UltraWinToolbars.RibbonGroupUIElement.OnMouseLeave() in Infragistics.Win.ControlUIElementBase.ElementEntered(UIElement element, Boolean triggerMouseLeavesOnly) in Infragistics.Win.ControlUIElementBase.SyncMouseEntered(Boolean triggerMouseLeavesOnly, UIElementInputType inputType, Boolean ignoreLastElementEntered) in Infragistics.Win.ControlUIElementBase.SyncMouseEntered(Boolean triggerMouseLeavesOnly, UIElementInputType inputType) in Infragistics.Win.ControlUIElementBase.SyncMouseEntered(Boolean triggerMouseLeavesOnly) in Infragistics.Win.ControlUIElementBase.SyncMouseEntered() in Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify, Boolean syncMouseEntered) in Infragistics.Win.ControlUIElementBase.VerifyIfElementsChanged(Boolean verify) in Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) in Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize) in Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) in Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) in Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnPaint(PaintEventArgs pe) in System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) in System.Windows.Forms.Control.WmPaint(Message& m) in System.Windows.Forms.Control.WndProc(Message& m) in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
========================================================================0
Is this fix available in 12.1? Please some one reply?
Is this fix available in 12.1?
yes it should be fixed:
Issue "142102: Win32Exception has been thrown after resuming from sleep mode." has been addressed in service release versions WinForms_13.1.20131.2040, WinForms_12.2.20122.2087.
The following additional notes have been provided regarding this issue:
This service release is now available under your account at the Infragistics Website. To download the service release, log in to ‘Account’ and select ‘Keys & Downloads’. Select the appropriate tab for this product; then the license key. The available service releases (Hot Fixes) should now be listed on the page.