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

[Bug]: Unhandled exception when adding 'All' to search "Sequence contains no elements" #4244

Open
1 task done
imanairconditioner opened this issue Oct 27, 2024 · 0 comments
Assignees
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI

Comments

@imanairconditioner
Copy link

imanairconditioner commented Oct 27, 2024

Is there an existing issue for this?

  • I have checked the existing issues for an existing issue. I even actually looked at the ones that are pinned to the top!

Operating System

Windows 11 Home 23H2

CKAN Version

v1.35.2.24280

Games

KSP 1, KSP 2

Game Version

Any

Did you make any manual changes to your game folder (i.e., not via CKAN)?

No response

Describe the bug

Holding shift or control when applying the 'all' non-filter causes an unhandled exception.

Steps to reproduce

  1. Load an instance of KSP 1/2 into CKAN
  2. Open 'filters' dropdown menu
  3. Move mouse over 'all' operation
  4. Commence holding shift or control
  5. Click
  6. Unhandled exception
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Aggregate[TSource](IEnumerable`1 source, Func`3 func)
   at CKAN.GUI.EditModSearches.MergeSearches(List`1 searches)
   at CKAN.GUI.ManageMods.<>c__DisplayClass86_1.<Filter>b__1()
   at CKAN.GUI.Util.Invoke[T](T obj, Action action)
   at CKAN.GUI.ManageMods.Filter(SavedSearch search, Boolean merge)
   at CKAN.GUI.ManageMods.FilterAllButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

var merged = searches.Aggregate((search, newSearch) => search.MergedWith(newSearch));

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI labels Oct 27, 2024
@HebaruSan HebaruSan self-assigned this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

No branches or pull requests

2 participants