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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using advanced search #444

Open
ricardograca opened this issue Jul 27, 2024 · 0 comments
Open

Crash when using advanced search #444

ricardograca opened this issue Jul 27, 2024 · 0 comments

Comments

@ricardograca
Copy link

Whenever any character is added to an empty advanced search string the app crashes.

Steps to reproduce

  1. Open Tagger
  2. Open a music folder
  3. Type !artist="" in the search input
  4. Type any character inside the ""

Alternative steps to reproduce

  1. Open Tagger
  2. Open a music folder
  3. Type !artist=" in the search input
  4. Type a search term after "
  5. Add " after the search term
  6. The app should filter correctly until this point
  7. Position the cursor after the last character of the search term, before the closing "
  8. Tap the Backspace key a few times

Expected results

The list is filtered according to the typed string.

Actual results

The app crashes.

Stack trace

UnhandledException - unhandled exception: System.ArgumentException: An item with the same key has already been added. Key: 01 - sin deep my wicked angel.flac
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at NickvisionTagger.Shared.Controllers.MainWindowController.AdvancedSearch(String s) in /build/tagger/parts/tagger/src/NickvisionTagger.Shared/Controllers/MainWindowController.cs:line 1567
   at NickvisionTagger.GNOME.Views.MainWindow.SearchChanged(SearchEntry sender, EventArgs e) in /build/tagger/parts/tagger/src/NickvisionTagger.GNOME/Views/MainWindow.cs:line 1657
   at GObject.Signal`1.<>c__DisplayClass11_0.<Connect>b__0(Value returnValue, Value[] parameters)
   at GObject.Closure.InternalCallback(IntPtr closure, IntPtr returnValuePtr, UInt32 nParamValues, IntPtr paramValuesData, IntPtr invocationHint, IntPtr userData)

System info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant