ruarai / CompilePal

A tool to assist in the compiling of source engine maps
GNU General Public License v3.0
224 stars 25 forks source link

Reordering crash #53

Closed Exactol closed 6 years ago

Exactol commented 6 years ago

This one has been eluding me for a while, so I'm opening an issue in case someone else might be able to figure it out.

Steps to reproduce:

Create 2 custom programs with path test1 and test2 test2 should be on the bottom of the order list and test1 should be above it. Drag test1 below test 2. test2 should be above test1 now. Drag test 2 below test 1 and it should crash with:

Exception thrown: 'System.ArgumentException' in mscorlib.dll
An item with the same key has already been added.

My guess is it's something to do with the preset dictionary, but I haven't been able to find where it breaks.

Exactol commented 6 years ago

Turns out the crash is related to overriding the GetHashCode function. The GetHashCode function was never used, so it can be safely removed.