Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Corrupt Save File? (Singleplayer)


  • Please log in to reply
7 replies to this topic

#1

Mdb8900
    Mdb8900

    Tree Puncher

  • Members
  • 13 posts

Posted 19 December 2010 - 11:48 PM

I was briefly paused in my singleplayer game when my computer crashed. Here's the error report.

--- BEGIN ERROR REPORT a1dce528 --------
Generated 12/19/10 5:36 PM

Minecraft: Minecraft Alpha v1.2.6
OS: Windows XP (x86) version 5.1
Java: 1.6.0_20, Sun Microsystems Inc.
VM: Java HotSpot™ Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 7950 GT/PCI/SSE2 version 2.1.2, NVIDIA Corporation

java.lang.StackOverflowError
at java.lang.Exception.(Unknown Source)
at java.io.IOException.(Unknown Source)
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)
at java.io.OutputStreamWriter.flushBuffer(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at java.io.PrintStream.print(Unknown Source)
at java.io.PrintStream.println(Unknown Source)
at mu.a(SourceFile:59)
at gs.c(SourceFile:91)
at gs.b(SourceFile:58)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
at gs.a(SourceFile:122)
at gs.b(SourceFile:74)
        (It continues with the above two lines (122 & 74) repeating for about 100-200 more lines)

I'm pretty sure the save file got corrupted when it was trying to save in the menu screen and was interrupted. I am wondering if there is a simple way i can go in and remedy these values on the save file to make the save work, or if there is any way to fix it?

Currently when I try to log onto the save file (World 1 - 2.17 MB) it will go through the simulating process, and sometimes it will actually log in and show me where i was standing, but it will always crash with this error report.

*Edit* I have been playing around with it a little more, and it appears i can log on to the pause screen, and it will show "Saving level" in the bottom left, but it will start blinking rapidly after a short while. I can't press "Back to Game" without it crashing.

Any suggestions?

Register or log in to remove.

#2

Mdb8900
    Mdb8900

    Tree Puncher

  • Members
  • 13 posts

Posted 20 December 2010 - 12:55 AM

Bumping for answer.

#3

OGmindcraft

Posted 22 December 2010 - 03:09 AM

I have the exact same problem, please help

Edit:
Not exactly the same, It starts different but ends up listing the at 122 and 74 thing over and over, just like OP

#4

molkemon
    molkemon

    Tree Puncher

  • Members
  • 12 posts

Posted 22 December 2010 - 03:29 AM

This happened to me too, I guess when Minecraft crashes while the Level is being saved, bad things can happen (the exact problem seems to be that a chunk, that's a 16x16x128 block space in the map, gets corrupted. It's a bit hard to tell which chunk exactly is affected, but the World will crash only seconds after being loaded. I eventually "solved" the problem doing this:

1) Backup your save files. (c:/users/your_name/appdata/roaming/.minecraft/saves .... appdata is a hidden folder).
2) Download MCEdit. viewtopic.php?t=15522
3) Play around with the tool a bit, as long as you don't press CTRL-S, none of the stuff you do will be saved. Once you figured out what does what,
4) Select the part of the map where you have built your stuff, then call the function for DELETE F*CKING EVERYTHING except what I have selected (I really can't remember the real name of the function, but its in the chunks menu.. something like prune everything except selection). This will cause the entire map to be purged except your selection, which should be the stuff you previously built.
5) If done correctly, press CTRL-S. If you made a wrong selection, DON'T press CTRL-S, instead close MCEdit and try again.
6) Load the World in Minecraft and cross your fingers. If the corrupted chunk was inside the part of the map you tried to save, you are out of luck. However, if you get a bit lucky, the problematic chunk is now gone. In fact, Minecraft will randomly generate a new world around the part of the map you saved. So expect at least a new view from your bathroom window :Diamond:

A last word of warning: When successful, the map generator will fill the world up again. While this is basically good, there seem to be some... glitches with adding stuff to an already existing world. It's nothing serious, but don't start to wonder if your run into ENORMOUS caves that take like forever to explore, or 3 dungeons right next to each other and stuff. I had to switch to peaceful now and then because even when just running around like a lunatic throwing torches everywhere, the almost endless amount of enemies was just too overwhelming and it would have taken like weeks to clean out that cave *g*

I wish you guys luck :Diamond:

Oh and to prevent such problems in the future, it's generally a good idea to make backups of your save files every now and then^^

#5

OGmindcraft

Posted 22 December 2010 - 05:17 AM

Molkemon is definitely right about it being a corrupt chunk. I just noticed if I look at the dos window right before it freezes it says something like "Chunk file 25, 0 is in the wrong location: relocating (expected 25, 0. got 26, -1)".

I was able to temporarily fix this by using MCedit to move my character far away, but as soon as I walk close enough I crash again.

Since I have the coordinates of the chunk, I could in theory delete them. I have no idea how to actually use those coordinates to locate the chunk though. Anybody know what to do from here? I don't want to have to delete the entire area that makes minecraft crash or have to generate a new level or do what Molkemon said.

I have also learned my lesson to backup my game from now on.

#6

XLawless BaronX
  • Location: W.A. Perth Australia you pervert
  • Minecraft: XLawlessBaronX
  • Xbox:XLawless BaronX

Posted 22 December 2010 - 05:20 AM

I like backups you should have made a backup mann

#7

OGmindcraft

Posted 22 December 2010 - 06:46 AM

PROBLEM SOLVED!

I was able to find the corrupt chunks in MCedit. There were 6 of them, most were very easy to locate but a couple blended in pretty well so I had to look really closely. I was EXTREMELY stupid for not trying this before. I just flew around in MCedit to the area where it crashes and there were giant square chunks sticking out of the ground(or into the ground). I selected the entire chunks, deleted the blocks, deleted the entities, and finally deleted the chunks. I'm not sure if the first 2 steps were necessary though. After I deleted them and went to the area again in minecraft they regenerated just fine with nothing looking out of place.

http://bayimg.com/iAbHOAadj


For anybody that wants to know how just make a small selection anywhere on the surface inside the chunk that looks out of place, then click "select chunks". Then delete blocks, delete entities, and finally click the button on the bottom that says "chunk control" and delete the chunk. Again, I'm not sure if deleting blocks or entities is necessary, I highly doubt it though.

#8

molkemon
    molkemon

    Tree Puncher

  • Members
  • 12 posts

Posted 22 December 2010 - 02:47 PM

Good to hear you got it figured out, however, not everyone might be able to just locate the problematic chunks by flying around the problematic area, as they may be underground and hard to spot, that's why I suggested to rather safe what you've built and delete everything else.

The problem with locating the problematic chunks is that Minecraft uses a threedimnsional coordinate grid (x*y*z), but the console output describing the location of the chunk only gives a x*y coordinate which makes it hard to figure out where that is.

As far as I understand it, when you generate a map, 81 chunks are generated around your character, however, I haven't figured out yet in which manner those chunks are represented on a coordinate grid. I'm pretty sure though that your spawn point would be 0,0 on that grid, and then it goes both ways on the x and y axis, but I don't know which direction the x or y axis grow (e.g. if the x-axis is north/south or east/west, and which of those diretion are giving +x or -x). Since a chunk covers the entire height of the map, additional problems arise when the problematic part is underground as it would be very hard to spot.