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

Collection was modified; enumeration operation may not execute #1

Open
MaksDragon opened this issue Feb 21, 2022 · 2 comments
Open
Labels
not patched by tshock This isn't patched by TShock. reported to re-logic We know Re-Logic is aware of this.

Comments

@MaksDragon
Copy link

Server is working, all was good. But one time map was save and i receive this error:
2022-02-21 21:23:03 - TShock: ERROR: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Dictionary`2+Enumerator[TKey,TValue].MoveNext () [0x00016] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at Terraria.GameContent.Bestiary.NPCKillsTracker.Save (System.IO.BinaryWriter writer) [0x00052] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.GameContent.Bestiary.BestiaryUnlocksTracker.Save (System.IO.BinaryWriter writer) [0x00000] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.SaveBestiary (System.IO.BinaryWriter writer) [0x00000] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.SaveWorld_Version2 (System.IO.BinaryWriter writer) [0x00059] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.InternalSaveWorld (System.Boolean useCloudSaving, System.Boolean resetTime) [0x00055] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile+<>c__DisplayClass57_0.b__0 () [0x00000] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.Utilities.FileUtilities.ProtectedInvoke (System.Action action) [0x00016] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.SaveWorldDirect (System.Boolean useCloudSaving, System.Boolean resetTime) [0x00066] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.SaveWorld (System.Boolean useCloudSaving, System.Boolean resetTime) [0x00010] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.IO.WorldFile.SaveWorld () [0x00017] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at Terraria.WorldGen.saveAndPlayCallBack (System.Object threadContext) [0x00000] in <73ea76c09c3448288ab9a2ad67c342aa>:0
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000e] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x0002a] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00096] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0
2022-02-21 21:23:03 - Utils: INFO: Broadcast: Saving world...
2022-02-21 21:23:08 - Utils: INFO: Broadcast: World saved.

How i can fix that?

@hakusaro hakusaro transferred this issue from Pryaxis/TShock Mar 7, 2022
@hakusaro hakusaro added not patched by tshock This isn't patched by TShock. not patched by tmodloader reported to re-logic We know Re-Logic is aware of this. labels Mar 7, 2022
@hakusaro
Copy link
Member

hakusaro commented Mar 7, 2022

@MaksDragon fyi, we moved this to our new Terraria issue tracker. Re-Logic knows about this, but I don't know if they've patched it yet (cc @SignatureBeef).

@Kojirremer
Copy link

I've encountered that crash a noticeable amount of times in the past. I've yet to see it after the recent updates, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not patched by tshock This isn't patched by TShock. reported to re-logic We know Re-Logic is aware of this.
Projects
None yet
Development

No branches or pull requests

3 participants