Skip to content

CKAN crashes when I try to download mods #2422

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

Closed
DutchEllie opened this issue Apr 24, 2018 · 2 comments
Closed

CKAN crashes when I try to download mods #2422

DutchEllie opened this issue Apr 24, 2018 · 2 comments
Assignees
Labels
GUI Issues affecting the interactive GUI

Comments

@DutchEllie
Copy link

DutchEllie commented Apr 24, 2018

v1.25.0 CKAN

1.2.2 ksp

Windows 10

Not made any changes to the folder

Problem

What steps did you take in CKAN?
I did select the mods: Advanced Jet Engine, Airpark Continued, Airplane Plus and all B9 mods. Then applied and pressed continue, then it crashed.

What did you expect to happen?
Download the mods

What happened instead?
It crashed and gave me a message

CKAN error codes (if applicable):

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at CKAN.Main.ShowSelection(Dictionary`2 selectable, Boolean suggest)
   at CKAN.Main.InstallMods(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI labels Apr 24, 2018
@HebaruSan
Copy link
Member

HebaruSan commented Apr 24, 2018

We're modifying selectable while iterating over it:

CKAN/GUI/MainInstall.cs

Lines 333 to 339 in 9e71f86

foreach (var kvp in selectable)
{
if (toInstall.Any(m => m.identifier == kvp.Key.identifier))
{
selectable.Remove(kvp.Key);
}
}

The specific ShowSelection call is for the suggestions.

I'm able to reproduce this with just B9AerospaceHX and B9.

Sorry, something went wrong.

@HebaruSan
Copy link
Member

It's the KJR recommendation/suggestion that's tripping it up. (One mod recommends it, then another suggests it, and the code to avoid showing it twice has a bug.)

While we work on getting this fixed, you might be able to work around the problem by installing KJR separately before attempting the others.

Sorry, something went wrong.

@HebaruSan HebaruSan self-assigned this Apr 24, 2018
@politas politas removed the Bug Something is not working as intended label Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI
Projects
None yet
Development

No branches or pull requests

3 participants