tModLoader

tModLoader

W1K's Weapon Scaling
Niektóry 18 May, 2024 @ 10:56am
Crash when starting a multiplayer server
After updating tModLoader to version v2024.3.3.3 I started having crashes when hosting a multiplayer game with my world. The log suggests that this mod causes the problem:

[00:10:13.575] [23/ERROR] [tML]: Unhandled Exception
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at WWeaponScaling.Items.globalItem.SetDefaults(Item item) in WWeaponScaling\Items\globalItem.cs:line 47
at Terraria.ModLoader.Core.GlobalLoaderUtils`2.SetDefaultsBeforeLookupsAreBuilt(TEntity entity, TGlobal[] entityGlobals, Action`1 setModEntityDefaults, InstantiationTime[]& instTimes) in tModLoader\Terraria\ModLoader\Core\GlobalLoaderUtils.cs:line 89
at Terraria.ModLoader.Core.GlobalLoaderUtils`2.SetDefaultsBeforeLookupsAreBuilt(TEntity entity, TGlobal[] entityGlobals, Action`1 setModEntityDefaults) in tModLoader\Terraria\ModLoader\Core\GlobalLoaderUtils.cs:line 63
at Terraria.ModLoader.Core.GlobalLoaderUtils`2.SetDefaults(TEntity entity, TGlobal[]& entityGlobals, Action`1 setModEntityDefaults) in tModLoader\Terraria\ModLoader\Core\GlobalLoaderUtils.cs:line 29
at Terraria.Item.SetDefaults(Int32 Type, Boolean noMatCheck, ItemVariant variant) in tModLoader\Terraria\Item.cs:line 48460
at Terraria.Item..ctor(Int32 setDefaultsToType, Int32 stack, Int32 prefix) in tModLoader\Terraria\Item.cs:line 758
at ImproveGame.Content.Functions.Construction.MaterialCore.<>c.<PostSetupContent>b__25_0() in ImproveGame\Content\Functions\Construction\MaterialCore.cs:line 92
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

Here's an archive with the logs and the world:
https://0x0.st/XPQs.zip
< >
Showing 1-6 of 6 comments
Nappa22428 8 Aug, 2024 @ 9:04pm 
was this ever fixed cause i have the same issue
W1K  [developer] 24 Aug, 2024 @ 11:15am 
Sorry! Wasn't aware of the issue. I can't seem to replicate it however. Is there any particular action that causes the crash?
sorry for the necropost, but i just ran into this error myself word for word, for the first time. for me the issue occurred after i subscribed to the calamity level scaling patch, and attempted to start tmodloader. it did not make it to the menu. as far as i can tell something in that patch doesnt like the Quality of Terraria mod. i personally have no experiance making terraria mods, so all i can do it bring it to attention
Last edited by Yamanagi; 7 Jan @ 7:21pm
W1K  [developer] 7 Jan @ 9:13pm 
Thanks for the extra details, will investigate as soon as I have some time to spare
The same happened with thorium. i also have the quality of terraria mod so it may be the same issue.
W1K  [developer] 8 Apr @ 3:21pm 
Sorry for the long wait, cleaned up some of my atrociously old codes and it should have fixed the hosting issue. Whatever was causing it, it was a combination of calamity and something else. I couldn't manage to replicate the crash however, quality of terraria didn't seem to cause any issues. Hopefully that one got fixed too but just in case lemme know.
< >
Showing 1-6 of 6 comments
Per page: 1530 50