You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Not sure.
Issue description
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.OnMouseWheel(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseWheel(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.PropertyGridInternal.PropertyGridView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
@Zheng-Li01:
The issue was found in the error log. I'm not sure how to re-create the issue.
The Exception is thrown on line 3193:
CommitValue(values[index]);
Cause:
The code does not check if the array is empty (zero length).
--
The array (which could be empty) is returned from (line 1464):
///
/// Returns the standard text values of this property.
///
public virtual object[] GetPropertyValueList()
{
if (TypeConverter.GetStandardValues(this) is { } values)
{
object[] valueArray = new object[values.Count];
values.CopyTo(valueArray, 0);
return valueArray;
}
Tested in the latest .NET 11 RC2 build: 11.0.100-rc.2.26453.107 + built private dls from the main branch of WinForms repo, it was fixed. No IndexOutOfRangeException throw for PropertyGridView.OnMouseWheel.
Activity
Zheng-Li01 commentedon Dec 25, 2025
@ulfemsoy could you please provide more details to help reproduce the issue, such as stable steps or sample project?
ulfemsoy commentedon Dec 25, 2025
@Zheng-Li01:
The issue was found in the error log. I'm not sure how to re-create the issue.
The Exception is thrown on line 3193:
CommitValue(values[index]);Cause:
The code does not check if the array is empty (zero length).
--
The array (which could be empty) is returned from (line 1464):
///
/// Returns the standard text values of this property.
///
public virtual object[] GetPropertyValueList()
{
if (TypeConverter.GetStandardValues(this) is { } values)
{
object[] valueArray = new object[values.Count];
values.CopyTo(valueArray, 0);
return valueArray;
}
}
Amy-Li03 commentedon Sep 4, 2026
Tested in the latest .NET 11 RC2 build: 11.0.100-rc.2.26453.107 + built private dls from the main branch of WinForms repo, it was fixed. No IndexOutOfRangeException throw for
PropertyGridView.OnMouseWheel.