You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Cannot access a disposed object" after clicking image in [inferencer] gallery panel #1367
Drag-and-drop image from the gallery (right side of inferencer) into the prompt window:
025-08-31 01:31:20.7650|INFO|StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase|Loading image metadata from LocalImageFile at '"/mnt/M9200/SM/Data/Images/Inference/lustifySDXLNSFW_oltFIXEDTEXTURES-DPM++ 2M SDE Karras-1392122868-00-57-05.png"'
2025-08-31 01:31:20.7650|INFO|StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase|Loading Project State (Type: "InferenceTextToImageViewModel")
2025-08-31 01:31:20.7695|WARN|StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase|Failed to load image from context drop|System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.ViewModels.Inference.StackViewModelBase.LoadStateFromJsonObject(JsonObject state)
at StabilityMatrix.Avalonia.ViewModels.Base.LoadableViewModelBase.LoadStateFromJsonObject(JsonObject state)
at Avalonia.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at Avalonia.Threading.Dispatcher.Invoke(Action callback)
at StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase.LoadImageMetadata(String imageFilePath, ValueTuple`5 metadata)
at StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase.LoadImageMetadata(LocalImageFile localImageFile)
at StabilityMatrix.Avalonia.ViewModels.Base.InferenceTabViewModelBase.<>c__DisplayClass30_0.<Drop>b__0()
Seems to happen at random. I can tell it's about to happen when I flip to an existing generation tab and the model (checkpoint) selector is blank.
Note the .PNG generation appears to be fine (i.e. no metadata corruption). Drag-and-drop of said image works if I restart SM.
2025-09-02 20:07:46.5540|DEBUG|StabilityMatrix.Avalonia.Services.InferenceClientManager|Model index changed, reloading shared properties for Inference
2025-09-02 20:07:46.6364|INFO|StabilityMatrix.Core.Services.ModelIndexService|Loaded 12 models from database in 383.47ms
I'd just deleted a checkpoint (not the one I was using at the time).
I'm NOT messing with any models tonight and still getting this when clicking on an image in the inferencer gallery.
2025-09-09 23:47:13.7331|WARN|StabilityMatrix.Avalonia.Program|Unhandled "ObjectDisposedException": "Cannot access a disposed object.
Object name: 'IServiceProvider'."|System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)
Still present in 2.15.2. Can't zero-in on what [sequence of] actions causes this. This time I clicked on a photo in the inferencer's gallery (vertical scroll list on the right).
## Exception
```ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.```
### Sentry ID
[`7ba6c849`](https://stability-matrix.sentry.io/issues/?query=id%3A7ba6c8490f974e53be8d9023f431de1e&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)```
## Exception
```ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.```
### Sentry ID
[`7be9e969`](https://stability-matrix.sentry.io/issues/?query=id%3A7be9e96910454567b93fd678c1be6fe1&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)```
## Exception
```ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.```
### Sentry ID
[`96e3a002`](https://stability-matrix.sentry.io/issues/?query=id%3A96e3a002082d4f16b5063d184b7a17d9&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.X11.X11PlatformThreading.CheckSignaled()
at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)```
changed the title [-]"Cannot access a disposed object" after image drag-and-drop[/-][+]"Cannot access a disposed object" after clicking image in [inferencer] gallery panel[/+]on Dec 17, 2025
Issue still present. Attached a screenshot to show the state when the error occurs. What I did what triggered it: Tried dragging the top item on the inference gallery tab to Img2Img. It's clearly there in the inference folder.
## Exception
```ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.```
### Sentry ID
[`868e4432`](https://stability-matrix.sentry.io/issues/?query=id%3A868e44327d214c759e9cef0a860f49a2&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
at Avalonia.Threading.DispatcherOperation.Execute()
at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
at Avalonia.Threading.Dispatcher.Signaled()
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at StabilityMatrix.Avalonia.Program.Main(String[] args)```
This was from simply clicking an image in the Galley panel (inferencing page). v2.16.0-pre.1
The good news is it seems the "Continue" button will indeed let me continue.
## Exception
```ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.```
### Sentry ID
[`213d7346`](https://stability-matrix.sentry.io/issues/?query=id%3A213d7346256f4eaf8cdd39157472b815&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()```
Still present unfortunatly. But continue does work thankfully.
Exception
Object name: 'IServiceProvider'.```
### Sentry ID
[`c386aa22`](https://stability-matrix.sentry.io/issues/?query=id%3Ac386aa224ca24062935e8b97c8f01148&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
``` at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get(Type serviceType)
at StabilityMatrix.Avalonia.Services.ScopedServiceManager`1.Get[TService]()
at StabilityMatrix.Avalonia.ViewModels.Inference.ImageFolderCardViewModel.OnImageClick(LocalImageFile item)
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()```
Activity
richardm1 commentedon Sep 3, 2025
I think I've tracked it down.
I'd just deleted a checkpoint (not the one I was using at the time).
richardm1 commentedon Sep 10, 2025
I'm NOT messing with any models tonight and still getting this when clicking on an image in the inferencer gallery.
richardm1 commentedon Oct 16, 2025
Still present in 2.15.2. Can't zero-in on what [sequence of] actions causes this. This time I clicked on a photo in the inferencer's gallery (vertical scroll list on the right).
richardm1 commentedon Oct 21, 2025
Still present in 2.15.3.
richardm1 commentedon Dec 17, 2025
2.15.4 (still on Linux):
[-]"Cannot access a disposed object" after image drag-and-drop[/-][+]"Cannot access a disposed object" after clicking image in [inferencer] gallery panel[/+]Pekururu commentedon Jan 3, 2026
Issue still present. Attached a screenshot to show the state when the error occurs. What I did what triggered it: Tried dragging the top item on the inference gallery tab to Img2Img. It's clearly there in the inference folder.
github-actions commentedon Mar 5, 2026
This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.
richardm1 commentedon Mar 7, 2026
Please un-stale. Still seeing this on 2.16.0-dev.2 on Linux.
github-actions commentedon May 6, 2026
This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.
Pekururu commentedon May 6, 2026
Still present. See attached logzip.
stabilitymatrix-log-2026-05-07-00-52-00.zip
richardm1 commentedon Jun 2, 2026
This was from simply clicking an image in the Galley panel (inferencing page). v2.16.0-pre.1
The good news is it seems the "Continue" button will indeed let me continue.
Pekururu commentedon Jun 22, 2026
Still present unfortunatly. But continue does work thankfully.
Exception
github-actions commentedon Aug 22, 2026
This issue is stale because it has been open 60 days with no activity. Remove the stale label or comment, else this will be closed in 7 days.
Merge pull request LykosAI#1367 from ionite34/changelog/downmerge-com…
github-actions commentedon Aug 30, 2026
This issue was closed because it has been stale for 7 days with no activity.