PC Terraria only rarely opens

Haidenisa

Plantera
I've been occurring a strange technical issue with Terraria that I haven't been able to find searching anywhere else.

When I open up Terraria, it just doesn't open at all; Steam will say I'm in-game for a few minutes, but the game doesn't actually open, then Steam goes back to saying I'm not in-game. Originally, when this problem first started occurring, the game would eventually open up after a few tries, but at this point, I sometimes try 10-20 times to open the game with no luck. There's no error message or anything, the game simply doesn't seem to open at all.

There IS a temporary fix I was told by a friend with the same problem; if I delete my configuration file, the game will open perfectly fine, however a few days later if not the next time I try to play the game the problem is immediately back, and I'd rather not have to reset my resolution, cursor, UI settings, graphic settings, texture packs, etc. every time I open the game.

I've owned the game for 5-6 years on PC, but this error only started happening after 1.4.1 came out if I recall, and I haven't found any permanent fix to it.

-Yes, I've tried verifying the integrity of the game files; it DOES say that 1 file failed to validate and will be reacquired, however it doesn't seem to actually reacquire it, because I tried verifying again directly after and it gives the same message. I'm not sure what to do with this information since I'm unsure how to figure out what file may be wrong (if not the configuration file.)
-Yes, I've tried uninstalling and reinstalling
-I've checked task manager, Terraria isn't open in the background or anything like that.
 
This has happened to me as well, you just have to be patient wait at least 30 seconds for the game to open. If this does not work try opening directly from Steam (Press the open button on Terraria's page in your library), I hope this helps. :dryadsmile:
 
This has happened to me as well, you just have to be patient wait at least 30 seconds for the game to open. If this does not work try opening directly from Steam (Press the open button on Terraria's page in your library), I hope this helps. :dryadsmile:
I wait a few minutes, then Steam puts me as back online instead of in-game, my game usually takes over 30 seconds to open anyways lol

I've tried both from Steam and from my desktop and neither will open
 
I wait a few minutes, then Steam puts me as back online instead of in-game, my game usually takes over 30 seconds to open anyways lol

I've tried both from Steam and from my desktop and neither will open
Sorry it did not work, I hope you find a way!
 
Can you upload the config file that stops the game from loading please?
I deleted it a few hours ago to play again so I'm not sure if this one will prevent the game from loading yet, but here's my current file:
 

Attachments

  • config.json
    5.2 KB · Views: 74
I deleted it a few hours ago to play again so I'm not sure if this one will prevent the game from loading yet, but here's my current file:
Please let us know when you've got a file that definitley stops the game from loading.
 
You can try my LoadNoAsync.cs Plugin for Terraria Tweaker 2. TT2 will work on the latest version even though it is not updated. The plugin removes most of the randomness from the loading process.
 
I just tried opening the game again and the error is back, so that file I just sent should be one that prevents the game from loading.
There doesn't seem to be anything wrong with that file so I'm afraid I'm not really sure what could be causing this.
 
There doesn't seem to be anything wrong with that file so I'm afraid I'm not really sure what could be causing this.
Do you know if there could be any issue around the "installscript.vdf" file? Checking the Steam folder that's the only file that's been updated today. Deleting the file doesn't fix the error and the file pops right back up when I try to open the game, but I wasn't sure if it had anything to do with it.
 
Do you know if there could be any issue around the "installscript.vdf" file? Checking the Steam folder that's the only file that's been updated today. Deleting the file doesn't fix the error and the file pops right back up when I try to open the game, but I wasn't sure if it had anything to do with it.
That script would be related if you were getting errors due to .net or other required libraries not being installed.
 
I now find myself with this same problem. Yesterday I had no problem. Today, I open steam, hit play and a few moments later Terraria stops running. I also have 1 file that fails to validate but does not get reacquired. This problem started after i loaded some things from the workshop. I have since removed all that i subscribed to from the workshop, uninstalled and reinstalled the game and reset my computer. The problem persists. There is no error message either. Without that error message, i am unable to tell what the issue is.
 
Errors are usually logged in "client-crashlog.txt" but every error logged should show a message box.

You should probably include your OS version in this type of bug report. (also 32/64-bit)

If you want to diagnose it yourself, you can launch the game in debug mode using dnSpy and check all the exception checkboxes to have the debugger pause and show errors when something goes wrong. You'll have to click continue to skip through up to 3 exceptions that happen every time the game starts up. (Console text encoding, Razer RGB, and Corsair RGB) You''ll get the Razer and Corsair errors only if you don't have hardware that supports those RGB features.
 
Edition Windows 10 Home
Version 20H2
OS build 19042.867
Experience Windows Feature Experience Pack 120.2212.551.0
64 Bit

I checked the crash log. It didn't have anything since 10/1/2020. This is the last entry.
10/1/2020 6:13:13 PM
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Texture2D'.
at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.InternalDraw(Texture2D texture, Vector4& destination, Boolean scaleDestination, Nullable`1& sourceRectangle, Color color, Single rotation, Vector2& origin, SpriteEffects effects, Single depth)
at Terraria.GameContent.NPCHeadDrawRenderTargetContent.DrawTheContent(SpriteBatch spriteBatch)
at Terraria.GameContent.AnOutlinedDrawRenderTargetContent.HandleUseReqest(GraphicsDevice device, SpriteBatch spriteBatch)
at Terraria.Graphics.Renderers.NPCHeadRenderer.PrepareRenderTarget(GraphicsDevice device, SpriteBatch spriteBatch)
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.Game.HostIdle(Object sender, EventArgs e)
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 grfidlef)
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.LaunchGame(String[] args, Boolean monoArgs)

Yeah, I'm not downloading any new programs for what will likely be a onetime fix. I also don't know enough to trouble shoot myself beyond the bare basic solutions.
 
When you uninstall Terraria, have you also checked to see if any files are leftover in the "C:\Program Files (x86)\Steam\steamapps\common\Terraria" directory, and manually deleting anything that might remain?
Or maybe manually deleting the folder itself after an uninstall (because by default the folder stays)?
 
For now, deleting the config file and then reinstalling Terraria has solved the problem. However, if the problem is the same as the OP then this problem will happen again. The question therefore is what is messing up the config file?
 
The question therefore is what is messing up the config file?
It isn't necessarily a problem with the config file. If it were related to a specific item in the config file the crashes would not be random.

Terraria has has some instability issues related to multithreaded code. Something as simple as running another program in the background might change the timing and cause or prevent crashes. Deleting the config file is probably not fixing the problem, but instead slightly changing the timing to avoid the crash.

This bug is very unlikely to be fixed because:
  1. The bug is random and cannot be reliably reproduced. The developers have only rarely or never experienced the problem and cannot determine if it is a genuine bug.
  2. Even if you provide your config files, the bug will not reproduce on other machines when it is used. If hardware is different, startup timing will not be the same and the bug will not occur.
  3. There are lots of sections of the game's code where every type of error is ignored. Even though there may be useful error information, there is no way to view or save it.
  4. Attempting to diagnose the problem with a debugger to view the suppressed or ignored errors may change the timing and cause the error to not occur.
 
Well as much as that explanation basicly says there is no way to fix it because the root cause can't be determined, at least I got the game working again so I'll live with that. Terraria is still my favorite game to play so as long as it runs i'm good.
 
Well as much as that explanation basicly says there is no way to fix it because the root cause can't be determined, at least I got the game working again so I'll live with that. Terraria is still my favorite game to play so as long as it runs i'm good.
It isn't unfixable. The game could be patched to not fail silently if this issue becomes elevated in priority.

If the latest patch causes more silent crashes to happen and people report them, then there is a chance of this being fixed.
 
Back
Top Bottom