Skip to content

Inconsistent sorting in ExtendedStringComparer leads to crash #256

@Ronin22222

Description

@Ronin22222

Every time I click on the Library at the top of Comicrack, the program crashes. I'm given the option to try to resume or restart. Restart just closes the program. Resume gets me back into the program, but nothing is displayed on the right side where the books are supposed to be listed

Additional context
I first noticed this crashing issue when I made a smart list that shows books with series that 1) start with a space 2) end with a space and 3) have double spaces in the series name so I can clean them to group series properly for easier scraping. I usually don't go to the main library because my collection is large at the moment while I organize it and clean up junk files, but when I did today, the problem is the same and seems to be the source of the issue. I apologize for trimming the crash dump, but github wouldn't let me post it because of the length

If you have a crash dump paste it between ```

Crash dump

Application: ComicRack Community Edition
Version    : 0.9.184
Assembly   : 1.0.9616.33184
OS         : Microsoft Windows NT 10.0.26200.0 64
.NET       : 4.0.30319.42000
Processors : 24
Workingset : 2.08 GB
THREADEXCEPTION
--------------------
ArgumentException
Void ThrowOrIgnoreBadComparer(System.Object)
Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'cYo.Common.Text.ExtendedStringComparer'.
   at System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(Object comparer)
   at System.Collections.Generic.GenericArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)
   at cYo.Projects.ComicRack.Engine.Controls.SearchBrowserControl.BuildList(Int32 start)
   at cYo.Projects.ComicRack.Engine.Controls.SearchBrowserControl.HandleSelectionChange(ListView lv)
   at System.Windows.Forms.ListView.OnItemSelectionChanged(ListViewItemSelectionChangedEventArgs e)
   at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
   at System.Windows.Forms.ListView.WndProc(Message& m)
   at cYo.Common.Windows.Forms.ListViewEx.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

--------------------
Report generated at: 5/13/2026 9:26:39 PM


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions