Unhandled Exception - Index was out of range

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
This topic is 4 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Unhandled Exception - Index was out of range

Post by bjguthrie »

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.
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Re: Unhandled Exception - Index was out of range

Post by bjguthrie »

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)
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Unhandled Exception - Index was out of range

Post by mxtrinidad »

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?
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Re: Unhandled Exception - Index was out of range

Post by bjguthrie »

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
error.PNG
error.PNG (15.77 KiB) Viewed 4279 times
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)
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Unhandled Exception - Index was out of range

Post by mxtrinidad »

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.
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Re: Unhandled Exception - Index was out of range

Post by bjguthrie »

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)
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: Unhandled Exception - Index was out of range

Post by mxtrinidad »

Thanks for providing the information.

We are currently investigating and get back to you soon.
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Re: Unhandled Exception - Index was out of range

Post by bjguthrie »

Thank you - I eagerly await a response / fix / workaround!
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 11:13 am
Answers: 39
Been upvoted: 30 times

Re: Unhandled Exception - Index was out of range

Post by brittneyr »

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
Brittney
SAPIEN Technologies, Inc.
bjguthrie
Posts: 11
Last visit: Thu Feb 22, 2024 10:00 am

Re: Unhandled Exception - Index was out of range

Post by bjguthrie »

Complete
This topic is 4 years and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.