LykosAI / StabilityMatrix

Multi-Platform Package Manager for Stable Diffusion
https://lykos.ai
GNU Affero General Public License v3.0
4.84k stars 313 forks source link

Crash in Checkpoint Manager #923

Open 5805test opened 1 month ago

5805test commented 1 month ago

What happened?

Errors occur in the following cases, but errors do not always occur, and sometimes they proceed without problems.

1) When scrolling down browser 2) When running the "Find connected metadata" option. Data reads normally but crashes immediately after completion. 3) When delete the model file.

Exception Details

Exception

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Sentry ID

37005243

Stack Trace


   at Avalonia.Layout.FlowLayoutAlgorithm.Measure(Size availableSize, VirtualizingLayoutContext context, Boolean isWrapping, Double minItemSpacing, Double lineSpacing, Int32 maxItemsPerLine, ScrollOrientation orientation, Boolean disableVirtualization, String layoutId)
   at Avalonia.Layout.UniformGridLayout.MeasureOverride(VirtualizingLayoutContext context, Size availableSize)
   at Avalonia.Controls.ItemsRepeater.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteMeasurePass()
   at Avalonia.Layout.LayoutManager.InnerLayoutPass()
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   at Avalonia.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at Avalonia.Media.MediaContext.RenderCore()
   at Avalonia.Media.MediaContext.Render()
   at Avalonia.Threading.DispatcherOperation.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.Start(String[] args)
   at StabilityMatrix.Avalonia.Program.Main(String[] args)```

### Version

2.12.0

### What Operating System are you using?

Windows
Vik71it commented 1 month ago

It happens to me quite often when drag&dropping Loras and Models from one directory to the other. It happens on v.2.12.2, Windows 10.

This is what is shown:

Exception

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Sentry ID

456be051

Stack Trace


   at Avalonia.Layout.FlowLayoutAlgorithm.Measure(Size availableSize, VirtualizingLayoutContext context, Boolean isWrapping, Double minItemSpacing, Double lineSpacing, Int32 maxItemsPerLine, ScrollOrientation orientation, Boolean disableVirtualization, String layoutId)
   at Avalonia.Controls.ItemsRepeater.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass()
   at Avalonia.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at Avalonia.Media.MediaContext.RenderCore()
   at Avalonia.Media.MediaContext.Render()
   at Avalonia.Threading.DispatcherOperation.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.Start(String[] args)
   at StabilityMatrix.Avalonia.Program.Main(String[] args)```
Ammar-AlDabbagh commented 1 month ago

Similar issue also caused by moving models in checkpoint manager:


## Exception
```IOException: The process cannot access the file because it is being used by another process.```
### Sentry ID
[`9881f777`](https://stability-matrix.sentry.io/issues/?query=id%3A9881f77786d045b58bbb401af8550864&referrer=sm-app-ex&statsPeriod=90d)
### Stack Trace
```   at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.FileInfo.MoveTo(String destFileName, Boolean overwrite)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at StabilityMatrix.Core.Models.FileInterfaces.FilePath.MoveToAsync(FilePath destinationFile)
   at StabilityMatrix.Core.Helper.FileTransfers.MoveFileAsync(FilePath sourceFile, FilePath destinationFile, Boolean overwrite, Boolean overwriteIfHashMatches)
   at StabilityMatrix.Avalonia.ViewModels.CheckpointsPageViewModel.MoveBetweenFolders(LocalModelFile sourceFile, DirectoryPath destinationFolder)
   at StabilityMatrix.Avalonia.ViewModels.CheckpointsPageViewModel.MoveBetweenFolders(LocalModelFile sourceFile, DirectoryPath destinationFolder)
   at StabilityMatrix.Avalonia.Views.CheckpointsPage.OnDrop(Object sender, DragEventArgs e)
   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.Start(String[] args)
   at StabilityMatrix.Avalonia.Program.Main(String[] args)```