Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

A possible fix for corrupted worlds.

Discussion in 'General' started by Gilgamesh, Jul 29, 2014.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Gilgamesh Trainee Engineer

    Messages:
    3
    Greetings everyone,

    First of all, sorry if i am posting information that was already posted by someone else. I'm rather new on the forum and had no time to read all of it.

    Well, as the title says, I managed to uncover the possible cause of most corrupted saves. I'll try to explain as much understandable as possible, altought it might be rather easy.

    As everyone knows, our worlds are saved on a folder inside the Appdata user (you can access it by typing on your search box or Run command [Windows logo button + R] for the keyword %appdata%). A folder that is named Space Engineers and inside it, a folder named Saves. Inside there, it contains lot of other folders, that I techinally don't know why they're named in such way (Steam ID plus game version ... who knows)

    The main fact is: inside these folders and exploring, you might find the saves with the same name as your worlds' names. Inside one, it has a file named Sandbox.sbc

    Open this file with Notepad program. You'll see that it has lot of code lines. Analyzing the entire file, I managed to find what could cause the corruption. At the last code lines, I found this part, copied below

    -----
    <AppVersion>1036009</AppVersion>
    <PlayerNames>
    <dictionary>
    <item>
    <Key xsi:type="xsd:unsignedLong">76561197960270647</Key>
    <Value xsi:type="xsd:string">�B��</Value>
    </item>
    </dictionary>
    </PlayerNames>
    </MyObjectBuilder_Checkpoint>
    ----

    You see that on the 6th line, it appears some weird characters [��]. That occurs because of some file writting error or maybe some developing glitch, not sure. (On my one, that mostly appeared on version 1.0.37, when I tried to save, all my worlds got corrupt this way). These characters cannot be interpreted/read by the game's compiler, that shoots out an error box saying the world is corrupt and cannot be accesed anymore, or something like this.

    The easy way to "repair" your file is... erasing the whole line, or at least everything between the <line> and </line>, or any paramenter that contains the corrupted line [so, in a way, the interpreter will understand that <item> has no value and will pass straight]. Doing this simply made my world accessible again.

    I am not sure if this might happen in other files like SANDBOX_0_0_0.sbs, but if it does, might be the same problem.

    I am still debugging the game files, sometimes using Notepad, sometimes using SEToolBox. If you guys have any doubt or question, feel free to post it.

    That's it. I hope this information helps you people. I'll might make a video so, with images, it might become a lot more understandable.

    If you people have any doubts or questions (or wanna say anything about the post), don't hesitate in answer. Feedback, please.

    Cya all and see you on the wild space!
     
  2. Jaften Trainee Engineer

    Messages:
    2
    I'm getting a "corrupted world, cannot load" error on any world, regardless of whether or not it's a saved game, new world (both quick and custom start), or Steam workshop world.

    Yes, I did use some mods—but only once direct mod support had been added into the game, and not before then, so I haven't once directly altered my game files.

    Besides, while I'd understand it if a world that had mods active broke for whatever arbitrarily stupid reasons (goddammit, Oblivion...), it doesn't make even a little sense to me for the stock worlds to be corrupted before I could <em>even load them up for the first time.</em> This suggests that whatever code that is used to process and load saved games and "world templates" (or whatever the files are referred to in SE) itself somehow got corrupted. How, I don't know—like I said, I haven't touched the actual files nor used any programs that would alter their data. Besides that, I personally couldn't have done anything to these files, because—before reading at this thread today—I didn't even know exactly where the individual files were located!

    Does anyone have any suggestions as to what I might be able to do, other than reinstalling? I'm about ready to do that, but I'd like to get a second opinion.
     
  3. alteffeight Trainee Engineer

    Messages:
    8
    Jaften -

    Same issue here. I even uninstalled all mods and I still cannot load any existing worlds or create new ones (including Quickstart).

    Going to try a reinstall next.
     
  4. Wizlawz Master Engineer

    Messages:
    3,028
    was following step by step this .... and when i opened it,...it looked like alien writing to me...couldn't read any of it
     
  5. cantchoos Trainee Engineer

    Messages:
    6
    Thanks man for trying to help others, my world got corrupted and thankfully i constantly publish to steam workshop now to prevent anymishaps.
     
  6. mo8ius Apprentice Engineer

    Messages:
    129
    Did you try the known fix for this issue? (is yours an alternative fix?)

    http://forums.keenswh.com/post/01-044-update-mega-bug-thread-world-file-is-corrupted-and-cannot-be-loaded-fix-7047887?pid=1284004901#post1284004901

    In essence: Delete your Data folder and verify SE on Steam (to re-download a fresh copy of the Data folder).

    That and removing any mods that affect .sbc files fixed it for me (so I just removed the Endless Carrgoships mod until Felix can fix it). I still have 20+ mods loaded and it's running fine.

    Before I did this every world was corrupted and couldn't load. After I did this every world loads with no issues at all.
     
  7. Kochean Trainee Engineer

    Messages:
    65
    All I had done is remove the small ship glass from my mods and everything worked. I guess there was something in there it did not like.
     
  8. wartank Trainee Engineer

    Messages:
    32
    Although its nice to see how much effort you put in this, �� are not corrupted characters. Its a way of notepad to display characters that are not in your current character set. For example it could be one of those german b's (http://en.wikipedia.org/wiki/%C3%9F). When opening the file with a ASCII char set this will display fine. But if you open it with UTF-8 you will see a �. So the fact that your text program (like notepad) cannot read it doesn't mean the space engineer game engine cant.
     
  9. Mansen Apprentice Engineer

    Messages:
    481
    Binary is what is is - And you should never try to read that. It's like opening a compressed image in Notepad and expecting it to make sense...
     
  10. wartank Trainee Engineer

    Messages:
    32
    xml files are not binary (or cbr..c...cb..whatever dummy extension keen software house gave to it)
     
  11. g4borg Apprentice Engineer

    Messages:
    271
    you can store binary data in an encoding (i think it was BASE64) in XML tags. I think he meant that.
    That would mean, it looks like junk, but it's actually binary data formed to be embeddable into XML.
     
  12. Gilgamesh Trainee Engineer

    Messages:
    3
    Well, nice to see that my topic helped somehow (it is nice to see some replies after 1 month of silence. I was starting to think I wrote bullshit or no one was really having this problem anymore).

    Well, indeed these �� are not corrupted words or letters, but only information that is not interpreted nor by Notepad nor by the SE compiler, just XML code written with a different unicode system (make an analogy with "languages) , and that is one of the causes that may lead to the unexpected "corrupted world".

    I'll keep debugging the native SE files to try find any kind of weird problems that may lead to these kind of errors. Hopefully, I haven't faced any other world corruption since v1.38, i guess.

    In time, I had notice that some mods also modify data in some native SE files and may lead to world corruption as well, but not on these files I mentioned. As I don't use mods yet, but it is a good practice to search this kind of mishandled code on mods files and in native files after mod insertion.

    That's it. Keep replying with any information you guys find. And again, glad to see that post was helpful.
     
  13. brainsuker Apprentice Engineer

    Messages:
    189
    I have a weird error after my computer crash yesterday. My world is corrupted. When I push the "Load" button at the main screen of Space Engineers, I got a message that say "One of the world / file is corrupted, and can't be load. See log for detail", and my corrupted world does not even appear in my "Load Screen" in the game.

    Then I started my SETool, but it didn't help. In my SETool load screen, the world was identified by "Corrupted File", and I can't repair it with the program. So I start to browse the forum.
    The first thing I did was to followed one of the solution in the forum. By open new world, then copy paste the file into the corrupt file, It didn't work. Then I found this thread, and open my sandbox.sbc file with notepad. And what I found there? Nothing! Nothing at all! The file is empty, even when the window Explorer said that the file has 40kb in size.

    So what should I do to save my ship in this world? I have quite a number of ship design that I don't want to part with, as I spent many days with it. I tried to create new world and copy the sandbox.sbc to the corrupted world directory and change the name. But it didn't help, as I don't know how to connect to the sandbox_0_0_0sbs.sbs file (zero programming knowledge here).

    Can someone help me?
     
  14. Dreokor Senior Engineer

    Messages:
    1,606
    sandbox.sbc file empty?

    Most likely crash during autosave. Pretty sure you lost everything.

    Always blueprint your stuff, make backups of saves and do not use autosave, save manually.
     
    Last edited by a moderator: Mar 29, 2015
  15. brainsuker Apprentice Engineer

    Messages:
    189
    Is there a way to extract my ship from the sandbox_0_0_0sbs.sbs?
     
  16. Burrrr Trainee Engineer

    Messages:
    3
    The same thing happened to me as brainsuker... World file is corrupted, and Sandbox.sbc has nothing in it.... It actually does have stuff in it, if I open it in notepad the characters are invisible. If I open it in Notepad++ everything is 'NULL' all on one line.

    Also, Autosave is off, I never have it on.
     
  17. chrisb Senior Engineer

    Messages:
    1,460
    SE Toolbox may help with some of these problems.
     
  18. Burrrr Trainee Engineer

    Messages:
    3
    Nope, It just crashes when I try to repair the saves... It also is saying "Invalid saves" for the corrupted ones :c I used to have 10 worlds now I only have 2 uncorrupted
     
  19. chrisb Senior Engineer

    Messages:
    1,460
    Have you tried opening 2xSEToolbox, then opening 2 different corrupted worlds. If you sort of know what was the last thing you did prior to them being corrupted i.e. what you added, remove (drag & drop) from one into the other temporarily go into game and see if the one you removed it from, opens. If not put it back and try another. Might work.
     
  20. Burrrr Trainee Engineer

    Messages:
    3
    SEToolBox wont let me open the corrupted saves because they're 'Invalid Saves' as it says. and it just crashes when I try to repair them
     
Thread Status:
This last post in this thread was made more than 31 days old.