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

Exception at startup, continuing leaves a UI with no mods listed, and most functions don't work. #2134

Closed
jungletek opened this issue Oct 14, 2017 · 3 comments
Assignees

Comments

@jungletek
Copy link

jungletek commented Oct 14, 2017

CKAN Version:
1.22.4
Operating System:
Win7 x64
The issue you are experiencing:
Exception at startup, continuing leaves a UI with no mods listed, and most functions don't work.
How to recreate this issue:
I just upgraded (via the auto-updater, which seemed to DL the new version ok but then ungracefully quit by crashing, BTW) from 1.22.3.
CKAN error codes (if applicable):

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at CKAN.Registry.LatestCompatibleKSP(String identifier)
   at CKAN.GUIMod..ctor(CkanModule mod, IRegistryQuerier registry, KspVersionCriteria currentKspVersion)
   at CKAN.Main.<>c__DisplayClass234_0.<_UpdateModsList>b__2(InstalledModule m)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at CKAN.Main._UpdateModsList(Boolean repo_updated)
   at CKAN.Main.<>c__DisplayClass233_0.<UpdateModsList>b__0()
   at CKAN.Util.Invoke[T](T obj, Action action)
   at CKAN.Main.UpdateModsList(Boolean repo_updated)
   at CKAN.Main.CurrentInstanceUpdated()
   at CKAN.Main.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
ckan
    Assembly Version: 1.22.0.0
    Win32 Version: 1.22.4
    CodeBase: file:///H:/SteamLibrary/SteamApps/common/Kerbal%20Space%20Program/CKAN/ckan.exe
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2053.0 built by: NET47REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Microsoft.GeneratedCode
    Assembly Version: 1.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2053.0 built by: NET47REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.7.2116.0 built by: NET47REL1LAST
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2053.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.2053.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
@jungletek
Copy link
Author

Downgrading to 1.22.3 works as expected, so no DB/settings corruption, FWIW.

@mwerle
Copy link
Contributor

mwerle commented Oct 14, 2017

Also had this crash on upgrade (Windows10 64-bit), but it had installed the new CKAN.exe. Manually restarting the new CKAN.exe then worked (but I had another issue - #2135).

@HebaruSan
Copy link
Member

Need exception handling here.

public KspVersion LatestCompatibleKSP(string identifier)
{
return available_modules[identifier].LatestCompatibleKSP();
}

Didn't catch it in testing because it only happens if one or more mods have been added to the database since the last update. Should have a fix PR up in a bit.

HebaruSan added a commit to HebaruSan/CKAN that referenced this issue Oct 14, 2017
If a mod isn't in the registry, return null instead of raising an
exception when looking for its max KSP version
HebaruSan added a commit to HebaruSan/CKAN that referenced this issue Oct 14, 2017
If a mod isn't in the registry, return null instead of raising an
exception when looking for its max KSP version
@HebaruSan HebaruSan self-assigned this Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants