Skip to content

Intermittent crash on exit on MacCatalyst - ObjectDisposedException #33352

@jeremy-visionaid

Description

@jeremy-visionaid

Description

A new MAUI template app intermittently crashes on exit on MacCatalyst

Steps to Reproduce

dotnet new maui
dotnet run -c Release

Exit the application

Link to public reproduction project repository

No response

Version with bug

10.0.20

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.120 SR12

Affected platforms

macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

./bin/Release/net10.0-maccatalyst/maccatalyst-arm64/MauiTestApp.app/Contents/MacOS/MauiTestApp
2026-01-01 10:20:26.926 MauiTestApp[93679:8146529] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
*** Terminating app due to uncaught exception 'System.ObjectDisposedException', reason: 'ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, IServiceProvider (System.ObjectDisposedException)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type )
   at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[IApplication](IServiceProvider )
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.TraitCollectionDidChange(UITraitCollection previousTraitCollection)
   at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.__Registrar_Callbacks__.callback_106_Microsoft_Maui_Controls_Platform_Compatibility_ShellSectionRootRenderer_TraitCollectionDidChange(IntPtr pobj, IntPtr sel, IntPtr p0, IntPtr* exception_gchandle)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyouti/regressionThis issue described a confirmed regression on a currently supported versionplatform/macosmacOS / Mac Catalysts/triagedIssue has been reviewedt/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions