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

The orbit analyser throws exceptions in some situations where the orbit is not gravitationally bound #3272

Closed
eggrobin opened this issue Jan 3, 2022 · 0 comments · Fixed by #3888

Comments

@eggrobin
Copy link
Member

eggrobin commented Jan 3, 2022

Reported by @al2me6 with the C# stack below. It sounds like the primary is null, and that this breaks the celestial strings; probably introduced in either Haar (with celestial strings) or Hamilton (with the localization cache).

[EXC 15:04:45.373] ArgumentNullException: Value cannot be null.
Parameter name: key
    System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    principia.ksp_plugin_adapter.L10N.Name (CelestialBody body) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    principia.ksp_plugin_adapter.L10N+<>c.<CelestialString>b__15_0 (CelestialBody body) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    System.Linq.Enumerable+<SelectManyIterator>d__167`3[TSource,TCollection,TResult].MoveNext () (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    System.Collections.Generic.SparseArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    System.Collections.Generic.SparseArrayBuilder`1[T].ReserveOrAdd (System.Collections.Generic.IEnumerable`1[T] items) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    System.Linq.Enumerable+Concat2Iterator`1[TSource].ToArray () (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    principia.ksp_plugin_adapter.L10N.CelestialString (System.String template, CelestialBody[] bodies, System.Object[] args) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    principia.ksp_plugin_adapter.OrbitAnalyser.RenderOrbitalElements (System.Nullable`1[T] elements, CelestialBody primary) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    principia.ksp_plugin_adapter.OrbitAnalyser.RenderWindow (System.Int32 window_id) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    principia.ksp_plugin_adapter.BaseWindowRenderer.RenderWindowAndRecordTooltip (System.Int32 window_id) (at <65c7bf2f4e324461b01170ebbad8bf3b>:0)
    UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <fa6f9762ac624af092525d37c9d516c4>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants