To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: PowerShell Studio 2020; 5.7.173
32 or 64 bit version of product: 64
Operating system: Windows 10 1903
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Periodically (and often) I receive a popup with an error stating that the Index is out of range. This can be as soon as I launch PS Studio, or a minute in or two in, and then frequently there after. Here is today's error message that occurred within moments of starting a new Forms project.
[2020.03.06 - 10:43:08] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Please advise, as these are very annoying.
Unhandled Exception - Index was out of range
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Unhandled Exception - Index was out of range
Just happened again, as I went from Script back into Designer on the MainForm.psf:
[2020.03.06 - 10:52:24] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[2020.03.06 - 10:52:24] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Unhandled Exception - Index was out of range
We understand your frustration! Can you please provide a screenshot when the exception happens with the exact steps when creating a new form project. Is this a single "Form Project", or a "Multi-Form Project"? Also, where are these projects been saved?
Re: Unhandled Exception - Index was out of range
Launched PS Studio as Administrator
New Project > Form Project (Creates a single form project. Used to create a script application)
Named Project "TestProject"
Save location is .\Documents\SAPIEN\PowerShell Studio\Projects. Documents is redirected to OneDrive for Business
Clicked 'Create' > Empty Form > Clicked 'Open'
Deleted sample stuff from Globals.ps1
Saved
Clicked tab for MainForm.psf
... BAM ... error
Clicked 'OK' on the error.
ErrorLog.txt opened in Notepad
Scrolled to the bottom to get the most recent error and copied here:
[2020.03.06 - 11:09:15] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
New Project > Form Project (Creates a single form project. Used to create a script application)
Named Project "TestProject"
Save location is .\Documents\SAPIEN\PowerShell Studio\Projects. Documents is redirected to OneDrive for Business
Clicked 'Create' > Empty Form > Clicked 'Open'
Deleted sample stuff from Globals.ps1
Saved
Clicked tab for MainForm.psf
... BAM ... error
Clicked 'OK' on the error.
ErrorLog.txt opened in Notepad
Scrolled to the bottom to get the most recent error and copied here:
[2020.03.06 - 11:09:15] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Unhandled Exception - Index was out of range
I've not able to reproduce the issue. But, I got OneDrive Personal (not the Business). Can you please try to create the New Form Project on your local drive? Let us know if the behavior change.
Re: Unhandled Exception - Index was out of range
Saved project to local disk and had same issue:
[2020.03.06 - 13:05:24] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[2020.03.06 - 13:05:24] Unhandled Exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.Helpers.BaseLayoutInfo.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.DockPanel.get_Item(Int32 index)
at DevExpress.XtraBars.Docking.AutoHideContainerViewInfo.CalcHitInfo(Point point)
at DevExpress.XtraBars.Docking.AutoHideContainer.GetHotLayout(Point pt)
at DevExpress.XtraBars.Docking.AutoHideContainer.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Docking.ZIndexControl.WndProc(Message& m)
at DevExpress.XtraBars.Docking.AutoHideContainer.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Unhandled Exception - Index was out of range
Thanks for providing the information.
We are currently investigating and get back to you soon.
We are currently investigating and get back to you soon.
Re: Unhandled Exception - Index was out of range
Thank you - I eagerly await a response / fix / workaround!
Re: Unhandled Exception - Index was out of range
Can you please upload the file named Layout.xml from the your user AppData folder (C:\Users\[User]\AppData\Roaming\SAPIEN\PowerShell Studio):
https://www.sapien.com/support/upload
https://www.sapien.com/support/upload
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.