NET MAUI 8.0.92 With SDK 8.0.403.1 - RadListView error on iOS 18

1 Answer 252 Views
ListView (obsolete)
Nivesh
Top achievements
Rank 1
Nivesh asked on 29 Oct 2024, 12:24 PM

Hi,

I've updated to the latest workload and MAUI versions to target iOS 18.

When an item is added to a RadListView I get an application crash which is not recoverable. Please note that I've upgraded Telerik.UI.for.Maui from 7.0.0 to 7.1.0.

 

Below is the error

Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_ListView_UIListViewGroupHeaderCell: 0x1312df000; baseClass = UICollectionViewCell; frame = (0 0; 0 0); alpha = 0; gestureRecognizers = <NSArray: 0x30f0281d0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x3078ad060>>; Collection view: <TKCollectionView: 0x11f39aa00; baseClass = UICollectionView; frame = (0 0; 0 0); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x303dab1b0>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x3077297a0>; contentOffset: {0, 0}; contentSize: {0, 217.5}; adjustedContentInset: {0, 0, 0, 0}; layout: <TKListViewLinearLayout: 0x132300280>; dataSource: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_TKExtendedListView: 0x13201a100; frame = (0 0; 0 0); backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x307729440>>>
Native stack trace:
0   CoreFoundation                      0x000000018c3887d8 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 534488
1   libobjc.A.dylib                     0x000000018965b2e4 objc_exception_throw + 88
2   Foundation                          0x000000018b7588d8 6D0212CC-3B9E-32C9-BE20-72989CE3ACB8 + 8452312
3   UIKitCore                           0x000000018f4e4d5c 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 10456412
4   UIKitCore                           0x000000018fc244c4 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 18056388
5   UIKitCore                           0x000000018ec99254 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 1757780
6   UIKitCore                           0x000000018edf17c4 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 3168196
7   AOS.RA.Mobile                       0x000000010416bce4 -[TKCollectionView layoutSubviews] + 56
8   UIKitCore                           0x000000018eaf9688 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 54920
9   QuartzCore                          0x000000018de2fc28 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 494632
10  QuartzCore                          0x000000018de2f7b4 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 493492
11  QuartzCore                          0x000000018de86914 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 850196
12  QuartzCore                          0x000000018de057c4 D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 321476
13  QuartzCore                          0x000000018de48a0c D8E8E86D-85AC-3C90-B2E1-940235ECAA18 + 596492
14  UIKitCore                           0x000000018eb8f568 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 669032
15  UIKitCore                           0x000000018eb8cb64 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 658276
16  UIKitCore                           0x000000018eb8c9d8 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 657880
17  UIKitCore                           0x000000018eb8c628 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 656936
18  UIKitCore                           0x000000018eb8d59c 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 660892
19  CoreFoundation                      0x000000018c35c328 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 353064
20  CoreFoundation                      0x000000018c35c2bc 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 352956
21  CoreFoundation                      0x000000018c359e24 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 343588
22  CoreFoundation                      0x000000018c358fbc 1532D3D8-9B3B-3F2F-B35F-55A20DDF411B + 339900
23  CoreFoundation                      0x000000018c358830 CFRunLoopRunSpecific + 588
24  GraphicsServices                    0x00000001d83381c4 GSEventRunModal + 164
25  UIKitCore                           0x000000018eebeeb0 575E5140-FA6A-37C2-B00B-A4EACEDFDA53 + 4009648
26  UIKitCore                           0x000000018ef6d5b4 UIApplicationMain + 340
27  AOS.RA.Mobile                       0x00000001047e4da4 xamarin_UIApplicationMain + 60
28  AOS.RA.Mobile                       0x0000000104b3dbb4 do_icall + 316
29  AOS.RA.Mobile                       0x0000000104b3c4b4 do_icall_wrapper + 348
30  AOS.RA.Mobile                       0x0000000104b30ec4 mono_interp_exec_method + 2836
31  AOS.RA.Mobile                       0x0000000104b2ea5c interp_runtime_invoke + 236
32  AOS.RA.Mobile                       0x0000000104afd634 mono_jit_runtime_invoke + 1116
33  AOS.RA.Mobile                       0x0000000104aa4cf8 mono_runtime_invoke_checked + 148
34  AOS.RA.Mobile                       0x0000000104aaaff4 mono_runtime_exec_main_checked + 116
35  AOS.RA.Mobile                       0x0000000104b02c50 mono_jit_exec + 356
36  AOS.RA.Mobile                       0x0000000104810038 xamarin_main + 2324
37  AOS.RA.Mobile                       0x0000000104b6b484 main + 64
38  dyld                                0x00000001b1d46ec8 3060D36A-16CE-3C3A-9258-3881459F5714 + 212680

 

 

The message of the exception:
Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_ListView_UIListViewGroupHeaderCell: 0x1312df000; baseClass = UICollectionViewCell; frame = (0 0; 0 0); alpha = 0; gestureRecognizers = <NSArray: 0x30f0281d0>; backgroundColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x3078ad060>>; Collection view: <TKCollectionView: 0x11f39aa00; baseClass = UICollectionView; frame = (0 0; 0 0); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x303dab1b0>; backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x3077297a0>; contentOffset: {0, 0}; contentSize: {0, 217.5}; adjustedContentInset: {0, 0, 0, 0}; layout: <TKListViewLinearLayout: 0x132300280>; dataSource: <Telerik_Maui_Controls_Compatibility_DataControlsRenderer_iOS_TKExtendedListView: 0x13201a100; frame = (0 0; 0 0); backgroundColor = UIExtendedGrayColorSpace 0 0; layer = <CALayer: 0x307729440>>>

1 Answer, 1 is accepted

Sort by
0
Accepted
Didi
Telerik team
answered on 29 Oct 2024, 12:57 PM

Hello Nivesh,

Use the Telerik MAUI CollectionView control. The control is a complete rewrite of the ListView from the ground up. CollectionView offers improved performance, enhanced features, and a modernized approach to managing lists of data. The CollectionView incorporates all key features of the ListView.

With the upcoming release expected in the middle of November 2024. The RadListView will be obsolete. So my suggestion is to use the new CollectionView. Here is a migration article: Migrating the Telerik .NET MAUI ListView to CollectionView

Give the CollectionView a try and let me know if you have further questions.

Regards,
Didi
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.

Nivesh
Top achievements
Rank 1
commented on 30 Oct 2024, 05:47 AM

Hi Didi,

Thanks for that. Everything works now!

Jones
Top achievements
Rank 1
commented on 23 Dec 2024, 11:02 AM

Hi Didi,

Our app using Telerik .NET MAUI ListView is in production in Android and it would take time we don't have to migrate to CollectionView before the required iOS publishing date, by the end of this year.

Can't you provide a workaround?

I appreciate any help you can provide.

Jones Abramoff

Didi
Telerik team
commented on 24 Dec 2024, 09:38 PM

Hi Jones,

The RadListView is now obsolete and will be removed in future. So I suggest you migrate to the RadCollectionView control.

Regarding to the RadListView exception, please check whether you use a group header template for the RadListView. If yes, remove the group header template and test with the default one. From the provided stack trace, the exception is a native exception in the iOS TKExtendedListView, I will need more details in what cases the exception occurs?

Tags
ListView (obsolete)
Asked by
Nivesh
Top achievements
Rank 1
Answers by
Didi
Telerik team
Share this question
or