ProjectStarlight / StarlightRiver

Starlight River mod
https://discord.gg/snWQ3QE
GNU General Public License v3.0
148 stars 44 forks source link

[Bug] Boss Rush seems to be causing a problem with Devourer from Calamity #747

Closed dualmoon closed 3 months ago

dualmoon commented 3 months ago

Issue Description

Expected behavior: Calamity's Devourer of Gods should spawn normally
Actual behavior: Devourer spawns, then immmediately despawns. The "no longer following you" message shows, and an error is throw in the logs
Error message (if applicable): `System.NullReferenceException: Object reference not set to an instance of an object.`

Log snippet

System.NullReferenceException: Object reference not set to an instance of an object.
   at CalamityMod.NPCs.DevourerofGods.DevourerofGodsHead.AI() in CalamityMod\NPCs\DevourerofGods\DevourerofGodsHead.cs:line 1667
   at Terraria.ModLoader.NPCLoader.AI(NPC npc) in tModLoader\Terraria\ModLoader\NPCLoader.cs:line 311
   at Terraria.ModLoader.NPCLoader.NPCAI(NPC npc) in tModLoader\Terraria\ModLoader\NPCLoader.cs:line 288
   at Terraria.NPC.UpdateNPC_Inner(Int32 i) in tModLoader\Terraria\NPC.cs:line 73637
   at DMD<System.Void Terraria.NPC:UpdateNPC(System.Int32)>(NPC this, Int32 i)
   at Hook<System.Void StarlightRiver.Core.Systems.BossRushSystem.BossRushSystem::DisableWhenDead(Terraria.On_NPC+orig_UpdateNPC,Terraria.NPC,System.Int32)>(NPC , Int32 )
   at SyncProxy<System.Void Terraria.NPC:UpdateNPC(System.Int32)>(NPC , Int32 )
   at DMD<System.Void Terraria.Main:DoUpdateInWorld(System.Diagnostics.Stopwatch)>(Main this, Stopwatch sw)
   at Stellamod.Helpers.ForegroundHelper.On_Main_DoUpdateInWorld(orig_DoUpdateInWorld orig, Main self, Stopwatch sw)
   at Hook<System.Void Stellamod.Helpers.ForegroundHelper::On_Main_DoUpdateInWorld(Terraria.On_Main+orig_DoUpdateInWorld,Terraria.Main,System.Diagnostics.Stopwatch)>(Main , Stopwatch )
   at SyncProxy<System.Void Terraria.Main:DoUpdateInWorld(System.Diagnostics.Stopwatch)>(Main , Stopwatch )
   at DMD<System.Void Terraria.Main:DoUpdate(Microsoft.Xna.Framework.GameTime&)>(Main this, GameTime& gameTime)
   at StarlightRiver.Core.Systems.BlockerTileSystem.BlockerTileSystem.UpdateCollision(orig_DoUpdate orig, Main self, GameTime& gameTime)
   at Hook<System.Void StarlightRiver.Core.Systems.BlockerTileSystem.BlockerTileSystem::UpdateCollision(Terraria.On_Main+orig_DoUpdate,Terraria.Main,Microsoft.Xna.Framework.GameTime&)>(Main , GameTime& )
   at StarlightRiver.Core.Systems.BossRushSystem.BossRushSystem.Speedup(orig_DoUpdate orig, Main self, GameTime& gameTime)
   at Hook<System.Void StarlightRiver.Core.Systems.BossRushSystem.BossRushSystem::Speedup(Terraria.On_Main+orig_DoUpdate,Terraria.Main,Microsoft.Xna.Framework.GameTime&)>(Main , GameTime& )
   at StarlightRiver.Core.Systems.ForegroundSystem.ForegroundHook.ResetForeground(orig_DoUpdate orig, Main self, GameTime& gameTime)
   at Hook<System.Void StarlightRiver.Core.Systems.ForegroundSystem.ForegroundHook::ResetForeground(Terraria.On_Main+orig_DoUpdate,Terraria.Main,Microsoft.Xna.Framework.GameTime&)>(Main , GameTime& )
   at WoTE.Common.MainMenuThemes.MainMenuSkyUpdater.UpdateSky(orig_DoUpdate orig, Main self, GameTime& gameTime)
   at Hook<System.Void WoTE.Common.MainMenuThemes.MainMenuSkyUpdater::UpdateSky(Terraria.On_Main+orig_DoUpdate,Terraria.Main,Microsoft.Xna.Framework.GameTime&)>(Main , GameTime& )
   at SyncProxy<System.Void Terraria.Main:DoUpdate(Microsoft.Xna.Framework.GameTime&)>(Main , GameTime& )
   at DMD<System.Void Terraria.Main:Update(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
   at Hook<System.Void StarlightRiver.Content.GUI.Tooltip::Reset(Terraria.On_Main+orig_Update,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
   at StarlightRiver.Core.Systems.BossRushSystem.BossRushGUIHack.UpdateBossMenu(orig_Update orig, Main self, GameTime gameTime)
   at Hook<System.Void StarlightRiver.Core.Systems.BossRushSystem.BossRushGUIHack::UpdateBossMenu(Terraria.On_Main+orig_Update,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
   at StarlightRiver.Core.Systems.DebugSystem.DoUpdate(orig_Update orig, Main self, GameTime gameTime)
   at Hook<System.Void StarlightRiver.Core.Systems.DebugSystem::DoUpdate(Terraria.On_Main+orig_Update,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
   at SyncProxy<System.Void Terraria.Main:Update(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.RunLoop()
   at Microsoft.Xna.Framework.Game.Run()
   at Terraria.Program.RunGame()
   at Terraria.Program.LaunchGame_(Boolean isServer)
   at Terraria.Program.LaunchGame(String[] args, Boolean
 monoArgs)
   at Terraria.MonoLaunch.Main_End(String[] args)
   at Terraria.MonoLaunch.<>c__DisplayClass1_0.<Main>b__1()

full client.log here

TripleFate commented 3 months ago

did you try to spawn him during the SLR bossrush? that doesn't have a full world its like a tiny arena slice. I wouldn't expect any other bosses to work correctly when spawned during that

dualmoon commented 3 months ago

Nope, for clarification - boss rush was not enabled as far as I know. I went to several areas around the map to try and the results were the same. I hadn't progressed thru SLR at all at that point as I'd been doing progression in other mods.

TripleFate commented 3 months ago

not sure what is indicating SLR bossrush to you. the bossrush hooks do nothing when the player is not in a special bossrush world. it's much more likely to be in the calamity's AI CalamityMod.NPCs.DevourerofGods.DevourerofGodsHead.AI() method. caused by some sort of conflict with SLR or other mods, maybe CalamityOverhaul?

Calamity isn't open source so I'm unable to take a look at the offending line for a better diagnosis. you should post this in calamity's bug reports with your mod list.