njthomson / SrvSurvey

A new to help Commanders in planet based opperations
GNU General Public License v3.0
38 stars 1 forks source link

InvalidOperationException "Sequence contains no matching element" at 8/31/2024 11:37:14 PM -05:00 #118

Closed chard1484 closed 2 months ago

chard1484 commented 2 months ago

What happened?

get an error message upon opening ui. tried older versions several times and nothing, cleared logs same thing

Version

1.1.3.118

Exception message

Sequence contains no matching element

Exception stack

at System.Linq.ThrowHelper.ThrowNoMatchException() at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at BioCriterias.BioPredictor.predict(SystemBody body) at SrvSurvey.game.SystemBody.predictSpecies() at SrvSurvey.game.SystemData.Load(String systemName, Int64 systemAddress, String fid) at SrvSurvey.game.SystemData.From(ISystemDataStarter entry, String fid, String cmdrName) at SrvSurvey.game.Game.<>cDisplayClass119_0.b__0(JournalEntry entry) at SrvSurvey.JournalFile.walk(Int32 index, Boolean searchUp, Func2 func) at SrvSurvey.JournalFile.walkDeep(Int32 index, Boolean searchUp, Func2 func, Func`2 finishWhen) at SrvSurvey.game.Game.initSystemData() at SrvSurvey.game.Game.initializeFromJournal(LoadGame loadEntry) at SrvSurvey.game.Game..ctor(String cmdr) at SrvSurvey.Main.newGame() at SrvSurvey.Main.b11_9() at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() --- End of stack trace from previous location --- at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at System.Windows.Forms.Control.Invoke(Action method) at SrvSurvey.Main.b__11_2()

Relevant log output

System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at BioCriterias.BioPredictor.predict(SystemBody body)
   at SrvSurvey.game.SystemBody.predictSpecies()
   at SrvSurvey.game.SystemData.Load(String systemName, Int64 systemAddress, String fid)
   at SrvSurvey.game.SystemData.From(ISystemDataStarter entry, String fid, String cmdrName)
   at SrvSurvey.game.Game.<>c__DisplayClass119_0.<initSystemData>b__0(JournalEntry entry)
   at SrvSurvey.JournalFile.walk(Int32 index, Boolean searchUp, Func`2 func)
   at SrvSurvey.JournalFile.walkDeep(Int32 index, Boolean searchUp, Func`2 func, Func`2 finishWhen)
   at SrvSurvey.game.Game.initSystemData()
   at SrvSurvey.game.Game.initializeFromJournal(LoadGame loadEntry)
   at SrvSurvey.game.Game..ctor(String cmdr)
   at SrvSurvey.Main.newGame()
   at SrvSurvey.Main.<Main_Load>b__11_9()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
--- End of stack trace from previous location ---
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at System.Windows.Forms.Control.Invoke(Action method)
   at SrvSurvey.Main.<Main_Load>b__11_2()
njthomson commented 2 months ago

Thank you @chard1484 for reporting this. Would you mind trying the latest build?

https://github.com/njthomson/SrvSurvey/releases/tag/1.1.3.120

njthomson commented 2 months ago

The nature of this failure is due to incomplete data about the system. I've seen things like this previously when the quality of data downloaded from EDSM/Spansh was weird.

@chard1484 - what system were you in at the time? Had you DSS'd the whole system yourself?

njthomson commented 2 months ago

This should be fixed in build .123: https://github.com/njthomson/SrvSurvey/releases/

njthomson commented 2 months ago

@chard1484 - please let me know if this happens again.