Need More Info
Last Updated: 25 Mar 2024 13:42 by Al
Al
Created on: 18 Mar 2024 11:14
Category: UI for WinForms
Type: Bug Report
0
RadCollectionView: SZGenericArrayEnumerator exception is thrown while refreshing the grid in hierarchy mode
This exception is a result of changes in the Current property of the IEnumerator interface. With the lastest version, if the current item is undefined it will throw an exception if we try to access it with the Current property, while in the older version, it will return null.
5 comments
Al
Posted on: 25 Mar 2024 13:42
I had the issues mixed up. I apologize for the confusion. However, I cannot use the updated version until the ObservableCollectionListSource issue is fixed. I look forward to that update.
ADMIN
Hristo
Posted on: 25 Mar 2024 08:28

Hi Al,

Thanks for the project. It demonstrates the issue with the EF8 ObservableCollectionListSource collection, and that error is tracked elsewhere: RadGridView: Using ObservableCollectionListSource as a DataSource will lead to an exception when a row is removed (telerik.com). The item is already in development, and we are currently testing a possible fix.

The issue here, treats the exception as per the call stack in my previous post. We logged it based on your additional report from 15 Mar 2024 in ticket 1643794, and the provided stack trace. As we were familiar with the root cause that may cause a similar exception we logged the issue. It turns out, however, that we've already fixed our RebuildDescriptorIndex method with the 2024.1.130 version, so it should not throw now. Can you please double check that you are still getting an error with a similar stack trace?

Thank you in advance. Looking forward to your reply.

Regards,
Hristo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Al
Posted on: 22 Mar 2024 15:31
It not only still exists in 2024.1.130, it still exists in 2024.1.312. Please reference the attached project. Run it, select the top item in the grid, right-click for the context menu and select delete. It will generate the "Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')" error
Attached Files:
ADMIN
Hristo
Posted on: 22 Mar 2024 09:37

Hello Al,

We double checked our IEnumerator fixes for .NET 8 and it turns out that the problematic RebuildDescriptorIndex method is updated and fixed with the 2024.1.130 (2024 Q1) release. Here is the stack trace causing the error: 

at System.SZGenericArrayEnumerator`1.get_Current() at Telerik.WinControls.Data.RadCollectionView`1.RebuildDescriptorIndex(IEnumerable`1 source, SortDescriptorCollection sortDescriptors, GroupDescriptorCollection groupDescriptors) at Telerik.WinControls.Data.SnapshotCollectionView`1..ctor(IEnumerable`1 sourceCollection, RadCollectionView`1 sourceView) at Telerik.WinControls.UI.GridViewInfo.LoadHierarchicalData(GridViewHierarchyRowInfo parent, ICollectionView`1 sourceView) at Telerik.WinControls.UI.GridViewInfo.Refresh()

...

Looking into the stack trace and the current state of our implementation I cannot see where the method could throw a similar exception in .NET 8. Can you please double check that the issue still reproduces and indeed that you are using version 2024.1.130? In case the error still appears please provide us with instructions how we can reproduce it so that we can investigate it accordingly.

Thank you in advance for your cooperation.

Regards,
Hristo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Dinko | Tech Support Engineer
Posted on: 18 Mar 2024 11:38

Hi Al Wilton,

Thank you for reporting this. We have already reported this to Microsoft: https://github.com/dotnet/runtime/issues/94256. We need to apply the corresponding changes in our code.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com