[MAUI]Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page throws an exception #25224
Labels
csi-new
fixed-in-9.0.21
i/regression
This issue described a confirmed regression on a currently supported version
p/0
Work that we can't release without
partner/syncfusion
Issues / PR's with Syncfusion collaboration
platform/iOS 🍎
platform/macOS 🍏
macOS / Mac Catalyst
s/triaged
Issue has been reviewed
t/bug
Something isn't working
Milestone
Description
Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page throws an exception
Affected case:
I5_EmptyView with EmptyViewTemplate for Data template selector
Steps to Reproduce
Actual Behavior:
MacCatalyst: Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page not responding
iOS: Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page throws an exception
Expected Behavior:
Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page displays normally
Link to public reproduction project repository
https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests
Version with bug
Microsoft.Maui.Controls 8.0.99-ci.net8.24511.3
Is this a regression from previous behavior?
Yes, this is a regression, The issue not repro on 8.0.99-ci.net8.24509.1 & 8.0.91 & 8.0.3
Affected platforms
iOS, macOS
Relevant log output
Exception has occurred: System.NullReferenceException
•
Object reference not set to an instance of an object.
at ManualMauiTests.Controls.SearchTermDataTemplateSelector.OnSelectTemplate(Object item, BindableObject container) in /Users/vstester/Desktop/ManualMauiTests/Controls/SearchTermDataTemplateSelector.cs:11
at at Microsoft.Maui.Controls.DataTemplateSelector.SelectTemplate(Object item, BindableObject container)
at at Microsoft.Maui.Controls.Internals.DataTemplateExtensions.SelectDataTemplate(DataTemplate self, Object item, BindableObject container)
at at Microsoft.Maui.Controls.Handlers.Items.TemplateHelpers.RealizeView(Object view, DataTemplate viewTemplate, ItemsView itemsView)
at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateView(Object view, DataTemplate viewTemplate, UIView& uiView, VisualElement& formsElement) at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateEmptyView()at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].EnsureLayoutInitialized() at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ViewDidLoad()at UIKit.UIViewController.get_View() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UIViewController.g.cs:3355
at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewHandler
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].CreatePlatformView() at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIView, Microsoft.iOS, Version=17.5.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].OnCreatePlatformView()at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewHandler
1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCreatePlatformView() at at Microsoft.Maui.Handlers.ViewHandler.OnCreatePlatformElement() at at Microsoft.Maui.Handlers.ElementHandler.CreatePlatformElement() at at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIView, Microsoft.iOS, Version=17.5.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].SetVirtualView(IView view)at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIView, Microsoft.iOS, Version=17.5.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].SetVirtualView(IElement view) at at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view) at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view)at at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at at Microsoft.Maui.Handlers.ContentViewHandler.UpdateContent(IContentViewHandler handler)
at at Microsoft.Maui.Handlers.ContentViewHandler.MapContent(IContentViewHandler handler, IContentView page)
at at Microsoft.Maui.PropertyMapper
2.<>c__DisplayClass5_0[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.IContentViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IElementHandler h, IElement v) at at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView) at at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView) at at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.ContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IView view)at at Microsoft.Maui.Handlers.ContentViewHandler.SetVirtualView(IView view)
at at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.ContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view) at at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at at Microsoft.Maui.Platform.ViewExtensions.ToHandler(IView view, IMauiContext context) at at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.PushPage(Page page, Boolean animated, TaskCompletionSource
1 completionSource)at at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnPushRequested(NavigationRequestedEventArgs e)
at at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnNavigationRequested(Object sender, NavigationRequestedEventArgs e)
at at Microsoft.Maui.Controls.ShellSection.InvokeNavigationRequest(NavigationRequestedEventArgs args)
at at Microsoft.Maui.Controls.ShellSection.OnPushAsync(Page page, Boolean animated)
at at Microsoft.Maui.Controls.ShellSection.PushStackOfPages(List
1 pages, Nullable
1 animate)at at Microsoft.Maui.Controls.ShellSection.GoToAsync(ShellNavigationRequest request, ShellRouteParameters queryData, IServiceProvider services, Nullable`1 animate, Boolean isRelativePopping)
at at Microsoft.Maui.Controls.ShellNavigationManager.GoToAsync(ShellNavigationParameters shellNavigationParameters, ShellNavigationRequest navigationRequest)
at ManualMauiTests.Tests.CollectionView.I5_EmptyView.<.ctor>b__4_0(Type pageType) in /Users/vstester/Desktop/ManualMauiTests/Tests/CollectionView/I5_EmptyView.xaml.cs:21
at at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:179
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:2708
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:64
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:96
at ManualMauiTests.Program.Main(String[] args) in /Users/vstester/Desktop/ManualMauiTests/Platforms/iOS/Program.cs:13
The text was updated successfully, but these errors were encountered: