PC Terraria crashes on startup/ won't launch

Envy35

Skeletron Prime
ok so when i open terraria, a white box appears in the top left corner, which takes up a quarter of the screen, then it closes a few seconds later. i think one problem may be caused from when i had to reinstall windows, as maybe steam or terraria messed up when i put the folder back to where it was. Another cause may be from a previouse problem from when i could still run terraria. the game would display a white screen if at a full screen resolution in windowed.

i've currently tried using the following methods to fix this, but they have not worked.
- activating the microsoft.net framework and attempting to reinstall/repair it
- congifuring program properties on "terraria.exe" including running as admin
- reinstalling a hundred times
- verifying files
- moving file locations

i really want to play terraria again, and starbound is nice but not the same experience
any help would be nice
 
Alright let's try enabling error logs to see if we can get any clues as to what may be going on. Follow this guide:

If that doesn't show any logs then we'll need to use the event viewer. Press start, type "event viewer" click the result that shows up under programs. On the left hand side click "Windows Logs" and then "Applications" view any errors with Terraria as their source, screenshot them and upload them here.
 
Alright let's try enabling error logs to see if we can get any clues as to what may be going on. Follow this guide:

If that doesn't show any logs then we'll need to use the event viewer. Press start, type "event viewer" click the result that shows up under programs. On the left hand side click "Windows Logs" and then "Applications" view any errors with Terraria as their source, screenshot them and upload them here.
ok, this is what i got

Error Logging Enabled.
================
7/9/2018 1:02:54 PM: First-Chance Exception
Culture: en-US
Exception: System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
================

Resolution changed to: 1366x768.
 
A couple of users I have helped with this issue found success in solving this using the same steps used to solve a Synch Lock Exception. So let's start with that.

index.php
This particular cause can actually boil down to a few different errors and crash reports, but after deleting config.json which many troubleshooting steps have you do you'll finally get this one. This simply means that Terraria does not have the permissions or access required to create and modify the config.json file.
1. Disabling, or adding an exception to, Windows Defender: I have users start with disabling windows defender to see if that's what causing the issue, if it is, I have them re-enable it and then add an exception to Terraria.exe located in the install directory and Terraria's default save location which is located in \Documents\My Games\Terraria.

How to disable Windows Defender
  • Open the Settings Page for Windows, this can be done by clicking the start button and then clicking the gear icon towards the bottom left hand side of the screen. Alternatively you can also type in settings and click the gear icon that pops up if you're having trouble locating it.
  • Click on "Update and Security".
  • Make sure the shield icon is selected on the left hand side.
  • Click on "Virus and Threat Protection".
  • Click on "Virus and Threat Protection Settings".
  • Click the toggle switch on under "Real Time Protection" so that it says off.
  • You should now be prompted by the UAC, select yes.
  • Windows Defender should now be disabled, if you had problems following this short tutorial, click here to visit a section of the Ten Forums that covers this topic complete with pictures.
If this did not solve your problem or this does not apply to you move to step 2

2. Add an Exception to your Anti-Virus Program: You can also just temporarily turn off your Anti-Virus program to see if this is causing the issue. Once it's determined if it is causing the problem you'll want to turn it back on and just add an exception to the program, as keeping it off is not recommended as it can expose your system to malware and viruses. Make sure that both Terraria's install directory, it's application file (.exe), and the default save location \Documents\My Games\Terraria are added. The steps on how to add an exception, and what you can add as an exception are going to differ from program to program. If you're not sure you can always google it or ask the Tech Support Section for help. Programs known to cause issues with Terraria include: BitDefender, MalwareBytes, and McAfee.

If this did not solve your problem or this does not apply to you move to step 3

3. Adjust Windows File Permissions and Ownership: We need to make sure all users have Full Control over Terraria's default save directory to see if this will solve the error. There's two different ways to do this. If one doesn't work out for you, maybe the other one will. The Ownership part of this tutorial was written up by the Quality Assurance Director for Relogic, Thanks Arkhayla!

Method 1: Changing Permissions
  • Go to your Documents and find you "My Games" Folder, right click it and select properties.
  • In the new window that will pop up there should be bunch of tabs, click on the security tab.
  • You'll need to select each of the users on there and give them full control. So click on a user/group from the list then select edit.
  • A new window will pop up, in this new window click on a user/group and make sure the full control checkbox is checked.
  • Do this for all users and groups, afterwards see if that fixed it and you can launch the game.
  • Below you will find an example image that may clarify some of the previous steps
3UJorJf.png
moLX64W.png


Method 2: Changing Ownership
  • Open My Documents\My Games\ and right click the Terraria folder Or wherever your directory is
  • Click Properties.
  • Click the Security tab
  • Click the "Advanced" button.
  • Click "Change" next to Owner.
  • Type your username, click the "Check Names" button, then click OK.
  • Check "Replace owner on subcontainers and objects" under the owner's name.
  • Click OK again. If you get a message saying "Do you want to replace the directory permissions with permissions granting you full control?", click "Yes" and you're done.
  • Click the "Edit" button.
  • Click on your username from the list.
  • Check "Full control" underneath it.
  • Click OK.
  • Click OK again.
If this did not solve your problem or this does not apply to you move to step 4

4. Run Terraria as an Administrator: Browse to you installation directory, by default for steam it is C:\Program Files (x86)\Steam\steamapps\common\Terraria then right click the application and select run administrator.

If this did not solve your problem or this does not apply to you move to step 5

5. Erase All Previous Terraria Data and Installations on your Computer: This method was found by a user on our forums in a thread that I helped troubleshoot with them. Thanks TheWolfLike101! First uninstall Terraria, then back up any save data you might want to keep located in either \Documents\My Games\Terraria\Worlds and \Documents\My Games\Terraria\Players. Now delete the Terraria folder in \Documents\My Games. Finally do a file search for anything that might be Terraria related. Afterwards reinstall Terraria and launch it, if no error is thrown you can copy back over your world and player files that I mentioned you should back up.

If this did not solve your problem or this does not apply to you move to step 6


6. Changing the Default Save Directory: It's possible to manipulate and change the default save directory in the event all previous steps have failed to help you. This method was found by a user on our forum, Thanks TorZar! It was originally used by TorVar to change the directory for mod purposes, but I believe the same method can be used to help solve this problem.

Method 1: Using a Shortcut - The Install Directory
  • Navigate to your install directory of Terraria, by default for steam it should be: C:\Program Files (x86)\Steam\steamapps\common\Terraria
  • Right click Terraria.exe and select "Create Shortcut".
  • Right click the newly created shortcut and select properties.
  • In the target field add -savedirectory saves at the end, it should now look something like below, and save it's files to the install directory in a folder called saves
T5cTqDB.png


Method 2: Using a Shortcut - Any Directory
  • Navigate to your install directory of Terraria, by default for steam it should be: C:\Program Files (x86)\Steam\steamapps\common\Terraria
  • Right click Terraria.exe and select "Create Shortcut".
  • Right click the newly created shortcut and select properties.
  • In the target field add -savedirectory and then add the file path so that it looks something like this -savedirectory C:\Terraria Save Data. Any file path can be used so long as you have the proper permissions on that user to modify files there. You can use a file path for a folder on your desktop, your local app data, or even an external drive. (so long as that drive is mounted)
ns6ahII.png
 
A couple of users I have helped with this issue found success in solving this using the same steps used to solve a Synch Lock Exception. So let's start with that.

index.php
This particular cause can actually boil down to a few different errors and crash reports, but after deleting config.json which many troubleshooting steps have you do you'll finally get this one. This simply means that Terraria does not have the permissions or access required to create and modify the config.json file.
1. Disabling, or adding an exception to, Windows Defender: I have users start with disabling windows defender to see if that's what causing the issue, if it is, I have them re-enable it and then add an exception to Terraria.exe located in the install directory and Terraria's default save location which is located in \Documents\My Games\Terraria.

How to disable Windows Defender
  • Open the Settings Page for Windows, this can be done by clicking the start button and then clicking the gear icon towards the bottom left hand side of the screen. Alternatively you can also type in settings and click the gear icon that pops up if you're having trouble locating it.
  • Click on "Update and Security".
  • Make sure the shield icon is selected on the left hand side.
  • Click on "Virus and Threat Protection".
  • Click on "Virus and Threat Protection Settings".
  • Click the toggle switch on under "Real Time Protection" so that it says off.
  • You should now be prompted by the UAC, select yes.
  • Windows Defender should now be disabled, if you had problems following this short tutorial, click here to visit a section of the Ten Forums that covers this topic complete with pictures.
If this did not solve your problem or this does not apply to you move to step 2

2. Add an Exception to your Anti-Virus Program: You can also just temporarily turn off your Anti-Virus program to see if this is causing the issue. Once it's determined if it is causing the problem you'll want to turn it back on and just add an exception to the program, as keeping it off is not recommended as it can expose your system to malware and viruses. Make sure that both Terraria's install directory, it's application file (.exe), and the default save location \Documents\My Games\Terraria are added. The steps on how to add an exception, and what you can add as an exception are going to differ from program to program. If you're not sure you can always google it or ask the Tech Support Section for help. Programs known to cause issues with Terraria include: BitDefender, MalwareBytes, and McAfee.

If this did not solve your problem or this does not apply to you move to step 3

3. Adjust Windows File Permissions and Ownership: We need to make sure all users have Full Control over Terraria's default save directory to see if this will solve the error. There's two different ways to do this. If one doesn't work out for you, maybe the other one will. The Ownership part of this tutorial was written up by the Quality Assurance Director for Relogic, Thanks Arkhayla!

Method 1: Changing Permissions
  • Go to your Documents and find you "My Games" Folder, right click it and select properties.
  • In the new window that will pop up there should be bunch of tabs, click on the security tab.
  • You'll need to select each of the users on there and give them full control. So click on a user/group from the list then select edit.
  • A new window will pop up, in this new window click on a user/group and make sure the full control checkbox is checked.
  • Do this for all users and groups, afterwards see if that fixed it and you can launch the game.
  • Below you will find an example image that may clarify some of the previous steps
3UJorJf.png
moLX64W.png


Method 2: Changing Ownership
  • Open My Documents\My Games\ and right click the Terraria folder Or wherever your directory is
  • Click Properties.
  • Click the Security tab
  • Click the "Advanced" button.
  • Click "Change" next to Owner.
  • Type your username, click the "Check Names" button, then click OK.
  • Check "Replace owner on subcontainers and objects" under the owner's name.
  • Click OK again. If you get a message saying "Do you want to replace the directory permissions with permissions granting you full control?", click "Yes" and you're done.
  • Click the "Edit" button.
  • Click on your username from the list.
  • Check "Full control" underneath it.
  • Click OK.
  • Click OK again.
If this did not solve your problem or this does not apply to you move to step 4

4. Run Terraria as an Administrator: Browse to you installation directory, by default for steam it is C:\Program Files (x86)\Steam\steamapps\common\Terraria then right click the application and select run administrator.

If this did not solve your problem or this does not apply to you move to step 5

5. Erase All Previous Terraria Data and Installations on your Computer: This method was found by a user on our forums in a thread that I helped troubleshoot with them. Thanks TheWolfLike101! First uninstall Terraria, then back up any save data you might want to keep located in either \Documents\My Games\Terraria\Worlds and \Documents\My Games\Terraria\Players. Now delete the Terraria folder in \Documents\My Games. Finally do a file search for anything that might be Terraria related. Afterwards reinstall Terraria and launch it, if no error is thrown you can copy back over your world and player files that I mentioned you should back up.

If this did not solve your problem or this does not apply to you move to step 6


6. Changing the Default Save Directory: It's possible to manipulate and change the default save directory in the event all previous steps have failed to help you. This method was found by a user on our forum, Thanks TorZar! It was originally used by TorVar to change the directory for mod purposes, but I believe the same method can be used to help solve this problem.

Method 1: Using a Shortcut - The Install Directory
  • Navigate to your install directory of Terraria, by default for steam it should be: C:\Program Files (x86)\Steam\steamapps\common\Terraria
  • Right click Terraria.exe and select "Create Shortcut".
  • Right click the newly created shortcut and select properties.
  • In the target field add -savedirectory saves at the end, it should now look something like below, and save it's files to the install directory in a folder called saves
T5cTqDB.png


Method 2: Using a Shortcut - Any Directory
  • Navigate to your install directory of Terraria, by default for steam it should be: C:\Program Files (x86)\Steam\steamapps\common\Terraria
  • Right click Terraria.exe and select "Create Shortcut".
  • Right click the newly created shortcut and select properties.
  • In the target field add -savedirectory and then add the file path so that it looks something like this -savedirectory C:\Terraria Save Data. Any file path can be used so long as you have the proper permissions on that user to modify files there. You can use a file path for a folder on your desktop, your local app data, or even an external drive. (so long as that drive is mounted)
ns6ahII.png
i've tried all of the methods, and it has not worked.
but now when i try and open terraria a 800 x 600 window pops up in the center then disappears.
heres the log i got

Error Logging Enabled.
================
7/9/2018 5:57:28 PM: First-Chance Exception
Culture: en-US
Exception: System.IO.IOException: The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
================

Resolution changed to: 800x600.
 
Alright, let's try this.

Press start, type CMD, right click it and select "run as administrator". In the black box that appears type "sfc /scannow" without the quotes. Tell me what the results of the scan say and if it fixes your problem.

Another thing you can try is to open a file explorer. Right click your C: drive, select properties, switch to the tools tab and click "Check Now" under error checking. It will ask you if you want to restart to check the disk, say yes and let me know the results. Once it's complete see if your problem is fixed.
 
Alright, let's try this.

Press start, type CMD, right click it and select "run as administrator". In the black box that appears type "sfc /scannow" without the quotes. Tell me what the results of the scan say and if it fixes your problem.

Another thing you can try is to open a file explorer. Right click your C: drive, select properties, switch to the tools tab and click "Check Now" under error checking. It will ask you if you want to restart to check the disk, say yes and let me know the results. Once it's complete see if your problem is fixed.
nope, didn't do anything
the scan didn't find any problems and scanning my drives didn't do anything
 
Alright let's check what the event viewer has to say about this. Read the last paragraph of my first post in this thread to see how to use the event viewer.
 
That's unfortunate to hear. I was hoping we could uncover more information so we could find a solution. Is that snippet you posted the entire log by the way?

You've tried reinstalling XNA 4.0 right?
 
That's unfortunate to hear. I was hoping we could uncover more information so we could find a solution. Is that snippet you posted the entire log by the way?

You've tried reinstalling XNA 4.0 right?
yes i have reinstalled it and repaired it twice. also the snippet is the entire log i got
 
Where is Terraria installed, is it installed in the default location for steam? Did you at one point have mods installed or are currently trying to use mods?
 
Where is Terraria installed, is it installed in the default location for steam? Did you at one point have mods installed or are currently trying to use mods?
terraria is installed on my main hard drive. and i did have mods at one point. I have a modded terraria folder in the my games folder, which has the characters and worlds i used when playing modded terraria. I had other files for mods in the main terraria folder, but that has been deleted after my first reinstall.
 
Unless you manually deleted them the files won't be deleted during the reinstall process. You might want to double check if they are still there. People have had problems in the past with your error from old mod files. You may also want cut your old mod save files using ctrl+x and then paste them in your desktop somewhere or some other location you can use to backup your files. We want to make sure that no old mod files are conflicting with anything so we want to move and delete any folders and files from their usual location.
 
Unless you manually deleted them the files won't be deleted during the reinstall process. You might want to double check if they are still there. People have had problems in the past with your error from old mod files. You may also want cut your old mod save files using ctrl+x and then paste them in your desktop somewhere or some other location you can use to backup your files. We want to make sure that no old mod files are conflicting with anything so we want to move and delete any folders and files from their usual location.
i've removed the old mod files, and it hasn't worked.
i've also checked the event viewer again, and i have found two errors

Faulting application name: Terraria.exe, version: 1.3.5.3, time stamp: 0x58ffb460
Faulting module name: nvd3dum.dll, version: 10.18.13.5946, time stamp: 0x56c16e4f
Exception code: 0xc0000005
Fault offset: 0x0056efc8
Faulting process id: 0x1f08
Faulting application start time: 0x01d418c63858d959
Faulting application path: C:\Program Files (x86)\Steam\steamapps\common\Terraria\Terraria.exe
Faulting module path: C:\Windows\SYSTEM32\nvd3dum.dll
Report Id: 6cab929a-63fa-4910-a55a-1766368bc959
Faulting package full name:
Faulting package-relative application ID:


Application: Terraria.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 5405EFC8

I've checked my system 32 for nvd3dum.dll, and it wasn't there so i downloaded a copy and put it in the system 32 folder. i also tried updating my nvidia drivers, but they were all up to date
 
Bit of a tough one eh?

Thank you for being patient, and thank you for supplying me with as much information as possible. Solving technical puzzles like this goes a lot faster when you're able to work together. I'm sure we'll figure this one out eventually.

You may not be able to update your drivers, but you should be able to do a clean re-installation of the drivers. When installing them just make sure to click the custom or advanced settings and look for a checkbox that says "clean install". I would start with that. Also uninstall any other old drivers you may have installed.

Just a friendly reminder by the way, try to avoid downloading a dll from the internet to stick in installation directory's or your system32 folder. Instead if a program is telling you you are missing a dll find out what dependency or driver package includes that dll and just download the full package. Otherwise you may run into other problems down the road.
 
Bit of a tough one eh?

Thank you for being patient, and thank you for supplying me with as much information as possible. Solving technical puzzles like this goes a lot faster when you're able to work together. I'm sure we'll figure this one out eventually.

You may not be able to update your drivers, but you should be able to do a clean re-installation of the drivers. When installing them just make sure to click the custom or advanced settings and look for a checkbox that says "clean install". I would start with that. Also uninstall any other old drivers you may have installed.

Just a friendly reminder by the way, try to avoid downloading a dll from the internet to stick in installation directory's or your system32 folder. Instead if a program is telling you you are missing a dll find out what dependency or driver package includes that dll and just download the full package. Otherwise you may run into other problems down the road.
I did a clean reinstall for my nvidia driver and terraria works! I am able to play it. The only problem is that when i set it to windowed mode, the game crashes. It is annoying because i do rather playing in windowed mode, but running terraria in fullscreen is better than not running it at all.

Thanks for helping me, really appreciate it :)
 
When it crashes in window mode, what error is displayed in the event viewer? Also what is your graphics card? If you need assistance om how to get this information let me know.

I'm glad we got it mostly figured out though! If you'd rather take your spoils at this point I understand. If you want to figure out this new crash in windowed mode I'm more than willing to help.
 
Last edited:
I had same issue, tried all i read here and there and it didnt work, THEN
***I opened "Geforce Experience" by typing nvidia at start, and let it find terraria in my pc on Games tab. After that i clicked "optimize" button and it worked magically***
Hope it helps others too <3 peace
 
Alright let's try enabling error logs to see if we can get any clues as to what may be going on. Follow this guide:

If that doesn't show any logs then we'll need to use the event viewer. Press start, type "event viewer" click the result that shows up under programs. On the left hand side click "Windows Logs" and then "Applications" view any errors with Terraria as their source, screenshot them and upload them here.
What if the game doesn’t create a folder in my “my games” folder so I can’t get the error logs
 
Back
Top Bottom