Skip to content

View crashes on InitializeComponent #36744

Closed

Description

@LeDahu22

Description

Hi,

After upgrading to MAUI 10.0.90, when navigating to some screens (not all of them though), there is an exception immediately when InitializeComponent is called

Thanks.

PS : I couldn't set the version with issue as 10.0.90 isn't in the list yet.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

10.0.90

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

10.0.80

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

Rollback to version 10.0.80

Relevant log output

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Maui.Controls.BindableObject.ApplyBindings(Boolean fromBindingContextChanged) in /_/src/Controls/src/Core/BindableObject.cs:line 712
   at Microsoft.Maui.Controls.BindableObject.SetInheritedBindingContext(BindableObject bindable, Object value) in /_/src/Controls/src/Core/BindableObject.cs:line 379
   at Microsoft.Maui.Controls.Element.SetChildInheritedBindingContext(Element child, Object context) in /_/src/Controls/src/Core/Element/Element.cs:line 868
   at Microsoft.Maui.Controls.Element.SetLogicalChildBindingContext(BindableObject child, Object bc) in /_/src/Controls/src/Core/Element/Element.cs:line 653
   at Microsoft.Maui.Controls.BindableObjectExtensions.PropagateBindingContext[Element](BindableObject self, IEnumerable`1 children, Action`2 setChildBindingContext) in /_/src/Controls/src/Core/BindableObjectExtensions.cs:line 48
   at Microsoft.Maui.Controls.Element.OnBindingContextChanged() in /_/src/Controls/src/Core/Element/Element.cs:line 637
   at Microsoft.Maui.Controls.VisualElement.OnBindingContextChanged() in /_/src/Controls/src/Core/VisualElement/VisualElement.cs:line 1370
   at Microsoft.Maui.Controls.View.OnBindingContextChanged() in /_/src/Controls/src/Core/View/View.cs:line 268
   at Microsoft.Maui.Controls.Grid.OnBindingContextChanged() in /_/src/Controls/src/Core/Layout/Grid.cs:line 435
   at Microsoft.Maui.Controls.BindableObject.SetInheritedBindingContext(BindableObject bindable, Object value) in /_/src/Controls/src/Core/BindableObject.cs:line 380
   at Microsoft.Maui.Controls.TemplateUtilities.OnContentChanged(BindableObject bindable, Object oldValue, Object newValue) in /_/src/Controls/src/Core/TemplateUtilities.cs:line 94
   at Microsoft.Maui.Controls.BindableObject.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean didChange, Boolean willFirePropertyChanged) in /_/src/Controls/src/Core/BindableObject.cs:line 701
   at Microsoft.Maui.Controls.Element.OnBindablePropertySet(BindableProperty property, Object original, Object value, Boolean changed, Boolean willFirePropertyChanged) in /_/src/Controls/src/Core/Element/Element.cs:line 709
   at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) in /_/src/Controls/src/Core/BindableObject.cs:line 688
   at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) in /_/src/Controls/src/Core/BindableObject.cs:line 616
   at Microsoft.Maui.Controls.BindableObject.SetValue(BindableProperty property, Object value) in /_/src/Controls/src/Core/BindableObject.cs:line 521
   at NDC.Mobile.Views.RfidEggCollection.RfidEggCollectionInput.InitializeComponent() in C:\Users\MyUser\Desktop\Git\MyProject.Mobile\obj\Debug\net10.0-android\Microsoft.Maui.Controls.SourceGen\Microsoft.Maui.Controls.SourceGen.XamlGenerator\Views_RfidEggCollection_RfidEggCollectionInput.xaml.xsg.cs:line 1169
   at NDC.Mobile.Views.RfidEggCollection.RfidEggCollectionInput..ctor(RfidEggCollectionInputViewModel viewModel, IServiceProvider provider) in C:\Users\MyUser\Desktop\Git\MyProject.Mobile\Views\RfidEggCollection\RfidEggCollectionInput.xaml.cs:line 18
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(ServiceCallSite callSite, RuntimeResolverContext argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(ServiceCallSite callSite, RuntimeResolverContext argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeServiceProviderEngine.<>c__DisplayClass4_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in /_/src/Core/src/MauiContext.cs:line 87
   at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance(IServiceProvider provider, Type type)
   at Microsoft.Maui.Controls.Routing.TypeRouteFactory.GetOrCreate(IServiceProvider services) in /_/src/Controls/src/Core/Routing.cs:line 336
   at Microsoft.Maui.Controls.Routing.GetOrCreateContent(String route, IServiceProvider services) in /_/src/Controls/src/Core/Routing.cs:line 169
   at Microsoft.Maui.Controls.ShellSection.GetOrCreateFromRoute(String route, ShellRouteParameters queryData, IServiceProvider services, Boolean isLast, Boolean isPopping) in /_/src/Controls/src/Core/Shell/ShellSection.cs:line 511
   at Microsoft.Maui.Controls.ShellSection.GoToAsync(ShellNavigationRequest request, ShellRouteParameters queryData, IServiceProvider services, Nullable`1 animate, Boolean isRelativePopping) in /_/src/Controls/src/Core/Shell/ShellSection.cs:line 552
   at Microsoft.Maui.Controls.ShellNavigationManager.GoToAsync(ShellNavigationParameters shellNavigationParameters, ShellNavigationRequest navigationRequest) in /_/src/Controls/src/Core/Shell/ShellNavigationManager.cs:line 196
   at NDC.Mobile.Navigation.NavigationService.<>c__DisplayClass5_0.<<NavigateToAsync>b__0>d.MoveNext() in C:\Users\MyUser\Desktop\Git\MyProject.Mobile\Navigation\NavigationService.cs:line 29
--- End of stack trace from previous location ---
   at NDC.Mobile.Navigation.NavigationService.NavigateToAsync(String route, IDictionary`2 routeParameters) in C:\Users\MyUser\Desktop\Git\MyProject.Mobile\Navigation\NavigationService.cs:line 25

Activity

  1. added
    t/bug
    on Jul 23, 2026
  2. added
    i/regression
    potential-regression
    on Jul 23, 2026
  3. LogishaSelvarajSF4525 commented on Jul 23, 2026

    @LogishaSelvarajSF4525
    Contributor

    This issue has been validated in Visual Studio Code 1.130.0 with .NET MAUI versions 10.0.80 & 10.0.90. It cannot be reproducible on Android(API 34 & API 30) platform.Here I attached the sample & reference video: MauiAppCrash 1.zip

    Screen.Recording.2026-07-23.at.5.14.55.PM.mov

    @LeDahu22 I created a sample based on the information provided in the issue report, but I was unable to reproduce the issue on Android platform. Could you please provide a reproduction sample or modify the sample shared above so that the issue can be reproduced? This will help us investigate the issue further.

  4. added
    s/needs-info
    s/needs-repro
    on Jul 23, 2026
  5. LeDahu22 commented on Jul 27, 2026

    @LeDahu22
    Author

    Here is a repro project base on the one you created : GitHub

    I managed to isolate the culprit : if you comment both Telerik RadGridView in FailingPage.xaml, it won't crash.

    This was working in 10.0.80.

  6. added
    s/needs-attention
    and removed
    s/needs-info
    s/needs-repro
    on Jul 27, 2026
  7. dan14749 commented on Aug 4, 2026

    @dan14749

    This also affects us, it can be easily reproduced by increasing the maui version to 10.0.90 and using the telerik samples app "RadDataGrid" from https://github.com/telerik/maui-samples/tree/main by opening any data grid page.

  8. TamilarasanSF4853 commented on Aug 4, 2026

    @TamilarasanSF4853
    Contributor

    This issue has been validated in Visual Studio Code 1.131.0 with .NET MAUI versions 10.0.80 and 10.0.90. It can be reproduced on 10.0.90 on the Android platform.

    Image
  9. added
    s/verified
    s/triaged
    and removed
    s/needs-attention
    on Aug 4, 2026
  10. added
    partner/syncfusion
    and removed
    potential-regression
    on Aug 5, 2026
  11. added this to the .NET 10 SR10 milestone on Aug 6, 2026
  12. added 2 commits that reference this issue on Aug 7, 2026
    2db8b6a
    cfe2991
  13. LeDahu22 commented on Aug 21, 2026

    @LeDahu22
    Author

    @kubaflo Version SR10 seems to fix the issue. Is there any reason for the SR11 milestone ?

  14. kubaflo commented on Aug 21, 2026

    @kubaflo
    Contributor

    @LeDahu22 thanks for letting me know! This was probably the automation fault - closing it then

  15. locked and limited conversation to collaborators on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    i/regressionpartner/syncfusionplatform/androidregressed-in-10.0.90s/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions