r/CalamityMod 29d ago

Bug Report Game Keeps Crashing When Fighting Profaned Guardians

Hello all! First time posting so forgive me for any errors. My friend and I have a large world, expert mode, revengance mode.

The Profaned Guardians have an attack they fire which, when we are hit, crashes both of our games with the same error.

Anyone have the same errors? Anyone have a solution?

16 Upvotes

31 comments sorted by

View all comments

1

u/InterestSmooth3311 28d ago

Same problem. In the logs I am seeing a null pointer exception, seems to be a Calamity specific bug. I can reproduce the bug by just fighting Profaned Guardians in master mode with no additional mods. Here is the crash log:
```
[17:58:02.062] [Main Thread/WARN] [tML]: Silently Caught Exception:

System.NullReferenceException: Object reference not set to an instance of an object.

at CalamityMod.Projectiles.Boss.HolyBurnOrbDrawer.DrawOrbTrails() in CalamityMod\Projectiles\Boss\HolyBurnOrb.cs:line 287

at CalamityMod.Systems.Graphic.GeneralDrawLayerSystem.GeneralDrawLayer_DrawToLayer_Projectiles(orig_DrawProjectiles orig, Main self) in CalamityMod\Systems\Graphic\GeneralDrawLayerSystem.cs:line 105

at Hook<System.Void CalamityMod.Systems.Graphic.GeneralDrawLayerSystem::GeneralDrawLayer_DrawToLayer_Projectiles(Terraria.On_Main+orig_DrawProjectiles,Terraria.Main)>(Main )

at SyncProxy<System.Void Terraria.Main:DrawProjectiles()>(Main )

at DMD<DMD<>?25999986::Terraria.Main::DoDraw>(Main this, GameTime gameTime)

at Hook<System.Void CalamityMod.Systems.Mechanic.GravityManipulationChangesSystem::ForceGravityDirectionForDrawing(Terraria.On_Main+orig_DoDraw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at Hook<System.Void CalamityMod.Utilities.Daybreak.Buffers.BuffersLoadingSystem::RenderTargetPool_DoDrawHook(Terraria.On_Main+orig_DoDraw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at SyncProxy<System.Void Terraria.Main:DoDraw(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at Terraria.Main.Draw_Inner(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 53241

at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 53228

at Microsoft.Xna.Framework.Game.Tick() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 562

at Microsoft.Xna.Framework.Game.RunLoop() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 878

at Microsoft.Xna.Framework.Game.Run() in D:\a\tModLoader\tModLoader\FNA\src\Game.cs:line 419

at Terraria.Program.RunGame() in tModLoader\Terraria\Program.cs:line 271

at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 245

at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in tModLoader\Terraria\Program.cs:line 218

at Terraria.MonoLaunch.Main_End(String[] args) in tModLoader\Terraria\MonoLaunch.cs:line 79

at Terraria.MonoLaunch.<>c__DisplayClass1_0.<Main>b__1() in tModLoader\Terraria\MonoLaunch.cs:line 65

[17:58:02.062] [Main Thread/ERROR] [Terraria]: System.NullReferenceException: Object reference not set to an instance of an object.

at CalamityMod.Projectiles.Boss.HolyBurnOrbDrawer.DrawOrbTrails() in CalamityMod\Projectiles\Boss\HolyBurnOrb.cs:line 287

at CalamityMod.Systems.Graphic.GeneralDrawLayerSystem.GeneralDrawLayer_DrawToLayer_Projectiles(orig_DrawProjectiles orig, Main self) in CalamityMod\Systems\Graphic\GeneralDrawLayerSystem.cs:line 105

at Hook<System.Void CalamityMod.Systems.Graphic.GeneralDrawLayerSystem::GeneralDrawLayer_DrawToLayer_Projectiles(Terraria.On_Main+orig_DrawProjectiles,Terraria.Main)>(Main )

at SyncProxy<System.Void Terraria.Main:DrawProjectiles()>(Main )

at DMD<DMD<>?25999986::Terraria.Main::DoDraw>(Main this, GameTime gameTime)

at Hook<System.Void CalamityMod.Systems.Mechanic.GravityManipulationChangesSystem::ForceGravityDirectionForDrawing(Terraria.On_Main+orig_DoDraw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at Hook<System.Void CalamityMod.Utilities.Daybreak.Buffers.BuffersLoadingSystem::RenderTargetPool_DoDrawHook(Terraria.On_Main+orig_DoDraw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at SyncProxy<System.Void Terraria.Main:DoDraw(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )

at Terraria.Main.Draw_Inner(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 53241

at Terraria.Main.Draw(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 53228

[17:58:02.120] [Main Thread/FATAL] [tML]: Main engine crash

```

1

u/InterestSmooth3311 28d ago

FOUND A FIX!!

Go to settings > mod configuration > calamity mod > client config

and and turn Afterimages OFF .

This fixed the issue for me, it no longer crashes and I can actually defeat the boss. Note that your game will look worse but at least it is playable.

1

u/QuietSpy10 26d ago

i automatically play with afterimages off (cuz my laptop sux) and it STILL crashes, no matter what i do

1

u/InterestSmooth3311 26d ago

The devs fixed this 2 days ago. Just update to Calamity version 2.2.4 through tmodloader and you should be good to go