MountainDrew8 / CalamityMod

Has something in it that does stuff
119 stars 33 forks source link

(Multiplayer Breaking) Null Reference Projectile Item causing massive log dumps #14

Open TaylorElliott opened 2 years ago

TaylorElliott commented 2 years ago

Running through multiplayer server command prompt results in the log error below being spammed(thousands of lines a second) to the point the game is unplayable, players become unable to pick up items etc.

[1/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object. at CalamityMod.CalamityMod.MidUpdateProjectileItem() in CalamityMod.cs:line 439 at Terraria.ModLoader.ModHooks.MidUpdateProjectileItem() at Terraria.Main.DoUpdate(GameTime gameTime) at Terraria.Main.Update(GameTime gameTime)

TaylorElliott commented 2 years ago

Full mod list for reference in case it somehow matters:

  "BossCursor",
  "WeaponOut",
  "VeinMiner",
  "ShopExpander",
  "YABSSM",
  "NoMoreTombs",
  "RecipeBrowser",
  "MaxStackExtra",
  "MagicStorage",
  "ExtensibleInventory",
  "FasterPickaxes",
  "Census",
  "BossChecklist",
  "HamstarHelpers",
  "SmartDoors",
  "AutoTrash",
  "OmniSwing",
  "CalamityMod",
  "AlchemistNPCLite",
  "CalamityModMusic"
TaylorElliott commented 2 years ago

Updating, did some troubleshooting with the people in the discord and it's due to Malice mode in specific. Full writeup copied from discord.

Malice Multiplayer Lag Issue: This only occurs on malice difficulty, multiplayer worlds. [1/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object. at CalamityMod.CalamityMod.MidUpdateProjectileItem() in CalamityMod.cs:line 439 at Terraria.ModLoader.ModHooks.MidUpdateProjectileItem() at Terraria.Main.DoUpdate(GameTime gameTime) at Terraria.Main.Update(GameTime gameTime)

This will spam the logs causing anything that needs to update per game tick lag and desync, sometimes causing the game to become unplayable for periods of time.