**REPORTED** My world got corrupted; I lost all town NPCs and more...

xysnorfgxvcbq

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Windows 10
Terraria Version
1.4.0
Controls Used
Keyboard/Mouse
I have edited this with the most updated information. My original post is just below, and all the comments that I left during my investigation are following.

I was hosting a multiplayer game for about and hour or two; and exited normally (using in-game UI, no Alt+F4 or anything). Returning to the world I could not play in single player at all, getting the "Load failed" message (attached image). I was able to host another multiplayer game with that save, though I noticed the following:
  • All my town NPCs were gone, along with the 1 pillar that was there when I exited
  • I get attacked by the Moon Lord shortly after, and when I die NPCs begin returning
  • I can interact with tiles (for example, I can ride a minecart)
  • I cannot interact with placed objects (for example, I cannot open chests; dummies don't respond to attacks)
    • While I can't interact with them, they do highlight when I hit ctrl
  • I can interact with my piggy bank and NPCs that return
  • I can harvest placed objects with pickaxes, though; and once I place them again they are useable.
    • I cannot harvest chests that were not empty, but I still cannot interact with them to open them
  • About 60% from the leftmost side of the map, all tiles are gone
    • My minimap does not reflect this until I actually travel to that area
I began playing around with the cloud save options, the .wld and .bak files in %USERPROFILE%\Documents\My Games\Terraria\Worlds and TEdit. I noticed the following:
  • The .wld.bak file that was there is months old; presumably from the last time I exited before enabling cloud save.
  • There are no .wld files at all.
  • When I disable cloud save, a .wld file appears in my Worlds folder
    • For most of the night, the cloud save would appear no matter what, even if beside the offline save (I'd see the same world twice, one with cloud save enabled and one without)
    • At some point, the cloud version stopped appearing. Luckily, I had a backups of the .wld file that got written when I first disabled cloud saving in my Recycle Bin; unfortunately I can't tell which ones have been opened or not
  • When I open the world in TEdit, I get the error described here.
    • Presumably this explains the missing NPCs and tiles
It looks like, when you enable cloud saves, Terraria just stops saving locally altogether; so the .bak file there is useless in my case. I am guessing that maybe I exited during an autosave, and that Terraria didn't handle the overlapping saves properly (either ignoring the second one or not waiting for the second one to finish before exiting), since Terraria does save both world and player when you exit.

An easy fix would be for cloud saves to just be additional to local saves (i.e. the game still saves a .bak file before sending it off to the cloud); or to prevent the player from exiting mid-save. I found a few results during my search to suggest that this is not a new issue, either, so it's pretty vexing that it's still a problem.

That said, I wonder if I can salvage what's left of the file that I could acquire:
  • Placed objects: It should be somewhat trivial to fix placed objects with no inventory (dummies for example), if even iterating over the map
  • Placed non-empty chests: Depending on which part of the file the storage data is, this might be recoverable too.
  • Minimap data? Since the minimap appears to be cached from my last save, I was wondering if there was enough data there to place tiles where the map remembers them
90% of my game time has been on this world, if I can't salvage this I'm gonna be really vexed. This seems to be an easily preventable issue by making cloud save save the file remotely as well as, and not instead of writing .bak files; but considering that most of my work has been on the portion of the map that remains, I guess I could work with that.

Update: After opening a backup and saving it, then opening the file that created with TEdit, it works; but it shows all my chests as empty. I'm hoping that is because at some point when trying to recover the file something got overwritten... If so, and if there is a backup on the cloud server of the file, that would be the best file to try to salvage.

Original post:

What I did:
  • I was playing via Steam hosting a multiplayer game for a few hours.
    • When we were done, I had 22 NPCs and 1 pillar left.
  • I exited normally, using the in-game UI to leave the world and then exit the game.
  • I opened the game shortly after and tried to enter my world in single player
  • The game could not load the world, and could not find any backups
  • My %USERPROFILE%\Documents\My Games\Terraria\Worldsfolder has all my worlds, 4 of which had .wld.bak extension (the 4 I had before 1.4) and one had a .wld extension (I think I downloaded this recently)
  • I tried to enter a multiplayer game with the same settings, and this time the game loads but with severe problems:
    • ALL my town NPCs were gone (even my cat)
    • The 1 pillar is missing; and I got attacked by the Moon Lord shortly after
While typing this, I lost connection; and tried to enter single player again. Same thing: load failed, no backup. I entered multiplayer again, same settings; and again I have NO NPCs.

Persistent state:
  • Cannot load single player at all
  • Can load into multiplayer, but:
    • All town NPCs are gone, including cats etc
      • The NPCs that were there before seem to come back, but I'm not sure if NPCs like the Tavernkeep will return or if I will have to find him passed out again
    • Pillars that were once there are gone
    • I get attacked by the Moon Lord shortly after loading (even if I die, then exit, then re-enter)
    • I cannot interact (i.e. with right click) with anythingthat was placed before my current load (can't open chests, dummy doesn't respond to attacks)
      • I do gain the ability to craft things around their respective crafting stations
      • I can use a pickaxe to destroy items that were placed there before (I cannot destroy chests weren't empty, so presumably the chests' contents are preserved)
      • Piggy bank works
This issue persists no matter how many times I exit and reload.
 

Attachments

  • unknown.png
    unknown.png
    176.4 KB · Views: 249
Last edited:
(I backed up my file first)

EXTREMELY WEIRD:

I pressed move off cloud and entered multiplayer, was able to start game but a portion of my map was reset to how it was months ago. It seems to be only a portion of my town, not extending downward or upward too far (I've attached two screenshots of my map, one including an annotation showing the area that was reset).

This world can be loaded in single player.
 

Attachments

  • Annotation 2020-05-23 025755.png
    Annotation 2020-05-23 025755.png
    120.4 KB · Views: 162
  • No Annotation 2020-05-23 025755.png
    No Annotation 2020-05-23 025755.png
    108.7 KB · Views: 200
Last edited:
Using the copy I made in my last comment, I tried to delete the worlds in %USERPROFILE%\Documents\My Games\Terraria\Worlds then copy the backup in, and also changed the file extension from .wld.blk to .wld

At this point, when I go to the Worlds screen in-game, I see my world twice: one is on cloud and one is off cloud. The off cloud one behaves as described in my previous comment and the on-cloud one behaves as described in my original post.

I repeated the process, this time not updating the file extension (leaving it as .wld.bak) and now only 1 on-cloud world appears, behaving as in my original post
 
Last edited:
I am convinced this can be fixed.

When I am able to load the on-cloud version of the world (in multiplayer only), it has all the correct tiles placed, and seems to remember which chests are empty or not (even though I can't open them, the empty ones can be harvested). While the NPCs aren't there when I load, they do eventually start to return to town (though, again, I don't know if the Tavernkeep will return, for example)
 
Nevermind that. After exploring more, it seems at some point along the x axis (screenshot attached) all tiles are gone. The minimap seems to remember what used to be there, though.
 

Attachments

  • Annotation 2020-05-23 040246.png
    Annotation 2020-05-23 040246.png
    649 KB · Views: 131
More updates:

If I remove all my .wld files from Worlds, then go to Terraria, I still see my world. If I disable cloud saves, a new file appears; and if I open that in TEdit, I get the following error:

1590222115840.png



I think the .wld.bak that I had in my Worlds folder was the last time I saved the game since I enabled cloud saves. I guess Terraria makes a .bak file every time you save a game without cloud saves enabled, but not if you do. So, I think I was right when I said I suspect it's related to sync issues.

The developers should probably update the game to also save a local copy, or even redundant local copies (say, up to 30 days or X saves or something).
 
Last edited:
I think this comment was wrong. Although I think I remember exploring and confirming what the map said, I'm not 100% sure (it's now 5 am). Considering that the minimap seems to cache (mentioned here), I think what might have happened was just that I was in the old world, and that the map was cached.
 
My steam cloud game is now gone. Thankfully, I was able to restore one of the copies from my Recycle Bin.

Now, when I take my game off cloud, I only see the off-cloud version.

Earlier, no matter what I did, I'd always see an on-cloud version, even if there was also an off-cloud version. Presumably off-cloud worlds only appear when .wld files are in the Worlds folder; but obviously something went wrong when taking the game off of Steam, as it kept showing up.
 
Can anybody from the Terraria team confirm they're aware of this?


IMPORTANT NOTE REGARDING SAVE CORRUPTION

We are aware of some reports of save corruption issues that have been shared lately. This does not impact the vast majority of people, but certainly is cropping up for a handful of folks. A few important things to note first:

  • Always make sure your save process completes before you turn off your PC. Save and Exit, wait for the main menu before shutting down, etc.
  • Be sure to check your antivirus “folder protection” to be sure that Terraria is allowed access to My Documents - this is a common issue that can appear to be corrupt files or even cause crashing.
  • Steam Cloud has some issues from time to time – it is safest to keep local copies of files always
  • Making manual backups (just create a “Backup Saves” folder of your players and worlds is always a great idea).


Beyond the above, we are aware of - and actively investigating - this rare save issue from 1.4 with player's worlds that can result in corrupt saves. During this investigation, we also discovered the game's server code (also used for host and play sessions) – for all versions up to and including 1.4.0.3 – still allowed these corrupt worlds to load and let players play them, however these saves would be missing key components such as whole sections of the world or contents of all chests.

***Once a world is loaded in this corrupt state, and saved, this silent fail causes the loss of valuable information that can help us track down the problem. In 1.4.0.4 we added code that stops the loading once the fail is detected. This is why it appears that 1.4.0.4 is causing issues, when it is actually just flagging/blocking the issue above***



We are doing our best to track this issue down ASAP. If you have worlds that failed loading, PLEASE report these on the forums and attach both the .wld and .bak files to your report. This will be a tremendous help in tracking down and squashing this nasty bug, and we would greatly appreciate it!

Source: Terraria: Journey's End - Hotfix Changelog
 
@Quasak thanks for the lengthy reply to this. I'm seeing what seems to be the same issue in these threads as well:
**REPORTED** - Load Failed! No backup found (Has world file)
**REPORTED** - Streamed Terraria for the first time in years; by the end, map ended up becoming corrupted, and lost the entire map and .bak along with it. (Has multiple world files)
Missing World v1.4.0.4 (Has world file)
No Backup Found (No world file)

One problem with uploading the .wld and .bak files, the forum upload max size seems to be too small for some player worlds (including a few of mine). If that could be increased to 20MB, that might help with the debugging. Another problem with the .bak files, enabling cloud saves seems to not generate .bak files, or at the very least they aren't being moved "off-cloud" when trying to retrieve the files.

Edit: Found more threads:
PC - World file corrupted (Has world and .bak files)
**REPORTED** - I lost my world (Has multiple world files towards the bottom)
**REPORTED** - Corrupted save - Load failed and no backup found. (Has world file)
**REPORTED** - Load Failed! No backup found (Has a Dropbox link, presumably to files)
**REPORTED** - .wld and .bak files corrupted (Has world and .bak files)
**REPORTED** - Corrupted Save File loads old save after i updated the game (Has world and .bak files)

Edit 2: More threads
**REPORTED** - World corrupted. (No world file)
**REPORTED** - Corrupted PC World (Has world and .bak files)
**REPORTED** - Corrupt world (files attached) (Has world and .bak files)
PC - World won't load after 1.4.0.4 update. (No world file)
Load failed! No backup found (No world files, quite a few folks confirming the issue though)
PC - Corrupt files ( load failed no backup found issue) (Has Google Drive link presumably with world files)
**REPORTED** - 1.4.0.4 corrupted world and character files (Has a zip with world and .bak files)
PC - World failed to load, no backup :( (Has a zip with world and debug output)
**REPORTED** - 1.4.0.4 corrupted world (Has multiple world and .bak files in it)
New game update Corrupted my game files. (No world files)
PC - "Load failed! No backup found" after 1.4.0.4 update (No world files)
My world gone!!! (No world files)
Corrupted world in multiplayer after hitting save and exit with world on the cloud (No world files)
PC - World Bug. "Load Failed! No backup found" (No world files)
My worlds are corrupting after a few play sessions (Has .bak file)


Also shout-out to @Leinfors for grinding through the threads and trying to log all of these. I know it's not easy to keep track of everything and respond to everyone. I really appreciate the work to organize and help expedite the process.
 
Last edited:
Hot damn.

I have a huge list in our internal report for the issue, but that is awesome.

We are looking into improvements for the backup system to try and save people from the random corruptions, even if people will end up with rollbacks instead (that's better than corrupt worlds IMO).

I would recommend people avoid Steam Cloud in the mean time.

Thanks for the huge list, I'll put that in our document as well.
 
Thanks for the update!

At least until the backup improvements are released, do you know how often world backups/rollbacks happen while playing? I'd like to manually back up the world files as we're playing, prior to the "Save and Exit", but I don't know how frequently to save out the files.
 
Well, it shouldn't be rolling back your worlds at all, unless your world is corrupted when loading it, and it tries to pull the backup instead.

When playing on the server, I believe it saves every 10 minutes.
 
IMPORTANT NOTE REGARDING SAVE CORRUPTION

We are aware of some reports of save corruption issues that have been shared lately. This does not impact the vast majority of people, but certainly is cropping up for a handful of folks. A few important things to note first:

  • Always make sure your save process completes before you turn off your PC. Save and Exit, wait for the main menu before shutting down, etc.
  • Be sure to check your antivirus “folder protection” to be sure that Terraria is allowed access to My Documents - this is a common issue that can appear to be corrupt files or even cause crashing.
  • Steam Cloud has some issues from time to time – it is safest to keep local copies of files always
  • Making manual backups (just create a “Backup Saves” folder of your players and worlds is always a great idea).


Beyond the above, we are aware of - and actively investigating - this rare save issue from 1.4 with player's worlds that can result in corrupt saves. During this investigation, we also discovered the game's server code (also used for host and play sessions) – for all versions up to and including 1.4.0.3 – still allowed these corrupt worlds to load and let players play them, however these saves would be missing key components such as whole sections of the world or contents of all chests.

***Once a world is loaded in this corrupt state, and saved, this silent fail causes the loss of valuable information that can help us track down the problem. In 1.4.0.4 we added code that stops the loading once the fail is detected. This is why it appears that 1.4.0.4 is causing issues, when it is actually just flagging/blocking the issue above***



We are doing our best to track this issue down ASAP. If you have worlds that failed loading, PLEASE report these on the forums and attach both the .wld and .bak files to your report. This will be a tremendous help in tracking down and squashing this nasty bug, and we would greatly appreciate it!

Source: Terraria: Journey's End - Hotfix Changelog



My Terraria is on PC, V1.4.3.6, as I'm replying, today is May 27th, 2022, and my corruption occurred between 18:30-20:30.
So this is the second time this had happened to me. I lost two different worlds already to this issue! Couldn't fix the corrupted file no matter what I tried.
I attached the world file. What happened to me was that the WLD file simply disappeared. When I opened the backup (corrupted one, mind you) everything was gone, but the map seemed to remember the most recent data. Even hard mode was gone.
I added the player character if it helps.
 

Attachments

  • Average_Country.wld.bak
    11.3 MB · Views: 30
  • Did_you_know_yo_mama.plr
    2.6 KB · Views: 30
  • Did_you_know_yo_mama.plr.bak
    2.6 KB · Views: 28
Last edited:
Back
Top Bottom