System.DivideByZeroException: Attempted to divide by zero.

Mal1661

Terrarian
Hi,

So I started up Terraria this morning and it started in a smaller window than usual. I went to change the resolution and the game crashed, giving me the following error:

System.DivideByZeroException: Attempted to divide by zero.
at Terraria.Main.DrawMenu(GameTime gameTime)
at Terraria.Main.DoDraw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame)
at Microsoft.Xna.Framework.Game.Tick)
at Microsoft.Xna.Framework.GameHost.Idle(Object sender, EventArgs a)
at Microsoft.Xna.Framework.GameHost.OnIdle)
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame)
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(int32 grfIdle)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(intPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run)
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.RunGame()

I have tried uninstalling and reinstalling Terraria and TModLoader. I have also tried uninstalling and reinstalling XNA, but to no avail.

Any help would be appreciated.

Thanks.
 
You can probably resolve this issue for you by deleting your config.json file in /Documents/My Games/Terraria. But beware that this will reset your settings, you can make a backup of the file if you want to look at them for reference.
 
You can probably resolve this issue for you by deleting your config.json file in /Documents/My Games/Terraria. But beware that this will reset your settings, you can make a backup of the file if you want to look at them for reference.
Thanks for the suggestion, I tried but it is still crashing when trying to change the resolution
 
At what exact point does it crash, when entering the resolution settings or when clicking onto the resolution setting itself?
 
At what exact point does it crash, when entering the resolution settings or when clicking onto the resolution setting itself?
On clicking the resolution setting itself
 
Hey @Mal1661, sorry to hear you're having issues.

We're fairly sure we've identified the reason for this crash, and while we can (and will) fix the crash itself, there seems to be an underlying issue with your graphics card. Did you recently update your graphics drivers, or maybe install an OS update?

When you go to the resolution menu, what shows up as the current resolution?
 
Hey @Mal1661, sorry to hear you're having issues.

We're fairly sure we've identified the reason for this crash, and while we can (and will) fix the crash itself, there seems to be an underlying issue with your graphics card. Did you recently update your graphics drivers, or maybe install an OS update?

When you go to the resolution menu, what shows up as the current resolution?
Thanks for your reply. I went ahead and uninstalled my graphics drivers and re-installed them, and that fixed it as you suggested.

Thanks for the help!
 
Thanks for your reply. I went ahead and uninstalled my graphics drivers and re-installed them, and that fixed it as you suggested.

Thanks for the help!
Glad to be of service!

(and may your Powershots land true :) )
 
Back
Top Bottom