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

Fix issue where CKAN would crash after installing mods if you are sorting by KSP version. #1866

Closed
wants to merge 3 commits into from

Conversation

Antialiased
Copy link

This was related to mods with ksp_version 'any' in JSON, which is handled differently to mods with no ksp_version field, and the UI code was not knowledgeable about the difference

…l in the list after installing some mods.

This would also cause a crash if you happened to be sorting by ksp
version.
@ayan4m1
Copy link
Contributor

ayan4m1 commented Aug 12, 2016

I can reproduce this on Win10x64, CKAN 1.18.1, sort by "Max KSP Version," select one or more mods with "Any version" as their version string, click Install, after install completes the exception is thrown. The app still works but the DataGrid is unresponsive or throws more exceptions.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.Main.DefaultSorter(DataGridViewRow row)
   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at CKAN.Main._UpdateFilters()
   at CKAN.Util.Invoke[T](T obj, Action action)
   at CKAN.Main._UpdateModsList(Boolean repo_updated)
   at CKAN.Util.Invoke[T](T obj, Action action)
   at CKAN.Main.PostInstallMods(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

@ayan4m1 ayan4m1 added the In progress We're still working on this label Aug 12, 2016
@politas
Copy link
Member

politas commented Aug 12, 2016

@ayan4m1, can you slap a "merge pending" label on this if you think it's good? It looks fine to me, without any way currently to test it.

@ayan4m1
Copy link
Contributor

ayan4m1 commented Aug 14, 2016

I'm working on the proper UI-side fixes for the NRE itself, but I don't think we should be changing any code in the Core module if we can avoid it.

@ayan4m1 ayan4m1 added Bug Something is not working as intended GUI Issues affecting the interactive GUI ★★☆ labels Aug 27, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Aug 29, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Aug 29, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Aug 30, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Aug 30, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Aug 30, 2016
@ayan4m1 ayan4m1 self-assigned this Aug 31, 2016
ayan4m1 added a commit to ayan4m1/CKAN that referenced this pull request Sep 2, 2016
@ayan4m1 ayan4m1 removed ★★☆ In progress We're still working on this labels Sep 2, 2016
@politas politas closed this in c4de884 Sep 2, 2016
@Darbbo
Copy link

Darbbo commented Sep 3, 2016

Still getting this crash:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at CKAN.Main.DefaultSorter(DataGridViewRow row)
   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at CKAN.Main._UpdateFilters()
   at CKAN.Util.Invoke[T](T obj, Action action)
   at CKAN.Main._UpdateModsList(Boolean repo_updated)
   at CKAN.Util.Invoke[T](T obj, Action action)
   at CKAN.Main.PostInstallMods(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

@politas
Copy link
Member

politas commented Sep 3, 2016

A new release will be out soon that fixes it, but we have another bug that needs to be squashed before we can release.

politas added a commit that referenced this pull request Sep 3, 2016
…lling mods if you are sorting by KSP version.
@Darbbo
Copy link

Darbbo commented Sep 9, 2016

Awesome thank you for the quick response. I will await the fix patiently then.

On Saturday, September 3, 2016 12:18 AM, Myk <notifications@github.com> wrote:

A new release will be out soon that fixes it, but we have another bug that needs to be squashed before we can release.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@politas
Copy link
Member

politas commented Sep 9, 2016

@Darbbo, can you test this with CKAN 1.20.0 Yuri? The fix should be there.

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 GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants