Random crash, log mentions several mods but cause is unclear

I crashed to desktop shortly after starting a new run. Tried again, same thing. The first couple times, the only thing the log showed before the crash was a sudden spike in RAM usage, but the last couple times it actually reported something:
[17:18:01.040] [Main Thread/WARN] [tML]: Silently Caught Exception:
System.DivideByZeroException: Attempted to divide by zero.
at DMD<System.Void Terraria.Main:DrawInterface_Resources_Breath()>()
at Origins.Origins.FixedDrawBreath(orig_DrawInterface_Resources_Breath orig)
at Hook<System.Void Origins.Origins::FixedDrawBreath(Terraria.On_Main+orig_DrawInterface_Resources_Breath)>()
at SyncProxy<System.Void Terraria.Main:DrawInterface_Resources_Breath()>()
at Terraria.Main.GUIBarsDrawInner()
at Terraria.Main.GUIBarsDraw()
at Terraria.Main.<SetupDrawInterfaceLayers>b__1627_22()
at Terraria.UI.GameInterfaceLayer.Draw()
at DMD<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at CalamityFables.Core.VignetteFadeEffects.DrawVignette(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void CalamityFables.Core.VignetteFadeEffects::DrawVignette(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.Core.DrawHooks.Draw_OnInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.Core.DrawHooks::Draw_OnInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.ParticleManager.DrawParticlesBeforeInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.ParticleManager::DrawParticlesBeforeInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SpiritReforged.Common.Visuals.CustomText.SignTagHandler.ResetSignHover(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void SpiritReforged.Common.Visuals.CustomText.SignTagHandler::ResetSignHover(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at Hook<System.Void StructureHelper.Content.GUI.Tooltip::Reset(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at StructureHelper.Content.GUI.UIRenderer.DrawSelection(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void StructureHelper.Content.GUI.UIRenderer::DrawSelection(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at DMD<DMD<>?28116572::Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Hook<System.Void FancyLighting.FancyLightingMod::_Main_DoDraw(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)
at DMD<System.Void Terraria.Main:Draw(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at Hook<System.Void MrPlagueRaces.Common.Systems.UIRedirectionSystem::InterceptCharacterCreationMenu(Terraria.On_Main+orig_Draw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:Draw(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()
[17:18:01.040] [Main Thread/WARN] [tML]: Silently Caught Exception:
System.DivideByZeroException: Attempted to divide by zero.
at DMD<System.Void Terraria.Main:DrawInterface_Resources_Breath()>()
at Origins.Origins.FixedDrawBreath(orig_DrawInterface_Resources_Breath orig)
at Hook<System.Void Origins.Origins::FixedDrawBreath(Terraria.On_Main+orig_DrawInterface_Resources_Breath)>()
at SyncProxy<System.Void Terraria.Main:DrawInterface_Resources_Breath()>()
at Terraria.Main.GUIBarsDrawInner()
at Terraria.Main.GUIBarsDraw()
at Terraria.Main.<SetupDrawInterfaceLayers>b__1627_22()
at Terraria.UI.GameInterfaceLayer.Draw()
at DMD<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at CalamityFables.Core.VignetteFadeEffects.DrawVignette(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void CalamityFables.Core.VignetteFadeEffects::DrawVignette(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.Core.DrawHooks.Draw_OnInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.Core.DrawHooks::Draw_OnInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.ParticleManager.DrawParticlesBeforeInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.ParticleManager::DrawParticlesBeforeInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SpiritReforged.Common.Visuals.CustomText.SignTagHandler.ResetSignHover(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void SpiritReforged.Common.Visuals.CustomText.SignTagHandler::ResetSignHover(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at Hook<System.Void StructureHelper.Content.GUI.Tooltip::Reset(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at StructureHelper.Content.GUI.UIRenderer.DrawSelection(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void StructureHelper.Content.GUI.UIRenderer::DrawSelection(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at DMD<DMD<>?28116572::Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Hook<System.Void FancyLighting.FancyLightingMod::_Main_DoDraw(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)
at DMD<System.Void Terraria.Main:Draw(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at Hook<System.Void MrPlagueRaces.Common.Systems.UIRedirectionSystem::InterceptCharacterCreationMenu(Terraria.On_Main+orig_Draw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:Draw(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()
11 Replies
Rijam
Rijam3mo ago
.mod Origins
tModLoader
tModLoader3mo ago
Requested by rijam#0000
Mod: Terraria Origins (Origins) 0.5.0.8
Downloads
30,380
Views
101,917
Favorites
2,660
Votes
★★★★★
Upvotes
597
Downvotes
13
Mod Side
Both
tModLoader Version
2025.4.3.0
Last updated
<t:1749244943:d>
Time created
<t:1733078030:d>
Tags
New Content, Utilities, World Gen, English, Both, 1.4.4
Rijam
Rijam3mo ago
This mod keeps dividing by zero in the client.log The Natives.log shows a sound/tile error (stack overflow) but I don't really know which mod caused it.
Agent Kirin
Agent KirinOP3mo ago
Yeah, I tried to play a few times in the same session The first line after the divide-by-zero error says at DMD<System.Void Terraria.Main:DrawInterface_Resources_Breath()>()... Which sounds like it's dividing by zero while trying to draw the breath meter? Doesn't make much sense, though, since the crashes occur whether I'm in water or not Disabled Origins, started a fresh world, and still got a crash. Same DrawInterface.Resources.Breath point of failure, too.
System.DivideByZeroException: Attempted to divide by zero.
at Terraria.Main.DrawInterface_Resources_Breath() in tModLoader\Terraria\Main.cs:line 37056
at Terraria.Main.GUIBarsDrawInner() in tModLoader\Terraria\Main.cs:line 36759
at Terraria.Main.GUIBarsDraw() in tModLoader\Terraria\Main.cs:line 36742
at Terraria.Main.DrawInterface_25_ResourceBars() in tModLoader\Terraria\Main.cs:line 38845
at Terraria.Main.<SetupDrawInterfaceLayers>b__1627_22() in tModLoader\Terraria\Main.cs:line 38171
at Terraria.UI.LegacyGameInterfaceLayer.DrawSelf() in tModLoader\Terraria\UI\LegacyGameInterfaceLayer.cs:line 13
at Terraria.UI.GameInterfaceLayer.Draw() in tModLoader\Terraria\UI\GameInterfaceLayer.cs:line 45
at DMD<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at CalamityFables.Core.VignetteFadeEffects.DrawVignette(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void CalamityFables.Core.VignetteFadeEffects::DrawVignette(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.Core.DrawHooks.Draw_OnInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.Core.DrawHooks::Draw_OnInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.ParticleManager.DrawParticlesBeforeInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.ParticleManager::DrawParticlesBeforeInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SpiritReforged.Common.Visuals.CustomText.SignTagHandler.ResetSignHover(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void SpiritReforged.Common.Visuals.CustomText.SignTagHandler::ResetSignHover(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at Hook<System.Void StructureHelper.Content.GUI.Tooltip::Reset(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at StructureHelper.Content.GUI.UIRenderer.DrawSelection(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void StructureHelper.Content.GUI.UIRenderer::DrawSelection(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at DMD<DMD<>?7993881::Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Hook<System.Void FancyLighting.FancyLightingMod::_Main_DoDraw(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)
at DMD<System.Void Terraria.Main:Draw(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at Hook<System.Void MrPlagueRaces.Common.Systems.UIRedirectionSystem::InterceptCharacterCreationMenu(Terraria.On_Main+orig_Draw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:Draw(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()
System.DivideByZeroException: Attempted to divide by zero.
at Terraria.Main.DrawInterface_Resources_Breath() in tModLoader\Terraria\Main.cs:line 37056
at Terraria.Main.GUIBarsDrawInner() in tModLoader\Terraria\Main.cs:line 36759
at Terraria.Main.GUIBarsDraw() in tModLoader\Terraria\Main.cs:line 36742
at Terraria.Main.DrawInterface_25_ResourceBars() in tModLoader\Terraria\Main.cs:line 38845
at Terraria.Main.<SetupDrawInterfaceLayers>b__1627_22() in tModLoader\Terraria\Main.cs:line 38171
at Terraria.UI.LegacyGameInterfaceLayer.DrawSelf() in tModLoader\Terraria\UI\LegacyGameInterfaceLayer.cs:line 13
at Terraria.UI.GameInterfaceLayer.Draw() in tModLoader\Terraria\UI\GameInterfaceLayer.cs:line 45
at DMD<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at CalamityFables.Core.VignetteFadeEffects.DrawVignette(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void CalamityFables.Core.VignetteFadeEffects::DrawVignette(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.Core.DrawHooks.Draw_OnInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.Core.DrawHooks::Draw_OnInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at ParticleLibrary.ParticleManager.DrawParticlesBeforeInterface(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void ParticleLibrary.ParticleManager::DrawParticlesBeforeInterface(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SpiritReforged.Common.Visuals.CustomText.SignTagHandler.ResetSignHover(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void SpiritReforged.Common.Visuals.CustomText.SignTagHandler::ResetSignHover(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at Hook<System.Void StructureHelper.Content.GUI.Tooltip::Reset(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at StructureHelper.Content.GUI.UIRenderer.DrawSelection(orig_DrawInterface orig, Main self, GameTime gameTime)
at Hook<System.Void StructureHelper.Content.GUI.UIRenderer::DrawSelection(Terraria.On_Main+orig_DrawInterface,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:DrawInterface(Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at DMD<DMD<>?7993881::Terraria.Main::DoDraw>(Main this, GameTime gameTime)
at Hook<System.Void FancyLighting.FancyLightingMod::_Main_DoDraw(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)
at DMD<System.Void Terraria.Main:Draw(Microsoft.Xna.Framework.GameTime)>(Main this, GameTime gameTime)
at Hook<System.Void MrPlagueRaces.Common.Systems.UIRedirectionSystem::InterceptCharacterCreationMenu(Terraria.On_Main+orig_Draw,Terraria.Main,Microsoft.Xna.Framework.GameTime)>(Main , GameTime )
at SyncProxy<System.Void Terraria.Main:Draw(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()
Agent Kirin
Agent KirinOP3mo ago
Same point of failure, too, looks like it's crashing trying to draw the breath meter
Agent Kirin
Agent KirinOP3mo ago
Spirit Reforged is the next one to try without and I really hope that's not it because I really like SR Then again, if it's not SR, Structure Helper is the only other mod mentioned in the error oh wait, MrPlague's Authentic Races was also in there somewhere, I think I REALLY hope it's not that one
Agent Kirin
Agent KirinOP3mo ago
It probably is MPAR, but imma do one more test without it to make sure it's not TML

Did you find this page helpful?