njthomson / SrvSurvey

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

InvalidOperationException "Collection was modified; enumeration operation may not execute." at 10/11/2024 23:17:30 +00:00 #146

Open rah99 opened 2 weeks ago

rah99 commented 2 weeks ago

What happened?

Jumping from one system to another.

Version

2.0.2.0

Exception message

Collection was modified; enumeration operation may not execute.

Exception stack

at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) at SrvSurvey.game.Data.Save() at SrvSurvey.game.Game.Journals_onJournalEntry(JournalEntry entry, Int32 index)

Relevant log output

No response

rah99 commented 2 weeks ago

It could have happened before whilst I was doing an FSS, as I noticed the jump tracker overlay did not change so clicked on the app and it pinged, leading to this bug report. Below is the exception that fired the above:

23:00:21: Exception processing event 'Music': System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) at SrvSurvey.game.Data.Save() at SrvSurvey.game.Game.Journals_onJournalEntry(JournalEntry entry, Int32 index)

njthomson commented 2 weeks ago

Thank you @rah99 for reporting this - this has been an elusive bug to solve and there's fresh info above.