PC Crash before main menu.

Sheynga

Terrarian
Hi guys, i played Terraria for a really long time on Steam without problem. But today i updated it to 1.3.1 and the game won't start anymore. It crash just before the main menu (where you can select "Single player", "Multiplayer" Etc...)

This is the error:
System.BadImageFormatException: Tentativo di caricare un programma con un formato non corretto. (Eccezione da HRESULT: 0x8007000B)
in Microsoft.Xna.Framework.Input.UnsafeNativeMethods.GetState(PlayerIndex playerIndex, XINPUT_STATE& pState)
in Microsoft.Xna.Framework.Input.GamePad.GetState(PlayerIndex playerIndex, GamePadDeadZone deadZoneMode)
in Terraria.GameInput.PlayerInput.GamePadInput()
in Terraria.GameInput.PlayerInput.UpdateInput()
in Terraria.Main.Update(GameTime gameTime)
in Microsoft.Xna.Framework.Game.Tick()
in Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
in Microsoft.Xna.Framework.GameHost.OnIdle()
in Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
in Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
in System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.Run(Form mainForm)
in Microsoft.Xna.Framework.WindowsGameHost.Run()
in Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
in Terraria.Program.LaunchGame(String[] args)

"Tentativo di caricare un programma con un formato non corretto" in english: "Attempting to load a program with an incorrect format".

I already tried this:

1) First try:
- Uninstalled Terraria and deleted the folder in "Steam\steamapps\common\Terraria".
- Deleted the folder "Documents\My Games\Terraria".
- Restarted PC.
- Reinstalled Terraria.
Did not worked.

2) Second try:
- Uninstalled Terraria and deleted the folder in "Steam\steamapps\common\Terraria".
- Deleted the folder "Documents\My Games\Terraria".
- Restarted PC.
- Uninstalled .NET
- Restarted PC.
- Uninstalled XNA
- Restarted PC.
- Downloaded and installed the last version for .NET 4.6.1
- Restarted PC.
- Downloaded and installed the last version for XNA 4.0
- Restarted PC.
- Reinstalled Terraria.
Did not worked.

3) Third try:
- Uninstalled Terraria and deleted the folder in "Steam\steamapps\common\Terraria".
- Deleted the folder "Documents\My Games\Terraria".
- Restarted PC.
- Uninstalled .NET
- Restarted PC.
- Uninstalled XNA
- Restarted PC.
- Reinstalled .NET 4.6.1
- Restarted PC.
- Reinstalled XNA 4.0
- Restarted PC.
- Updated all GPU driver to the last version via: "NVIDIA GeForce Experience".
- Used "Windows Update" to do all the update that i missed in the past days.
- Ofcourse restarted again cause Windows asked me to do it to complete all the update.
- Reinstalled Terraria.
- Changed the "compatibility with Windows XP (SP 3)".
- Runned it as Administrator
Did not worked.

And now i hope that someone can help me cause idk what to do more.
Anyway my PC dettails are:

Windows Version: Microsoft Windows 7 Ultimate Edition 64-bit Service Pack 1
DirectX Version: 11.0
GPU: NVIDIA GeForce GTX 660 ZOTAC 2 GB GDDR5
Motherboard: ASUSTeK COMPUTER INC. H87-PLUS
CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
RAM: 8 GBytes (2x: Corsair 4 GBytes DDR3)

Thanks and sorry for all the spoiler i used but the post was really long.
 
I see XINPUT, do you have a controller connected? Disconnect and try again.
At the moment i dont have any controller plugged in or even installed. I just tried to unplag all the USB now exept for mouse, keyboard, wi-fi adapter and the external HD but nothing changed. Do you may know if this error can have something to do with any .DLL? Cause i had lot of problems with missing .DLL some time ago after formatting the PC.
 
At the moment i dont have any controller plugged in or even installed. I just tried to unplag all the USB now exept for mouse, keyboard, wi-fi adapter and the external HD but nothing changed. Do you may know if this error can have something to do with any .DLL? Cause i had lot of problems with missing .DLL some time ago after formatting the PC.

Are you using any Virtual Control Sticks?
 
Are you using any Virtual Control Sticks?
Nope. Im not using any virtual control. At the moment i found an old solution that say to replace some .DLL and im tring it.

Edit:
I just tried everything that i found arround the internet but nothing worked. I dont really know what to do.

Edit 2:
I solved the problem following a guide i found on this forum. Here is what solved my problem:

I tried deleting key settings for "Custom" entry in 'My Games\Terraria\input profiles.json', but no avail. Minimal key bindings are restored as default.
As a (dirty) workaround to disable X-Input compatible gamepad only for Terraria, try this (but not verified):
  1. download x360ce
  2. place 'xinput1_3.dll' and empty (0-byte) 'x360ce.ini ' at Terraria game folder

So what you have to do is just download "x360ce" (32-bit) and execut it to create a "x360ce.ini". After this open the .ini with a notepad and cancel all that is written inside and save it. After that you must download "xinput1_3.dll" (just google it, easy to find it out). Now that you have an empty "x360ce.ini" and a "xinput1_3.dll", you have just to copy both inside Terraria folder, in my case: "D:\Steam\steamapps\common\Terraria".

I hope that this can help someone with my same problem :happy:
 
Last edited:
Back
Top Bottom