Hi,
We are currently using an UltraTree in an application. We have a customer (that I believe is always using a remote desktop connection) that randomly experiences a "Parameter not valid" error.
Here is the stack trace:
System.ArgumentException: Parameter is not valid. at System.Drawing.Image.get_Width() at System.Drawing.Image.get_Size() at Infragistics.Win.EditorWithTextUIElement.GetImageSize(Image img, Size& imageSize) at Infragistics.Win.EditorWithTextUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements(Boolean recursive) at Infragistics.Win.UIElement.VerifyChildElements() at Infragistics.Win.UltraWinTree.UltraTree.SetActiveNode(UltraTreeNode node, Boolean bringIntoView, Boolean adjustHorizontalPosition, NodeActivationReason reason) at Infragistics.Win.UltraWinTree.UltraTree.Infragistics.Win.ISelectionManager.ActivateItem(ISelectableItem item) at Infragistics.Win.SelectionStrategySingle.OnMouseDown(ISelectableItem item, MouseMessageInfo& msginfo, Boolean forceDrag) at Infragistics.Win.SelectionStrategySingle.OnMouseDown(ISelectableItem item, MouseMessageInfo& msginfo) at Infragistics.Win.SelectionStrategySingle.OnMouseMessage(ISelectableItem item, MouseMessageInfo& msginfo) at Infragistics.Win.ControlUIElementBase.ProcessMouseDownHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseDown(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraWinTree.UltraTree.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) 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)
To be honest, I haven't gotten a good read on what is actually causing the error, was hoping that something would jump out given the stack trace.
I believe the following is the version of Infragistics being referenced.
11.2.20112.2050
Thanks in advance!
Steve
Hi Steve,
The call stack does look somewhat familiar. It's possible that you are running into an issue that has since been resolved. Are you able to test your application in the latest version of Infragistics? Please try this out and let me know if the issue is resolved in 16.2.
I am looking for more detailed information about the specific issue. Please let me know if you would like to know more about what I find out.
If you could keep me in the loop that would be great! I was hoping the stack trace would be able to tie to a specific bug fix.
I'm going to have to see what we can do to upgrade the controls, rebuild and get the application to the customer in a reproducible scenario, but sometimes that's not always easy. But I will for sure try and report results if we're able to. In the meantime, if any new information comes up, please let me know!
I will keep you informed on this issue.
We aren't sure of the exact issue from the available information, but we do have a few ideas of development items that might be related. All of these items that we think might be the one you encountered are fixed in 16.2, so we believe that there is a high probability that upgrading to 16.2 will resolve this in your application.
If you are able to perform this upgrade, please let us know the results. If it is possible, I recommend creating a reproduction sample on which to test your upgrade. It will be much easier to switch versions on a sample, and you will already have a sample to send to us for further investigation in the event that the issue persists.
If it helps, I'm having a very similar issue with an UltraWinGrid. The control crashes, Red X, etc... The stack trace is very similar as well:
System.ArgumentException: Parameter is not valid. at System.Drawing.Image.get_Width() at System.Drawing.Image.get_Size() at Infragistics.Win.EmbeddableImageRendererUIElement.PositionChildElements() at Infragistics.Win.UIElement.VerifyChildElements(ControlUIElementBase controlElement, Boolean recursive) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraWinGrid.UltraGridUIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) at Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) at Infragistics.Win.UltraWinGrid.UltraGrid.OnPaint(PaintEventArgs pe) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer) at System.Windows.Forms.Control.WmPaint(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)
I am using the UltraGrid on a UserControl which is hosted inside an Excel CommonTaskPane (the project is an Excel 2013 VSTO project).
I have been struggling with this for months and months now because it's only happening on a very small number of user machines. It wasn't until today that I have been able to get a hold of one of the machines to debug (they're mostly people around the world and debugging remotely is not an option...)
The "awesome" thing for my issue is that it only happens within the user's profile. If I log in on the machine using my own Windows profile and run the add-in everything works fine. I've done a detect and repair on Office, I've repaired .NET (4.6.1), I've removed all other Excel add-ins, etc.
You've given me hope! I'm currently using the UltraGrid 16.1, but am now going to update to 16.2 to see if your suspicions about the problem being resolved in that version pan out!
-Shawn Quillman
I just upgraded to 16.2 in my project, but unfortunately it didn't resolve the issue for me. The UltraGrid still crashes.
Something else that might be of benefit is that in my case the crash does not happen until the content of the grid is enough to force the grid to scroll, either vertically or horizontally. It's fine as long as the grid container can full encompass the content. Once the content expands beyond the horizontal or vertical bounds of the control size and the horizontal or vertical scrollbars appear the grid crashes.
And additionally, somewhat related to Steve's problem, I'm using the UltraGrid as a tree. Expanding the bands works great, until I expand enough to make the grid scroll.
In my case I don't think that providing a code sample will be of any benefit since it seems to be related to the user profile...