Skip to content

Crash when using advanced search #444

@ricardograca

Description

@ricardograca

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions