Bug 60524 - NRE when rendering ListView with grouping enabled and HasUnevenRows set to true
Summary: NRE when rendering ListView with grouping enabled and HasUnevenRows set to true
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.4.0
Hardware: Macintosh Mac OS
: Highest critical
Target Milestone: ---
Assignee: Samantha Houts [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-11-06 13:20 UTC by Ken Pespisa
Modified: 2017-11-08 20:04 UTC (History)
3 users (show)

Tags: ac, ios, listview, hasunevenrows, fr
Is this bug a regression?: ---
Last known good build:


Attachments
Example project (5.37 MB, application/zip)
2017-11-06 13:20 UTC, Ken Pespisa
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Ken Pespisa 2017-11-06 13:20:55 UTC
Created attachment 25561 [details]
Example project

Example project attached. The list view renders fine with groups until I set the hasunevenrows parameter to true. 

This started happening in SR4 and didn't not occur in SR3 (2.4.0.38779)

System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Internals.DataTemplateExtensions.CreateContent (Xamarin.Forms.DataTemplate self, System.Object item, Xamarin.Forms.BindableObject container) [0x00000] in C:\agent\_work\3\s\Xamarin.Forms.Core\DataTemplateExtensions.cs:19
  at Xamarin.Forms.Internals.TemplatedItemsList`2[TView,TItem].ActivateContent (System.Int32 index, System.Object item) [0x00000] in C:\agent\_work\3\s\Xamarin.Forms.Core\TemplatedItemsList.cs:534
  at Xamarin.Forms.Platform.iOS.ListViewRenderer+UnevenListViewDataSource.GetEstimatedRowHeight (UIKit.UITableView table) [0x0003f] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.ListViewRenderer.UpdateEstimatedRowHeight () [0x0006c] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.ListViewRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x001ab] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00118] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x000cc] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x00009] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at at (wrapper managed-to-native) ObjCRuntime.Messaging:IntPtr_objc_msgSendSuper (intptr,intptr)
  at UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/build/ios/native/UIKit/UIViewController.g.cs:2983
  at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x0001b] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.Platform.AddChild (Xamarin.Forms.VisualElement view) [0x00027] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.Platform.WillAppear () [0x00043] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewWillAppear (System.Boolean animated) [0x00016] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at at (wrapper managed-to-native) ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
  at UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/build/ios/native/UIKit/UIWindow.g.cs:259
  at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.SetMainPage () [0x00006] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (UIKit.UIApplication uiApplication, Foundation.NSDictionary launchOptions) [0x00028] in <9b6516ec36ba4b99846cad5d246369b1>:0
  at GroupingIssue.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication app, Foundation.NSDictionary options) [0x00013] in /Users/kennethpespisa/Projects/GroupingIssue/iOS/AppDelegate.cs:20
  at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/UIKit/UIApplication.cs:79
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5481/12e80e01/source/xamarin-macios/src/UIKit/UIApplication.cs:63
  at GroupingIssue.iOS.Application.Main (System.String[] args) [0x00001] in /Users/kennethpespisa/Projects/GroupingIssue/iOS/Main.cs:17
Comment 1 David Ortinau [MSFT] 2017-11-06 14:18:13 UTC
Confirmed this.

2.4.0.38779 GOOD
2.4.0.56808 BAD
2.5.1.60046-nightly BAD
Comment 2 Samantha Houts [MSFT] 2017-11-07 06:13:59 UTC
https://github.com/xamarin/Xamarin.Forms/pull/1254
Comment 3 Samantha Houts [MSFT] 2017-11-08 20:04:01 UTC
Should be fixed in 2.4.0-SR5. Thank you!