bcssov / IronyModManager

Mod Manager for Paradox Games. Official Discord: https://discord.gg/t9JmY8KFrV
https://bcssov.github.io/IronyModManager/
MIT License
343 stars 41 forks source link

SlimConcurrentDictionary thread safety #481

Closed bcssov closed 7 months ago

bcssov commented 7 months ago

It should have been resolved

Unhandled error occurred. Please use this information to file a bug report:

2024-01-21 07:45:36.0546 Version: 1.25.155+9e32dc1236
OS Description: Microsoft Windows 10.0.19045
Runtime Identifier: win10-x64
 ReactiveUI.UnhandledErrorException: An object implementing IHandleObservableErrors (often a ReactiveCommand or ObservableAsPropertyHelper) has errored, thereby breaking its observable pipeline. To prevent this, ensure the pipeline does not error, or Subscribe to the ThrownExceptions property of the object in question to handle the erroneous case.
 ---> CodexMicroORM.Core.CEFInvalidStateException: Bad attempted action. This indicates a possible framework or framework usage issue. (In: Could not find value in dictionary..)
   at CodexMicroORM.Core.Collections.SlimConcurrentDictionary`2.ValueByKey(TKey key)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at CodexMicroORM.Core.Collections.ConcurrentIndexedList`1.GetAllByName(String propName, Object propValue)
   at IronyModManager.Parser.Definitions.IndexedDefinitions.GetByFileAsync(String file) in IronyModManager.Parser\Definitions\IndexedDefinitions.cs:line 374
   at IronyModManager.Services.ModPatchCollectionService.<>c__DisplayClass30_4.<<FindConflictsAsync>b__13>d.MoveNext() in IronyModManager.Services\ModPatchCollectionService.cs:line 549
--- End of stack trace from previous location ---
   at IronyModManager.Services.ModPatchCollectionService.FindConflictsAsync(IIndexedDefinitions indexedDefinitions, IList`1 modOrder, PatchStateMode patchStateMode) in IronyModManager.Services\ModPatchCollectionService.cs:line 599
   at IronyModManager.ViewModels.Controls.ModHolderControlViewModel.<>c__DisplayClass194_0.<<AnalyzeModsAsync>b__3>d.MoveNext() in IronyModManager\ViewModels\Controls\ModHolderControlViewModel.cs:line 652
--- End of stack trace from previous location ---
   at IronyModManager.ViewModels.Controls.ModHolderControlViewModel.AnalyzeModsAsync(Int64 id, PatchStateMode mode, IEnumerable`1 versions) in IronyModManager\ViewModels\Controls\ModHolderControlViewModel.cs:line 647
   at IronyModManager.ViewModels.Controls.ModHolderControlViewModel.<>c__DisplayClass199_0.<<OnActivated>g__runAnalysis|0>d.MoveNext() in IronyModManager\ViewModels\Controls\ModHolderControlViewModel.cs:line 842
   --- End of inner exception stack trace ---
   at ReactiveUI.RxApp.<>c__DisplayClass9_0.<.cctor>b__2()
   at System.Reactive.Concurrency.Scheduler.Invoke(Action action)
   at System.Reactive.Concurrency.Scheduler.<>c.<Schedule>b__74_0(IScheduler _, Action a)
   at Avalonia.Threading.AvaloniaScheduler.Schedule[TState](TState state, TimeSpan dueTime, Func`3 action) in /_/src/Avalonia.Base/Threading/AvaloniaScheduler.cs:line 73
   at System.Reactive.Concurrency.Scheduler.Schedule(IScheduler scheduler, Action action)
   at ReactiveUI.RxApp.<>c.<.cctor>b__9_1(Exception ex)
   at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
   at System.Reactive.ObserveOnObserverNew`1.DrainStep(ConcurrentQueue`1 q)
   at System.Reactive.ObserveOnObserverNew`1.DrainShortRunning(IScheduler recursiveScheduler)
   at Avalonia.Threading.AvaloniaScheduler.<>c__DisplayClass4_1`1.<Schedule>b__1() in /_/src/Avalonia.Base/Threading/AvaloniaScheduler.cs:line 47
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 283
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 217
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
   at IronyModManager.Program.Main(String[] args) in IronyModManager\Program.cs:line 99