mojira.dev
MC-315

Chunks do not delete properly remaining in a newly created world if the same world name is reused

The bug

I made a superflat world when i noticed a huge structure in the fog. So i closed up on it and it was a chunk from the default world.

How to reproduce

It seems to be kinda random and very rare but I've been able to do it only 4 times

  1. Make a superflat world(default)

  2. Travel around a bit and if you're lucky you'll find one. (I once even spawned in one)

Related issues

MC-204 Error - Superflat MC-227 Some random terrain was made on a new super flat world. I have a screen shot .png to show you. MC-353 failed chunck MC-639 World copy paste? MC-699 World generation MC-762 Hardcore World Not Completely Deleted MC-1091 World generatig bug MC-1152 Beta terrain generation in a superflat world MC-1154 random elevated and depressed chunks in superflat. MC-1234 Chopped Mountains MC-1376 biome bug MC-1395 An Ocean biome chunk cutting into other biomes. MC-2278 Worlds are not fully removed when deleted from within Minecraft MC-2721 Just named worlds can be mixed into each MC-2735 Chunk regeneration MC-2822 Map bug MC-2856 Hills/lakes/rivers are cutted off by chunks MC-3218 Strange Chunk Placement MC-4521 Chunks of Redstone Ready is mixed MC-5001 1.4.6 Prerelease World Gen Error MC-5039 Superflat Generating Issues MC-6714 random areas un flat areas in the setting flatland MC-7216 'Cut-off'ed World Generation MC-7327 Chunk error where ocean chunks spawn inside ice plains. MC-8033 Normal world chunks in SuperFlat worlds MC-8935 Creating a superflat world is glitchy MC-9222 World Generation MC-9270 Minecraft world generating system broken MC-9758 Strange Extreme Hills Generation in 13w07a MC-9893 I thought this was superflat! MC-10550 FlatGrass loads both flat and normal MC-10660 Odd world generation MC-10861 This is not your average world generation glitch. MC-10909 half houses MC-11074 Superflat and Default world merging! MC-11724 Ice Plains biome spawned in my super flat desert world when i loaded it up MC-12141 Epic Land Corruption MC-12302 Random chunks in a particular area are 'empty' (survival) MC-12605 Superflat giant stone tower MC-13160 Superflat chunks appearing in Normal Single player Creative Mode MC-13242 Parts of Super-Flat World Not Flat MC-13558 Missing chunks MC-14110 random chunk generation MC-14641 Strange terrain generation in 13w17a MC-14643 Land generation errors MC-14651 Strange terrain bug - Random desert chunks overlapping world terrain MC-14723 I have found generation bug in the latest snapshot [13w17a] MC-15294 Random Castle Generation MC-15905 Biome Intergration MC-16536 Flat World Chunk Loading Bug MC-16550 Normal world parts in superflat MC-16598 Superflat terrain glitch MC-16768 Major Chunk Errors MC-16936 Chunks from default world loading in Superflat MC-17002 Random chinks of differnt terrain are generated in normal terrain MC-17218 I found a random "block of land" in superflat mode MC-17275 Random chunk generated in middle of ocean biome MC-17331 Chunk of world in superflat MC-17404 Minecraft world re-create MC-17475 World-Generator generate strange structures MC-17572 antvenom seed generation error MC-17989 Chunk generator generates random bioms =/ MC-19109 Buggy Chunk Loading in 1.6 Pre-Release MC-19196 Biomes are spawning in random chunks MC-19686 World generation bug MC-21439 Flatland Glitch MC-21632 Superflat error. MC-21753 World generation buggy!! MC-22292 Worl generation Error - Unmatching chunks look like cutted MC-22493 Missing Chunks MC-22718 Weird World Generation Bug MC-22795 Problems with terrain generator and mobs spawn MC-24523 Strange chunk rendering in 1.6.2 singleplayer MC-24615 World generation issue MC-25946 Terrain Drops with a straight border forming MC-26832 Complete world recreation in hardcore MC-26907 Strange world bug MC-28265 Chunk Error in SuperFlat MC-28358 Really Funny And Strange CHUCNK ERROR MC-28934 Odd generation error MC-29121 um... WAT?! MC-29470 Chunk Loading Errors MC-29524 Lots of chunck errors up with the 1.7 snapshot MC-30521 Amplified world option stops... amplifying MC-30599 Odd box like sections of map raised in air about 50 blocks MC-30657 World generation total failure MC-30715 World generation errors MC-30717 Inappropriate biomes formation and adjoinment MC-30809 Rerrain generation MC-30970 Large biomes, biomes not mixing. MC-31052 Multiple bonus chests appear MC-31200 The Generator For Superflat Didnt work MC-31954 Chunk Generating Error MC-32066 Chunk generation error MC-32340 Default chunks loading in superflat world type MC-33042 Chunk Errors generating MC-33076 Generation of the world. MC-33431 World Generation Glitch MC-33858 world creation bug MC-34303 Square Oceans/Chunk Generation Errors MC-36196 Flat world and Normal World Generating together MC-36409 when I create a superflat world the spawn chunk is a regular chunk MC-36585 misplaced chunks while loading the world MC-36770 Map displays normal world on superflat. MC-37017 World Generate MC-37535 Open MC-37656 Cut of land MC-38060 Random Raised Chunk MC-38724 Chunk errors in 1.7 MC-40170 Superflat world is partially normal world MC-40304 when i want villages and flat land it is not working MC-40776 Some chunks end abruptly MC-41311 Huge Superflat World Error MC-41558 Biomes didn't blend - pure 1.7.2 MC-42058 Weird new world after defeating the ender dragon MC-42124 Flat walls appear INSIDE NEWLY GENERATED AREAS. MC-42139 World generation MC-42285 World deletion fails MC-42491 random single chunks of extreme hills in desert hills biome MC-42666 Biomes not generating correctly MC-44150 MAJOR chunk error MC-44184 RANDOM GENERATION OF THE DEEP OCEAN BIOME MC-44221 Superflat Generation MC-44275 Chunk Errors MC-45435 Mundo mal generado - Bad generated world MC-45693 What? MC-46173 Error generate chunks in superflat world MC-46189 Bonus chest break superflat MC-46483 Major Chunk Errors MC-46849 world dissapiers make a new world with same name same generations as the worlds that disappeared MC-47187 Huge Chunk Error MC-47309 Bad world gen with a random seed (14w05b) MC-48473 Bug generation chunk MC-48803 When I go and make new world delete bedrock and dirt but not the grass it comes up with a noemal world in a super flat MC-48873 Glitched SuperFlat World Generation MC-48887 BAD superflat biomes glitch MC-49192 Abnromal terrain generation after creating and deleting an amplified world MC-49887 Deleting a world while it is still 'generating' then creating a new one with the same name causes chunks from the old world to appear (if you do it quickly!). MC-50796 world gen messed up MC-51102 Server Lagg on Singleplayer MC-51287 Custom Superflat World Generator Error MC-51635 I have encountered a chunk loading bug. MC-51959 Chunk Loading Error MC-52275 Incorrect Chunk MC-52596 classic superflat preset starts loading in the redstone ready preset MC-52686 seed bug MC-52708 Minecraft terrain makes superflat world unflat [no photos acorrding to last issue] MC-52865 Flatworld Generation Bug MC-53047 New world generation bug MC-53057 Major world generation bug in super flat world MC-53137 Odd world generation MC-53531 (Custom Worlds) Chunk Generation MC-54816 Chunck generating error Redstone Ready world, snapshot 14w19a MC-54866 Superflat worlds still generate a non-flat biome once entering. MC-54876 Superflat Worlds Are Broken MC-54976 I came back to my normal superflat, and saw that walls of default randomely grew.It was not there before that day. MC-55132 Generation error with grass on Superflat Redstone World? MC-55387 Trees leaves not spawning on one side of tree MC-56242 World doesn't generate properly in some places MC-59271 Debug mode mis generation MC-59443 Chunk Generation on a "Redstone Ready" superflat preset creates random areas of default superflat worlds. MC-59739 Superflat bug? MC-60630 Weird custom Biome layouts MC-60805 Chunk loading error MC-61102 Chunk errors in new world (bad altitude) MC-61514 Lava Chunks MC-62627 AMPLIFIED terrain generating in Default terrain world MC-62959 The World Regeneration Is glitchy MC-63839 Terrain Generation bugs MC-64092 Bug creating the world MC-64104 World terrain becomes weird MC-64228 Deleting save impossible MC-64388 Creating a world with the same name as a recently-deleted world causes terrain generation issues MC-64636 Flatworld chunks generating normal world terrain (difficult to reproduce) MC-64657 Strange generation and transfer between biomes. The is an instant change as opposed to the usual between a forest and deep ocean biome. MC-65758 Worlds created with same name clash terrains MC-66266 Water Skyscraper world chunks? MC-66385 Chunk of old world erred MC-67366 Generating Fail MC-67747 New creative world replaced by survival? MC-68224 Giant hole MC-69533 Huge World Generation Gliches with seed -630666582824199719 MC-71302 Chunks appear to be scrambled MC-71322 Bug in minecraft MC-72853 Hole generated in a new world MC-73506 Biome/chunk glitch MC-73862 There are sharp wall edges on a minecraft 1.8 multiplayer version on biome changes MC-75047 whole parts of worls have dissapeared in big rectangular chunks - sinkhole? MC-75141 Map Generating Glitch MC-75509 Swapping Chunks MC-76052 Chunks switching biome generation in previously loaded chunks MC-76505 Deep Ocean Customized World Generation Bug MC-77268 1.8.1 "Chunk Glitch" in a single-player survival world MC-80654 normal chunks genning on super flat MC-80849 bad creation world MC-87332 Flatland not generating corectly MC-89075 The Void Make Some Lands Far Away MC-91839 error in map's generation MC-92876 Normal world gen in a superflat world MC-95062 World was set to FLAT LAND and all of a sudden while building a huge wall of water and land is now on my world around the flat land that I was building on. MC-97210 World granting MC-98215 World Generator Bug MC-98277 Worlds are sometimes created with displaced chunks MC-99996 Biome Wall MC-102089 Bad Generation MC-102105 Chunk bug MC-104825 Random Mountain Spawning MC-105222 Chunk Improperly Loaded, Filled with water and gravel MC-106606 Giant Dirt Pillars in Superflat world?! MC-107335 wrong chunks MC-107873 Chunk error MC-109416 World chunks are glitching... MC-111457 RANDOM OCEAN LIKE GLITCH WITHIN SNAPSHOT 16w50a 1.11 MC-114788 Incorrectly generated chunks MC-118869 Weird Terrain Bug When Doing This MC-123245 WORLD GENERATING BUG! MC-124393 Minecraft Glitch ---------------------------------- MC-124648 PODX world glitch MC-125602 World generation problem MC-126047 Various glitches when creating a void super flat world MC-126826 Really weird chunk errors MC-127497 terrain generation error MC-127523 Erronous Chunk MC-128322 Terrain generation issue MC-128705 Random chunks from a deleted world used in Superflat MC-129043 weird block changes MC-129102 Harcore Mode Seems to be Broken in Snapshot 18w16a MC-129530 World Buffet bug MC-129602 Seemingly random world generation crashes MC-129982 Chunks being generated in the wrong places MC-132914 Chunk Errors happen in worlds created in 1.13-pre6 MC-132964 Weird world generation MC-135891 super flat worl link to unflat MC-136203 Terrain generation bug in flat world MC-136906 Creating a world that isn't super flat and deleting it and naming it the same as you called the old world MC-137684 Incorrect chunk generation MC-137703 generation chunk bug MC-137735 World generations Hard lines between Biomes MC-137807 Odd Terrain/Chunk Generation MC-137811 Buffet worlds generate multiple biomes MC-138076 Farlands MC-138542 Chunks bugs MC-138826 IN my super flat world there was chunks of a regular default world everywhere MC-142542 Superflat world generation gone weird.... MC-143253 World Generating issues MC-143316 "Default" world chunks generates in "The Void" superflat preset. MC-143991 Strange Chunk Generation MC-144431 Hardcore death, created NEW WORLD and got the world that i previously died in... MC-144742 creating an amplified world corrupts future "default" terrain generation MC-146772 Flat world generation bug MC-152189 Worlds dissapearing but still in files and unpredictable behaviour when making world with same name MC-190338 Chunk error while loading a Superflat world

Attachments

Comments

migrated
[media][media][media][media][media][media][media][media][media][media][media][media]
James Dolan

Have you tried deleting these incorrectly generated chunks via some third-party program such as MCedit. From the results of this test you could determine whether this is a slight flaw with flatland generation or the game neglecting to read the NBT tags of the save before generating these chunks and therefore generating them as it would with a normal world. This also seams to be the same issue as MC-204.

SteelCrow

Commonly seem when the world name is reused. Old world didn't have time to delete and new one used the same folder name as the old which contained undeleted chunks. We're looking at user error.

George Warner

Ive Seen This Aswell Exept The Biome Was Desert And There Were Jungle Trees and It Was Snowing!!??

RowanSkie

I had it on 1.2.5.

kumasasa

This issue is a follow up of MC-526

Anorma

It is still in 13w04, I can comfirm it.

yarrmateys

one way to fix it could be probably to force minecraft to check for any world files/region folder/DIM* folders present when creating a new world, before world generation and delete them before being allowed to generate new ones. in case any files are inaccessible/read only show an error and return to world creation menu.

unless that's already happening and didn't help.

bugi74

Crude fix
MCP naming...

Minecraft.launchIntegratedServer()

...
    ISaveHandler var4 = this.saveLoader.getSaveLoader(dirName, false);
    WorldInfo var5 = var4.loadWorldInfo();

    if (var5 == null && par3WorldSettings != null) {
        // A new world, ensure deletion of possible old junk and reinitialize var4:
        this.saveLoader.deleteWorldDirectory(dirName);         // ADDED
        var4 = this.saveLoader.getSaveLoader(dirName, false);  // ADDED
            
        this.statFileWriter.readStat(StatList.createWorldStat, 1);
        var5 = new WorldInfo(par3WorldSettings, dirName);
        var4.saveWorldInfo(var5);
    }
    ...

It is kinda bad coding, but I am trying to keep using existing methods. The ugliness comes from that method handling both new and existing worlds, and it needs to init and use both var4 and var5 in order to know if the world is new. But by that time those calls have already created the world directory and a file, which the deletion then immediately remove. Thus it needs to redo the var4 stuff.

The proper fix would be add a new method that specifically checks the existence of world save left-overs and then cleans them up, and use that method from those places which create new worlds (and only create, not open existing ones).

Tested on 1.4.7, works wonders. My messed up results from testing MC-526 and sheep color testing, and even manually "broken" world save directories were all handled correctly. That is, the world creation first wiped the remains of the old directory (confirmed by watching the console and checking that marker files disappeared) before generating the new world with the same directory name.

RowanSkie

Guys, My brother found it he has the one who said me to post it. Sorry!

AgentM

I had this once but than th other way around with the superflat in the middle and default around it...
looked like 'the end of the flatlands'

Thomas Pye

I got this with an extreme hills (which for some reason had jungle trees on it...!?) in 1.5.2

John Distler

Confirmed in 13w22a

Brendan Chow

it did it to me in 13w22a

Brendan Chow

Confirmed in 13w25c

crazyman

Confirmed on 1.1 (superflat introduced) - prerelease 1.6.2
this bug ANNOYS ME!

crazyman

@SteelCrow we are not looking for user error.
Steps to reproduce:
1. Make a world
2. Leave world
3. Delete world (singleplayer ==> select world ==> press delete world ==> Are you sure? YES)
4. Create new world with exactly same world and directory name.
5. Old chunks remains in new world.
This is not user error, this is error in the game code. I'm waiting that someone from mojang fixes this.
In mean time, let's just cuddle :3

bugi74

@crazyman: those steps (as described) are not always enough, as timing is part of the problem. Better description for reproduction in the comments of the related MC-526. (The crucial thing is to do the step from leave world -> delete world quickly; on my machine (SSD drive etc) I have to even exercise a bit (e.g. to know to move mouse cursor to proper spot even before I can see the button to be pressed) in order to be quick enough.)

Apart from the user error part, Steelcrow's comment was otherwise correct, and was one of the comments that allowed me to find the problem code quicker.

As another note, there are more duplicates than votes for this issue. Sigh.

Michael Connel

Please add that it affects Mac OSX.

Galen Dolkas

Im having a similar problem with jungle biomes.

EvilSeph (Warren Loo)

Potentially fixed this issue. I'm not able to reproduce it so I'm not 100% sure. Please test and let me know, thanks 🙂

CubeTheThird

Reopening due to MC-34303

kumasasa

MC-34303 does not necessarily justify a reopening of this ticket, if there are still old region files laying around on the harddisk (by this bug in older versions), then creating the world with the old name in 13w39b will of course show this effect too.

bugi74

Actually, it does justify reopening this issue, but not the related MC-526. This issue is now profiled more about deleting any garbage at the time of taking a possible old folder to be reused - whatever the reason for having that garbage there.

My crude fix shown in a previous comment does just that; even if some ancient stuff is around, they are cleared out first. That action is also necessary even if the deletion process is fixed, as there could still be events which interrupt deletion, like crash or power-down etc. and those can not be avoided or handled at deletion time. They must be handled later, at the time of creating a new world. (A fancy fix might occasionally try to check and cleanup folders that are obviously no longer in use but have some garbage...)

The MC-526 is purely about the deletion itself, when the action is started by the player, but fails to complete (for reasons that can be fixed and avoided). No need to even try to create another world by the same name. This MC-315 is just the most common consequence of the MC-526. But not the only consequence for it, and there are other reasons for MC-315 than having MC-526 first. (Thus, the need to have these separate issues for them.)

kumasasa

Markku, you are absolutely right.

Deleted account

This is still an issue in Minecraft version 14w03b.

kumasasa

@unknown: Please attach the development console when having this issue.

Deleted account

@unknown: Can't get it to work right now, I'll try again tomorrow.

kumasasa

Logfile in https://bugs.mojang.com/browse/MC-526?focusedCommentId=134792&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-134792

Bruce Preston

Confirmed in 14w05b (OSX 10.8.5, log attached).

Just accidentally created a checkerboard of two different worlds due to the deletion of the previous world failing to complete before a new world (with the same name) was created.

I meant to create a new Creative world but created a Survival world by mistake (as "New World"). I quit out to the menu, deleted the Survival world and created a Creative one instead (also "New World"). Creative world has a mixture of chunks from the deleted world and the world that actually goes with the seed given by /seed.

Edit: Actually, this may be an instance of MC-526 instead.

bugi74

Note, the sequence used by Bruce also indicates that MC-526 affects 14w05b (couple more versions than the latest reported). The delete and recreate -sequence, when causing issues, automatically confirms both issues (as both the deletion fails at the time of deletion, and no attempt to clear the old dir is made at the time of creation).

claire

happened to me 2, but when i first spawned it was nt there.. 2 weeks later its like random walls grew. And now my dirt is retextured to look like its glowing.

Dlawso the Really Lucky Rabbit

Unfixable. Searge's comment from MC-62627:

Leaving a world, then immediately deleting it and creating a new one with the same name can, in some cases, cause issues with chunk generation.

Andrew McCluskey

So the problem is actually with the world/chunk generation and not old files not being deleted properly?

Bruce Preston

Andrew, look at the log on my comment. The error being reported is:

[20:24:11] [Server thread/ERROR]: Couldn't save chunk; already in use by another instance of Minecraft?

Basically, old chunks from one world can't be overwritten by worldgen in the next.

Blah, I'd accept "Don't do that then" as a bugfix...

kumasasa

@@unknown: It's the server still saving the world files while the client tries to delete the files:

[00:19:42] [Server thread/INFO]: Saving chunks for level 'Flatworld6'/Overworld
[00:19:42] [Client thread/INFO]: Deleting level Flatworld6
[00:19:42] [Client thread/INFO]: Attempt 1...
[00:19:42] [Client thread/WARN]: Couldn't delete file C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region\r.-1.0.mca
[00:19:42] [Client thread/WARN]: Couldn't delete directory C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region
[00:19:42] [Client thread/WARN]: Unsuccessful in deleting contents.
[00:19:42] [Server thread/INFO]: Saving chunks for level 'Flatworld6'/Nether
[00:19:42] [Server thread/INFO]: Saving chunks for level 'Flatworld6'/The End
[00:19:43] [Client thread/INFO]: Attempt 2...
[00:19:43] [Client thread/WARN]: Couldn't delete file C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region\r.-1.0.mca
[00:19:43] [Client thread/WARN]: Couldn't delete directory C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region
[00:19:43] [Client thread/WARN]: Unsuccessful in deleting contents.
[00:19:43] [Client thread/INFO]: Attempt 3...
[00:19:43] [Client thread/WARN]: Couldn't delete file C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region\r.-1.0.mca
[00:19:43] [Client thread/WARN]: Couldn't delete directory C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region
[00:19:43] [Client thread/WARN]: Unsuccessful in deleting contents.
[00:19:44] [Client thread/INFO]: Attempt 4...
[00:19:44] [Client thread/WARN]: Couldn't delete file C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region\r.-1.0.mca
[00:19:44] [Client thread/WARN]: Couldn't delete directory C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region
[00:19:44] [Client thread/WARN]: Unsuccessful in deleting contents.
[00:19:44] [Client thread/INFO]: Attempt 5...
[00:19:44] [Client thread/WARN]: Couldn't delete file C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region\r.-1.0.mca
[00:19:44] [Client thread/WARN]: Couldn't delete directory C:\Users\User\AppData\Roaming\.minecraft\saves\Flatworld6\region
[00:19:44] [Client thread/WARN]: Unsuccessful in deleting contents.
[00:19:57] [Server thread/INFO]: Starting integrated minecraft server version 14w29b
bugi74

Blah, Andrew and Bruce, and Sonic:
Read my comments in both this issue and MC-526.

  • Both are fixable, and can be quite easily at least improved so much that we wouldn't get 180 duplicates... (And Searge's comment in MC-62627 in no way claims that these are not fixable, he merely states the reason for that issue to be this bug.)

  • The issue is both failing to delete a world properly at the time of deletion, and failing to delete the remains at the time of creating a new one. (The first is obviously good to have, the latter is a must.)

  • "Don't do that then" is a joke, not a valid solution for these issues. These issues are not user errors, but coding bugs.

There are, in a way, two issues caused by one failure. However, both issues should be fixed as the MC-526's "worlds will not delete" can not be 100% ensured in e.g. crash situations (power outages etc.). The world deletion can be made more robust (I've even provided some suggestions of tested fixes). The lingering worlds can be deleted (100%) properly before taking them into new use (I've even provided some tested, though ugly code fixes).

These issues have now been, and has been for last 1.5 years, only waiting for Mojang dev's to adapt those fixes to their code (or make even better fixes if they want).

yarrmateys

one way to circumvent it until fixed would be to rename the newly created world on creation if previous wasn't deleted completely and its folder/files still exist.

say, you make world called "new world", then delete it (but deletion fails) and make a new one called the same. instead of calling its folder "new world" too and causing the bug, just auto rename it to "new world_1" or involve a date+time, like "new world_20140723151905" to prevent multiple attempts to create the same name.

that way even if the world fails to delete, new one won't be able to overwrite its remains, taking some of its chunks in since it'll go to a different folder.

the remaining one could be scheduled to be deleted on next minecraft launch, and if it still fails then, reschedule for next and keep doing it until successful. one pc reset later the folder will be finally freed and will delete normally.

Thomas Bruce

Confirmed 14w30c

Noproct

I have one chunk in my main SSP world, next to my guardian farm in a deep oceanthat does not belong there. It seems that the biome info is overwritten because the chunk is clearly a forrest but every block on it is a deep ocean biome.

KingSupernova

Confirmed in 1.8.1-pre3

Gerottinho

I love how my report on MC-204 is older than this one but still got closed for the reason "duplicated". I'm actually quite surprised I accessed randomly MC-204 and saw I was the reporter, too.

marcono1234

@unknown probably because this report here contained the cause for this bug. It happens sometimes that Mods close older reports because they contained less information

Samuel Finch

I can confirm it for 15w32c

Ari Staggs

Confirmed in 1.8.9. I generated a new superflat world with the dirt preset changed to 50, so it can be deeper. I teleported to 0 62 0, the center of the world, set my spawn, and started building. However, I soon saw a large structure in the distance, and I realized that it was a chunk. I saw a bunch of them, and it was really scary. I deleted that world. The thing is, I had created a world before this, but I forgot to set it to superflat and creative mode. It was normal and was in survival. I suppose that the chunks didn't unload, causing them to load into the superflat world with the exact same name. There was a lake in one of the chunks, and in the superflat world it didn't flow over the edge, so I suppose the chunks just didn't unload when deleting and recreating the world in superflat.

Ari Staggs

I got a screenshot of it.

Nick Eumo

Confirmed in 1.9. Either this or a related bug. Random chunks relocated upon reloading an existing world.

JON

This is awkward... I thought this was removed...

Michael Connel

I'm not sure this is fixable from a developers' standpoint.

The but occurs by deleting a world and making a new one that is named the same thing (as the desc says).

It has to do with the way computers delete things. When a file is deleted, it isn't actually deleted, it's just allowed to be overwritten. So if you create a new world right AFTER deleting one of this same name, it will create the world in the same place on the hard drive, and thus it will pull some chunks from the deleted world.

So that's why it isn't fixable- at least for the developers.

There are workarounds (like 'permanent' deletion), but they are complicated.

bugi74

Michael Connel, this issue is quite easily fixable, just see my comment made 3 years ago. Granted it is quite awful piece of code, but it was just an example. (I do not expect mojang to solve the issue with that code, it just proves it can be fixed with code.)

The way how some operating systems/file systems delete files has nothing to do with this issue. It has more to do with how minecraft does the deletion, server vs. client architecture, and in some cases too quick exit. Note well the related issue MC-526.

Jonathan Haas

@Deano: This bug is bad, but it's not awful and it doesn't plague us for 4 years or something like that. There is a very simple workaround: Just don't reuse world names, if you create a new world, use a name you didn't used before (append a digit or whatever). Then you should be fine.

Alawnely

I think I know the bug: When you create a world and delete it, Minecraft may not be able to delete some chunk files so when you create a new world with same world name and directory name (in saves folder), it will load the chunks in the folder of the world in the saves folder.

I suggest Minecraft developers that if you create a world, it will have different directory name in the saves folder (like in Pocket Edition).

bugi74

Lawrence G. you could have read some comments before adding yours, it is quite often useful. E.g. the one just two comments before yours. Or the 8th from the start... Basically, the reasons have been known for years, we're just waiting for the fix.

FaRo1

Does anyone have tips how to reproduce this a bit reliably?

bugi74

Fabian:
Since this issue is about deleting random left-overs before creating new world into existing directory, it is easy to simulate a situation where the previous world deletion has failed: simply backup random files from a test world before deleting it, delete it, create the directory again if necessary, then copy those backed up random files back into that directory. Create a new world with the same name and compare results, i.e. are the wrong files still in the save directory.

For continued testing, simply store the collection of random files and their world-directory into a zip-file and re-plant them over the deleted world and re-create...

(I didn't test the sequence above, making it up from my memory, but it should give the idea close enough.)

The related MC-526 is much more difficult to test, but luckily this is the more important issue to be fixed and can be tested easily. 3.5 years gone now, plenty of duplicates (more than votes in this issue), nearly trivial to fix and an (somewhat bad) example code given... sigh...

FaRo1

If you put these files in the folder manually, why should they get deleted? I don't see why you should do that except if you want these files there.

bugi74

Read both this and MC-526 through (comments, too), that should clarify things a little.

You asked for a reliably reproducible test for this issue; putting the files there manually is an easy and reproducible test to check if this issue is fixed or not. (Manually putting the files is like simulating the effect of issue MC-526, which is the typical, but not the only reason for hitting this issue later on.) NOTE: not all the files of an old world, just such a subset that makes the game think the world is not there, yet old wrong chunks gets rendered after new world gets created on top of the remains.

When creating a new world, its files are supposed to go into a very specific (and a new) directory. The directory is not supposed to be there, and if it is, there is supposed to be no files in it. Otherwise the world creation should not be allowed to happen to the name used in the first place. (In fact, one could argue that allowing to name the world in a way that leads to issues is already a bug, but such claim is in the territory that can cause heated discussion among developers about bugs, priorities, right and wrong ways to solve things etc. Lets not continue to there.) But since the world creation is allowed to happen with that name, it is, imho, perfectly fine to assume that if there are any files in the way, they are leftovers of a failed removal, or that they are put there manually by a user, and if a user is putting files in such a place where user's manipulation is not welcome (taking backup needs only copying the whole directory, not individual files inside it), it can be assumed he knows what he is doing and is thus responsible for the fate of those files - the game does not need to account for that kind of messing with its operation.

A really fancy fix for this issue would actually check what kinds of files are there, and only remove the ones that are related to this game, and leave other files as is. I have no idea what other kinds of files users could possibly want to put in there, though... perhaps some sort of README-file or such (though such would likely be needed only when dropping in a full world for playing, and thus world creation is not needed or wanted). But in any case, that kind of fancy change would be way beyond just a bugfix, and belongs to wherever they want the feature requests to be put and forgotten.

FaRo1

I think this is similar to MC-63: The game has to do things after each other and the calculation speed is limited. So if it crashes halfway through saving or deleting, that can't be fixed in all instances. In this case it could delete the folder before creating something or forbid saving in an existing folder, but e.g. in MC-63 there has to be one thing before the other: If it saves the inventory first and then the entites, you can make it crash in between and duplicate items. If it does it the other way around, people who have a crash in between can lose items. One of those two will always happen.
In this case: If you don't allow the process javaw.exe to be killed while deleting a world, you could cause other problems if the world deletion goes into an infinite loop for some reason and the program doesn't want to get quit so that the whole computer lags or whatever.
In short: If a program gets closed from the outside (crash, task manager, ...), it's often impossible to prevent some errors.
(And yes, I've understood now how to reproduce.)

bugi74

MC-63 is sort of similar to MC-526, not to this. At least the way these two issues are split now (and should stay split). MC-526 is about the failure of deleting after doing that delete-action; this is about failing to clean up the possible left-overs when doing create-action. Possible crashes during creating a new world are much easier to handle, even when there might be something to clean up first.

This issue is more important to fix (and easier, too), because it is indeed pretty much impossible to ensure 100% certain deletion (crashes etc.) Put more simply; fix only this easy one and MC-526 (and other causes) will not matter as much (and won't be seen in the game, only in the filesystem), but if only MC-526 is fixed, there will still be issues caused by other reasons (thus not as often).

(There are still ways to handle the MC-63 sort of properly, i.e. either everything gets saved (pure success) or nothing gets saved-and-later-loaded (pure crash), but it gets quite deep in the coding (somewhat common exercise in business critical systems, though), more than suitable to paste here, should someone even get the motivation to try and do such fixes.)

EchoBlade

You can delete the level.dat and level.dat_old of a world folder and recreate a new world under the same name, and then you will get this bug. It's kind of awesome, though, because you can use it to make survival island maps easily. Try making a world using the seed "Flame", with the name "Broken Chunks", exiting, deleting the level.dat and level.dat_old files, and then making the world Flame again, but on a Customized world type where the only biome is Ocean. It's pretty awesome.

ouroya

1.10, creating a superflat world, then deleting and creating a non-superflat world can "force" villages into weird generations.

ouroya

1.10,
1. create default world 00000
2. re-create it
3. delete level.dat and level.dat_old from files
4. create superflat world Copy of 00000
5. remakes the original, but only the loaded section. around it is superflat
NOTE: this breaks potions

CubeTheThird

Please avoid re-editing your comments. Every time you do, an email is sent to those watching this report, which now makes for many emails. I also recommend you set your name to something that isn't blank.

gaspoweredpick

I was playing survival mode on singleplayer, and i went caving in extreme hills, then i got out and all the sudden i saw a huge tower of extreme hills generated in the plains that wasn't there before. there was no lag or relog, it just appeared.

Joseph Fowler

Still present in 1.11

Shawn Baird

So I've seen this happen a decent number of times. I regularly play hardcore and just use New World to get a random seed. I always delete my old hardcore game when I die, but currently that means telling it once when I die, but that doesn't really delete it, so an additional time selecting it from my game list and then deleting it and confirming the deletion.

If the window between my deleting the old world and the new one is too small I'll often see this bug. Is there really a reason that the delete operation can't just block until it is truly deleted?

Greg Milson

Affects 18w21b

wobst.michael

@unknown, ticket is yours now

PoolloverNathan

I do not play Java, but it sounds like the instructions are different.
Maybe they are:

  1. Make a normal world and write down what you named it (you need it later)

  2. Delete the world

  3. Quickly create a world with the name you wrote down, but make it Superflat this time

  4. Move around quite a bit and you should find chunks from the normal world

Nixinova

Replace superflat with buffet and this happens as well

FaRo1

No, they are exactly the same.

FaRo1

Oh, you meant it the other way around. Yes, you're right.

galaxy_2alex

I am unable to reproduce this in any way. Please add the console log, as well as concrete steps on how to reproduce this issue, as the current provided steps are not sufficient.

Misode

I'm unable to replicate this either with the steps that Nathan provided. @unknown are you sure this is still happening? If so please edit the description and specifically the steps to reproduce.

bugi74

Do read the comments; the reproduction is not deterministic if using only Minecraft (one would need really tight timing and luck), and the reproduction steps in the description are woefully inadequate.

From my memory, from years back, so might not work as is, but... a better process could be:

  1. create world with specific name

  2. exit game

  3. delete certain world save files (enough to make the game think the world is not there), but leave some chunk data files. This manual step simulates effects of world deletion being incomplete (for reason or other, e.g. MC-526).

  4. start game again

  5. create a new world (random or explicitly different seed) with that same specific name

  6. move around to notice chunk issues

Note also the relate issues MC-526 and its comments.

numeritos

Unable to reproduce with the steps @@unknown has provided, Minecraft always creates a (1) folder instead of using the older with the old files, tested on 1.16

bugi74

I can confirm the fix. Game now detects existing folders (that do not have complete saved world), and add a counter ( (1), (2), ...) in the end of the directory name when creating a new world with the same old name.

Funny detail: if naming the new world like "name (1)" (i.e. includes the counter in the name) and there is already such directory, game will add another counter, saving to "name (1) (1)".

Even if the bug isn't fixed, per se, as the garbage save data is still left there, the solution fulfills the overall goal of not getting wrong chunks in a new world. I thus consider this issue as good as fixed.

numeritos

Unable to reproduce in 1.16.1 and 20w27a

Video: https://youtu.be/LMtDccVBYfo

bugi74

I would think the correct resolution is "fixed", since it was reproduced plenty of times before. "Cannot reproduce" resolution (at least in the meaning I've seen it used usually) basically would mean the issue could not be confirmed by testing at any point (thus not valid issue) 😛, which obviously isn't the case here.  Yeah, yeah, I'm nitpicking, while happy it has been fixed. Finally.

CubeTheThird

If you are able to provide the game version upon which this was fixed, I can try to update accordingly.

FaRo1

It has always been the normal thing to just pick any reasonable version then. "Cannot reproduce" is simply false. It also suggests that people are supposed to try to reproduce it, which would just waste time in this case.

violine1101

Policies can change.

If we just pick any random version as fix version, it's a false statement as well. Nevertheless, this is not the place to discuss that.

Nathan Welch

Greg Milson

(Unassigned)

Confirmed

Normal

Chunk loading

chunk, mojang_internal_1, rendering, superflat-world, world-generation, world-name

Minecraft 1.4.1, Minecraft 1.4.4, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w05b, ..., 1.14.4, 19w40a, 1.15.2, 20w08a, 20w10a

Minecraft 13w38a

Retrieved