Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "An item with the same key has already been added" #114

Closed
orsinium opened this issue Apr 15, 2022 · 3 comments
Closed

[Bug] "An item with the same key has already been added" #114

orsinium opened this issue Apr 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@orsinium
Copy link

Describe the bug

When trying to open the "Notebooks" tab, Slithin crashes. See the log file at the end of the issue description.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Notebooks'

Expected behavior

The app doesn't crash 馃檭

Screenshots

Inapplicable

Desktop (please complete the following information):

  • OS: Windows 10

Additional context

2022-04-15 09:54:46.780 +02:00 [INF] Downloading 'xochitl.conf'
2022-04-15 09:54:46.885 +02:00 [INF] Initialize Screens
2022-04-15 09:54:46.897 +02:00 [INF] Loading Internal Tools
2022-04-15 09:54:47.025 +02:00 [INF] Checking for Updates
2022-04-15 09:54:47.537 +02:00 [INF] No Update found
2022-04-15 09:54:49.402 +02:00 [INF] Loading Notebooks
2022-04-15 09:54:49.422 +02:00 [INF] System.ArgumentException: An item with the same key has already been added. Key: [0, Avalonia.Controls.Generators.ItemContainerInfo]
   at System.Collections.Generic.TreeSet`1.AddIfNotPresent(T item)
   at System.Collections.Generic.SortedDictionary`2.Add(TKey key, TValue value)
   at Avalonia.Controls.Generators.ItemContainerGenerator.Materialize(Int32 index, Object item) in /_/src/Avalonia.Controls/Generators/ItemContainerGenerator.cs:line 58
   at Avalonia.Controls.Presenters.ItemContainerSync.AddContainers(ItemsPresenterBase owner, Int32 index, IEnumerable items) in /_/src/Avalonia.Controls/Presenters/ItemContainerSync.cs:line 91
   at Avalonia.Controls.Presenters.ItemContainerSync.<ItemsChanged>g__Add|0_0(<>c__DisplayClass0_0& ) in /_/src/Avalonia.Controls/Presenters/ItemContainerSync.cs:line 32
   at Avalonia.Controls.Presenters.ItemContainerSync.ItemsChanged(ItemsPresenterBase owner, IEnumerable items, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Presenters/ItemContainerSync.cs:line 43
   at Avalonia.Controls.Presenters.ItemVirtualizerNone.ItemsChanged(IEnumerable items, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Presenters/ItemVirtualizerNone.cs:line 59
   at Avalonia.Controls.Presenters.ItemsPresenter.ItemsChanged(NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Presenters/ItemsPresenter.cs:line 162
   at Avalonia.Controls.Presenters.ItemsPresenterBase.Avalonia.Controls.Presenters.IItemsPresenter.ItemsChanged(NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Presenters/ItemsPresenterBase.cs:line 159
   at Avalonia.Controls.ItemsControl.ItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/ItemsControl.cs:line 403
   at Avalonia.Controls.Primitives.SelectingItemsControl.ItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs:line 391
   at Avalonia.Controls.ItemsControl.Avalonia.Controls.Utils.ICollectionChangedListener.PostChanged(INotifyCollectionChanged sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Controls/ItemsControl.cs:line 183
   at Avalonia.Controls.Utils.CollectionChangedEventManager.Entry.<Avalonia.Utilities.IWeakEventSubscriber<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.OnEvent>g__Notify|6_0(INotifyCollectionChanged incc, NotifyCollectionChangedEventArgs args, List`1 listeners) in /_/src/Avalonia.Controls/Utils/CollectionChangedEventManager.cs:line 132
   at Avalonia.Controls.Utils.CollectionChangedEventManager.Entry.<>c__DisplayClass6_0.<Avalonia.Utilities.IWeakEventSubscriber<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.OnEvent>b__1() in /_/src/Avalonia.Controls/Utils/CollectionChangedEventManager.cs:line 146
   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 278
   at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
   at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 205
   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 Slithin.Program.Main(String[] args) in D:\a\Slithin\Slithin\Source\Slithin\Program.cs:line 21
@orsinium orsinium added the bug Something isn't working label Apr 15, 2022
@orsinium orsinium changed the title [Bug] [Bug] "An item with the same key has already been added" Apr 15, 2022
@furesoft
Copy link
Owner

furesoft commented Apr 24, 2022

It seems to be fixed on version 1.0.13. Please let me know if it works for you now

@orsinium
Copy link
Author

I faced another issue right at the startup (#149), so I couldn't test it yet. When that bug is resolved, I'll test this one too. Thank you for taking care of it.

@furesoft
Copy link
Owner

Look at the 1.0.14 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants