Bad Image Format Exception.

HNTR

Plantera
Every time I try to open Terraria, even when I uninstall and reinstall, restart my pc, etc. I always get a "System.BadImageFormatException" error message.

This is the Error Message:

a23e63fbc804490af12f7bd68cf7ddf5.png

Screenshot - a23e63fbc804490af12f7bd68cf7ddf5 - Gyazo


My Laptop Specs are:

6d2d71267936ebd517a24bd86cd09e08.png

Screenshot - 6d2d71267936ebd517a24bd86cd09e08 - Gyazo


If someone could help me with this, it would be greatly appreciated. I love playing Terraria, I've played it since it's release on the XBox360 (I have over 15000 hours) and I continued playing on PC (over 2100 hours). If you need any other info, I'd be happy to oblige. Thanks in advance!
 
Are you using an administrator account to perform these actions? Below is a guide from cnet to see if your account is an administrator.

  • Click on the Start button, the Start Menu will pop up.
  • Right-click the name (or icon, depending on the version Windows 10) of the current account, located at the top left part of the Start Menu, then click on Change account settings.
  • The Settings window will pop up and under the name of the account if you see the word "Administrator" then it is an Administrator account.
 
It shows it is an administrator. Is there a certain reason that I don't have access from TrustedInstaller?
 
Did you mess around with the ownership of any files or drives? TrustedInstaller shouldn't be the owner (from what I can remember... could be wrong though), for now we can change the ownership of the two files we need. Before deleting the files right click them and select Properties. Then switch to the security tab and then click "Advanced" at the bottom right. Then next to where it says "Owner" click "Change" and then click "Advanced" again in the bottom right. Finally click "Find Now" and and select your username where it says Administrator.

Let me know if I need to clarify.
 
Last edited:
Did you mess around with the ownership of any files or drives? TrustedInstaller shouldn't be the owner (from what I can remember... could be wrong though), for now we can change the ownership of the two files we need. Before deleting the files right click them and select Properties. Then switch to the security tab and then click "Advanced" at the bottom right. Then next to where it says "Owner" click "Change" and then click "Advanced" again in the bottom right. Finally click "Find Now" and and select your username where it says Administrator.

Let me know if I need to clarify.
I haven't made any changes in ownership, so I'm not sure if TrustedInstaller is owner by default or what. But I made myself owner of the folders, yet it still wouldn't let me delete them. Once I went into the properties of one of the DLL files, it said that TrustedInstaller still was the owner of the individual files.
[doublepost=1566334630,1566334598][/doublepost]If you ever need any, I can get you screenshots of whatever
 
(Everything I have tested so far has been on the System32 folder btw) When I went into an individual file and changed myself to the owner, it now said I needed to have permission from (my laptop name)/(my dad's old username). That account doesn't show on the computer anymore, because I changed it to mine, but it is still the same account. I tried to change the name back, but it wouldn't let me, as the old name was just one word, not a full name. I then went into the folder's properties and tried to change what permissions each group had, I tried changed administrators, users, system, and myself to have full access, and took off TrustedInstaller's permissions. Whenever I do that, it said for each file: "Failed to enumerate objects in the container. Access is denied." But when I cancel and go to check what permissions I have, it says that my changes were saved. I am very confused at this point, and just want to play Terraria ;-;
[doublepost=1566339198,1566338985][/doublepost]Is it possible to just delete all of the files in the Terraria Folder, uninstall the game, then reinstall the game?
 
You don't want to make yourself owner of the System32 and SysWow64 folders that may have bad unintended side effects. Only make yourself owner of the individual dll files that it won't allow you to delete.

As for your second post I'm not sure exactly what you mean... Can you please pull up a list of accounts you can change the ownership of? Take a screenshot if necessary of all the group/object names that appear when you click "find now" Also tell me the name of the user account you are using.

Also no, reinstalling Terraria will not fix the issue because the issue isn't with Terraria or it's game files but the System Environment you are trying to run it on (your computer).
 
Last edited:
So since I already changed myself to owner, I tried to change TrustedInstaller back to the owner of the 2 folders, but it wouldn't let me, it said the "specified module could not be found"
[doublepost=1566419195,1566419161][/doublepost]If you have Discord, I could screenshare with you to show you what is exactly going on.
[doublepost=1566419535][/doublepost]The User Selection Dialogue Module is the one that can't be found, just to be more clear.
 
Alright at this rate, it may just be better to do a reset of windows. Something much more problematic seems to be the underlying cause of Terraria not being able to run. This problem may manifest itself in other games/areas as well. So doing a reset is the easiest way to move forward and fix everything all at once.

This guide shows you how to open the reset Windows feature. While there is a "Keep my Files" option I HIGHLY recommend you back up anything you want to keep anyways.

TechRepublic mentions that-

Resetting will:

  • Remove all apps and programs that didn't come with this PC
  • Change settings back to their defaults
  • Reinstall Windows without removing your personal files (if keep my files was used)
If this doesn't work then you'll want to do a clean reinstall of Windows rather than just a reset. Let me know if you have any questions.
 
I actually just finished building my first actual gaming pc, ive been using a laptop (the device this problem is on) and I'm about to install windows, so since I'm sure the problem won't be on there and that is what I'll be using to play Terraria and other games, I'll just use that. If I end up having other problems, i'll be sure to come back and let you know.
 
I just got Windows 10 on my new PC, downloaded Steam, and installed Terraria. It is now working. Thank you so much for your help. I know you tell most people to Put SOLVED in the title, followed by the solution, but since my problem wasn't really solved, what should I do? Also, thank you so much for your help. I literally made this account so I could try and fix the problem, and didn't expect such a quick, detailed, and constant response. Thank you so much. :golem:
 
Oh I don't really care if people mark it resolved or not. Some people do, I'm not one of them. My only concern is helping the people who need it however that gets done and what happens to the thread afterwards is irrelevant to me. To each their own though.

Basically Windows recently pushed a windows update that alters a lot of components Terraria relies on to operate and there's a handful of people where the update didn't go smoothly and ended up breaking things. This happens every time Microsoft pushes out large updates I usually end up having my hands full for the week after helping people fix or reset their Windows.

I'm glad your your new PC is doing good, if Terraria ever stops working let me know and I'll help you resolve it. Enjoy Terraria.
 
Back
Top Bottom