Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAUI]Clicking the "I5_EmptyView with EmptyViewTemplate for Data template selector" page throws an exception #25224

Closed
Zhanglirong-Winnie opened this issue Oct 12, 2024 · 2 comments · Fixed by #25418
Assignees
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

Comments

@Zhanglirong-Winnie
Copy link

Zhanglirong-Winnie commented Oct 12, 2024

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

  1. Deploy https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests to iOS and MacCatlystt.
  2. Navigate to 'I5_EmptyView' ->'EmptyView with EmptyViewTemplate for Data template selector'
  3. Observe the page display

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
Image

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.ItemsViewController1[[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.ItemsViewController1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].UpdateEmptyView()
at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].EnsureLayoutInitialized() at at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController1[[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.ItemsViewHandler1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].CreatePlatformView() at at Microsoft.Maui.Handlers.ViewHandler2[[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.ItemsViewHandler1[[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.ViewHandler2[[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.ViewHandler2[[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.ViewHandler2[[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.PropertyMapper2.<>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.ViewHandler2[[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.ViewHandler2[[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, TaskCompletionSource1 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(List1 pages, Nullable1 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

@Zhanglirong-Winnie Zhanglirong-Winnie added csi-new platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst s/triaged Issue has been reviewed t/bug Something isn't working i/regression This issue described a confirmed regression on a currently supported version labels Oct 12, 2024
@jsuarezruiz jsuarezruiz added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Oct 14, 2024
@PureWeen PureWeen added p/0 Work that we can't release without and removed p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint labels Oct 14, 2024
@PureWeen
Copy link
Member

The following PR regressed this one

#24830

@jfversluis
Copy link
Member

jfversluis commented Nov 8, 2024

The iOS part of the change that causes this was reverted: #25738

Keeping this issue open to fix up the iOS platform for this change again.

@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Nov 22, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Done
6 participants