[MC-526] Worlds will not delete Created: 25/Oct/12 Updated: 11/Jan/21 Resolved: 23/Apr/19 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.1, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w02b, Snapshot 13w09a, Snapshot 13w09b, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 13w42b, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w03b, Minecraft 14w04a, Minecraft 14w04b, Minecraft 14w05a, Minecraft 14w05b, Minecraft 14w29b, Minecraft 1.8, Minecraft 1.8.3, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 1.10.2, Minecraft 1.11.2, Minecraft 18w06a, Minecraft 18w21b |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Kelton Chesshire | Assignee: | Unassigned |
| Resolution: | Awaiting Response | Votes: | 19 |
| Labels: | client, delete, server, world | ||
| Environment: |
Windows 7 |
||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Category: |
(Unassigned)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
The bugWhen trying to delete a world, the world would still show up in the single player world selection screen. I was expecting the world to delete, but instead it just stayed in the world selection screen. To trigger this, create a world, (I just did creative, I don't know about survival) and attempt to delete it. Code analysis / reasonSee the following comments Solution ideasSee the following comments
|
| Comments |
| Comment by [Bot] Arisa [ 11/Jan/21 ] |
|
This report is currently missing crucial information. Please take a look at the other comments to find out what we are looking for. |
| Comment by Galaxy_2Alex [ 23/Apr/19 ] |
|
I'm unable to reproduce this on 1.14-pre5 on a slow harddrive, can someone else still reproduce this? If so, I will make you the reporter of this ticket so you can keep it updated. |
| Comment by Markku [ 03/Apr/19 ] |
|
Assuming they haven't changed the deletion process since... years... the two ways/reasons why things fail have been figured out (buried in the comments of this and the related issue). Also some ways to work around them (at code level) have been provided (but not a nice proper fix, as that would have been too big a change to be shown here). This bug is mostly waiting for some developer to fix it (at least a workaround, but even a proper solution is not really that difficult), or users to just confirm they still find the symptoms. |
| Comment by user-2a4c8 (Inactive) [ 03/Apr/19 ] |
|
confirmed 19w13b. Created a world, joined it, left, clicked delete after clicking it, and it would freeze for a moment than still hang around. I believe it has something to do with the game hanging onto some files not allowing them to be deleted since they are still being used. You can not delete the world from the saves folder either unless you close the game. |
| Comment by Markku [ 28/Aug/18 ] |
|
I can not test this on my current setup as easily any more, as I now have quite a bit faster SSD than few years ago, so any saving will happen in a blink (thus preventing this bug to appear). Also, the user interface was slooow this time, giving more time for the saving to finish (as if it even needed it); no idea if that was due to my setup or changes in the game. That is, whether the bug is fixed or not, I would not be able to get this bug to happen at current setup. I would either need to change things so that saves go to a slower device (HDD), or spend lots of time to decompile etc. and tweak the saving process to be artificially slower. Not going to waste my time with the latter any more, so have to try by changing the save directory to a HDD... some day Soon(tm). |
| Comment by Kraif [ 28/Aug/18 ] |
|
Cannot reproduce for 1.13.1, is anyone else able to reproduce it? |
| Comment by Leo-Or Zyngier [ 30/Mar/17 ] |
|
its still a bug but it shouldn't bother you to much because you can delete it from the saves folder i think it just might be a problem that for some reason you computer didn't "want" to delete the file |
| Comment by Marcono1234 [ 15/Jul/16 ] |
|
The client thread could maybe call the join() method of the server thread. This way the client continues once the server thread finished. But then the client would appear as not responding. Maybe the server should call a method of the client once it finished saving. Until then the client displays some GUI and waits for the server. |
| Comment by Markku [ 15/Jul/16 ] |
|
A late idea for a solution base: move the deletion activity to server-side, while a client only requests the server to do that action. Server can then decide (if or) when it will fulfill that request. In single-player mode this may still be a bit iffy to do, depending on how its "server" gets started and/or connected; with brute-force implementation, it might create another server instance (while the old one still saving and shutting down), and you'd still have the root cause of two processes not knowing about each other or their states. In any case, it would be closer to the correct solution, using the chosen client-server -model for this action, too, even in single-player. |
| Comment by Marcono1234 [ 14/Jul/16 ] |
|
Confirmed for
Like bugi74 said, the problem is that deleting a world is client-side and does not test if the server already finished saving the world. This can be reproduced by having the method net.minecraft.server.MinecraftServer.stopServer() wait for some seconds before starting to save the level. |
| Comment by Markku [ 21/Jun/15 ] |
|
Ooops, I wrote/remembered that the wrong way around. Slow computers might get enough delay in leaving the game, so that server has time to finish saving, and thus deletion will succeed. It is the fast computers (and with quick users) that may reach the deletion too quickly. (Even with my relatively fast computer, after learning where to move the mouse to "blind click" the right places, I could not reproduce this on every try.) Reproducing this issue easily and predictably requires (or required) tweaking the code a bit; that would be for the devs to do, whenever, if ever... For this particular bug, the expected status should be always "still broken unless devs actually inform to have tried to fix it", as it is too difficult for the users to verify. |
| Comment by Marcono1234 [ 21/Jun/15 ] |
|
I tried the 8th comment but when I click to early "Save and Quit to Title" Minecraft just stops responding for some seconds |
| Comment by Markku [ 21/Jun/15 ] |
|
Marcono1234, see 8th and 12th comments. At least one way (that worked back then). However, it was tricky to execute, requiring some care with (quite fast) timing, at least on my PC. (EDIT: remembered this the wrong way around: |
| Comment by Marcono1234 [ 21/Jun/15 ] |
|
Can't really reproduce in 1.8.7 Is it possible to provide other steps to reproduce it? I know that I had this in the past as well but I don't know what caused it |
| Comment by Kumasasa [ 25/Jan/14 ] |
|
No need to, I had the issue right now: [01:26:00 INFO]: Client> [01:26:00] [Server thread/INFO]: Preparing spawn area: 95% [01:26:01 INFO]: Client> [01:26:01] [Server thread/INFO]: Changing view distance to 12, from 10 [01:26:01 INFO]: Client> [01:26:01] [Server thread/INFO]: Kumasasa[local:E:47b547ea] logged in with entity id 573 at (-123.5, 71.0, 260.5) [01:26:01 INFO]: Client> [01:26:01] [Server thread/INFO]: Kumasasa joined the game [01:26:07 INFO]: Client> [01:26:07] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 4896ms behind, skipping 97 tick(s) [01:26:10 INFO]: Client> [01:26:10] [Client thread/INFO]: [CHAT] You do not have permission to use this command [01:26:12 INFO]: Client> [01:26:12] [Client thread/INFO]: Warning: Clientside chunk ticking took 125 ms [01:26:12 INFO]: Client> [01:26:12] [Server thread/INFO]: Saving and pausing game... [01:26:12 INFO]: Client> [01:26:12] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [01:26:16 INFO]: Client> [01:26:16] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [01:26:16 INFO]: Client> [01:26:16] [Server thread/INFO]: Saving chunks for level 'New World'/The End [01:26:17 INFO]: Client> [01:26:17] [Server thread/INFO]: Kumasasa lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}} [01:26:17 INFO]: Client> [01:26:17] [Server thread/INFO]: Kumasasa left the game [01:26:17 INFO]: Client> [01:26:17] [Server thread/INFO]: Stopping singleplayer server as player logged out [01:26:18 INFO]: Client> [01:26:18] [Client thread/INFO]: Deleting level New World [01:26:18 INFO]: Client> [01:26:18] [Client thread/INFO]: Attempt 1... [01:26:18 INFO]: Client> [01:26:18] [Client thread/WARN]: Couldn't delete file C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region\r.-1.0.mca [01:26:18 INFO]: Client> [01:26:18] [Client thread/WARN]: Couldn't delete directory C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region [01:26:18 INFO]: Client> [01:26:18] [Client thread/WARN]: Unsuccessful in deleting contents. [01:26:19 INFO]: Client> [01:26:19] [Client thread/INFO]: Attempt 2... [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Couldn't delete file C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region\r.-1.0.mca [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Couldn't delete directory C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Unsuccessful in deleting contents. [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Stopping server [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Saving players [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Saving worlds [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [01:26:19 INFO]: Client> [01:26:19] [Server thread/INFO]: Saving chunks for level 'New World'/The End [01:26:19 INFO]: Client> [01:26:19] [Client thread/INFO]: Attempt 3... [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Couldn't delete file C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region\r.-1.0.mca [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Couldn't delete directory C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region [01:26:19 INFO]: Client> [01:26:19] [Client thread/WARN]: Unsuccessful in deleting contents. [01:26:20 INFO]: Client> [01:26:20] [Client thread/INFO]: Attempt 4... [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Couldn't delete file C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region\r.-1.0.mca [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Couldn't delete directory C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Unsuccessful in deleting contents. [01:26:20 INFO]: Client> [01:26:20] [Client thread/INFO]: Attempt 5... [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Couldn't delete file C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region\r.-1.0.mca [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Couldn't delete directory C:\Users\Ivo\AppData\Roaming\.minecraft\saves\New World\region [01:26:20 INFO]: Client> [01:26:20] [Client thread/WARN]: Unsuccessful in deleting contents. Created again "New World" and having mixed flatland and default world type: [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Starting integrated minecraft server version 14w04b [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Generating keypair [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Converting map! [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Scanning folders... [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Total conversion count is 0 [01:26:50 INFO]: Client> [01:26:50] [Server thread/INFO]: Preparing start region for level 0 [01:26:51 INFO]: Client> [01:26:51] [Server thread/INFO]: Changing view distance to 12, from 10 [01:26:51 INFO]: Client> [01:26:51] [Server thread/INFO]: Kumasasa[local:E:76ba54ad] logged in with entity id 3267 at (35.5, 73.0, 71.5) [01:26:51 INFO]: Client> [01:26:51] [Server thread/INFO]: Kumasasa joined the game [01:27:02 INFO]: Client> [01:27:02] [Server thread/INFO]: Saving and pausing game... [01:27:02 INFO]: Client> [01:27:02] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [01:27:02 INFO]: Client> [01:27:02] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [01:27:02 INFO]: Client> [01:27:02] [Server thread/INFO]: Saving chunks for level 'New World'/The End [01:27:48 INFO]: Client> [01:27:48] [Server thread/INFO]: Saving and pausing game... [01:27:48 INFO]: Client> [01:27:48] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld [01:27:48 INFO]: Client> [01:27:48] [Server thread/INFO]: Saving chunks for level 'New World'/Nether [01:27:48 INFO]: Client> [01:27:48] [Server thread/INFO]: Saving chunks for level 'New World'/The End |
| Comment by Deleted account [ 24/Jan/14 ] |
|
kumasasa: Can't get it to work right now, I'll try again tomorrow. |
| Comment by Kumasasa [ 24/Jan/14 ] |
|
Jar_: Please attach the development console when having this issue. |
| Comment by [Mod] Ezekiel (ezfe) [ 17/Jan/14 ] |
|
Is this still a concern in the latest Minecraft version 14w03b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Markku [ 19/Oct/13 ] |
|
The "Failed to check session lock, aborting" is revealing, and has been caught before (see earlier comments). There is basically two ways to fail (two different patterns of log), depending on the exact timings between the two processes going on. End result is still the same, failure. |
| Comment by Jeuv [ 18/Oct/13 ] |
|
Repruduced in both ways. The first time it showed exactly the same as in Markku's latest comment, the second time it spammed my console with: Client> [22:26:22] [Server thread/ERROR]: Couldn't save chunk; already in use by another instance of Minecraft? Client> afp: Failed to check session lock, aborting Client> at awv.c(SourceFile:70) ~[13w42b.jar:?] Client> at afk.F(SourceFile:2352) ~[13w42b.jar:?] Client> at aop.a(SourceFile:90) ~[13w42b.jar:?] Client> at mh.b(SourceFile:146) [13w42b.jar:?] Client> at mh.a(SourceFile:175) [13w42b.jar:?] Client> at mi.a(SourceFile:603) [13w42b.jar:?] Client> at net.minecraft.server.MinecraftServer.a(SourceFile:277) [13w42b.jar:?] Client> at net.minecraft.server.MinecraftServer.n(SourceFile:297) [13w42b.jar:?] Client> at bsb.n(SourceFile:225) [13w42b.jar:?] Client> at net.minecraft.server.MinecraftServer.run(SourceFile:390) [13w42b.jar:?] Client> at kx.run(SourceFile:617) [13w42b.jar:?] |
| Comment by Kumasasa [ 18/Oct/13 ] |
|
@Jeff Claessen: Please attach the complete output of the "Development console" tab of the launcher.
|
| Comment by Jeuv [ 18/Oct/13 ] |
|
Reproduced in 13w42a. Quite tricky to do so, though. |
| Comment by Kumasasa [ 12/Jul/13 ] |
|
Reopened, see |
| Comment by Markku [ 12/Jul/13 ] |
|
Could still reproduce in 1.6.2. Follow the reproduction instructions in my earlier comment and needs a bit of quick clicking (or slower machine). Having the development console now in the launcher makes it even easier to notice when/how the deletion fails... ... Client> 2013-07-12 08:43:22 [SERVER] [INFO] Starting integrated minecraft server version 1.6.2 ... Client> Unsuccessful in deleting contents. Client> Attempt 5... Client> Deleting C:\Users\markkuh\AppData\Roaming\.minecraft\saves\deltest1\region Client> Deleting C:\Users\markkuh\AppData\Roaming\.minecraft\saves\deltest1\region\r.-1.0.mca Client> Couldn't delete file C:\Users\markkuh\AppData\Roaming\.minecraft\saves\deltest1\region\r.-1.0.mca Client> Couldn't delete directory C:\Users\markkuh\AppData\Roaming\.minecraft\saves\deltest1\region Client> Unsuccessful in deleting contents. |
| Comment by [Mod] Ezekiel (ezfe) [ 11/Jul/13 ] |
|
Cannot reproduce in the latest version of minecraft |
| Comment by crazyman [ 06/Jul/13 ] |
|
This is happened to me all back from version beta 1.5! This is really old bug and should be fixed!! |
| Comment by Kelton Chesshire [ 15/Mar/13 ] |
|
Recently my computer has actually been working sometimes and not others. When this problem occurred the computer I was using was actually quite fast, but still the worlds wouldn't delete. Same goes for the computer I have now. |
| Comment by Markku [ 15/Mar/13 ] |
|
Did you by chance improve your computer when solving those issues? As hinted above by me, a fast enough computer might not have these world deletion problems. That is why I hinted the devs to add extra delays to the save routines to "simulate" ordinary (i.e. slow) PCs, so they can reproduce the problem easier. |
| Comment by Kelton Chesshire [ 15/Mar/13 ] |
|
Sorry guys for the long wait for a response, I was having MAJOR issues involving my computer. But I am finally able to say that this issue has been fixed, I checked and it actually had to do with the computer that I was using, so sorry for the inconvenience! EDIT: Actually, now that I think about it, there DOES seem to be a small issue with worlds not deleting. I have been experiencing this since Beta 1.8. I would go into my .minecraft\saves directory, and the world that I THOUGHT was deleted was actually still there, just not popping up in the client. |
| Comment by Markku [ 28/Feb/13 ] |
|
Reproduction hint |
| Comment by Markku [ 28/Feb/13 ] |
|
This is not a bug by Java, but in the Minecraft code, see my long explanation and testing fixes above. |
| Comment by Roxas Kingdem [ 28/Feb/13 ] |
|
Maybe use Java 7 kit 13 or 15 , use the highest |
| Comment by Markku [ 28/Feb/13 ] |
|
Affects 13w09b. |
| Comment by Markku [ 17/Feb/13 ] |
|
Reproduction Depending on the exact timings, user can get (at least) two different types of console logs. (Or with superfast computer, third case: success). One case is similar to what Kumasasa has shown: lots of "Failed to check session lock, aborting", apparently one message per chunk being saved (without success). In this case, the session.lock file has been successfully deleted. The end result is a lingering region/r.0.0.mca file (or perhaps another name depending on players initial location). The other case is when the deletion process does not complete properly, again due to saving process on the background. In this case, there will be two lingering files, the session.lock, and the region/r.0.0.mca. I've attached a log snippet 'deleting-world-fail.txt' showing this case. Root cause (Edit: seems the deletion process does some kind of try to enforce/check that saving is completed, but I guess it is not working as expected. Looks like it will only try to enforce closing any region files still open. That is not very graceful, as it does not check whether some other thread is still trying to write to them.) Possible fix (Edit: if in single-player both the client and the server somehow would share the session lock, the above idea will not work, as both would already have the session lock and be happy. Maybe better idea would be to improve the method that tries to release all the region files so that it waits until it is actually ok to release them (no pending writes).) Edit2: I managed to enforce the deletion to work properly by adding an enforced flush() before deletion (in GuiSelectWorld by MCP naming), but this in turn causes lots of ugly console stacktraces ("The save is being accessed from another location, aborting"). Nevertheless, it apparently manages to delay the deletion just enough that the saving processes have finished/cancelled themselves. Well while the reason is now clear, the code and fix are not so much, so I'll leave the rest for Mojang. Note |
| Comment by Tails [ 13/Jan/13 ] |
|
Related to |
| Comment by Kumasasa [ 13/Jan/13 ] |
|
Steps to reproduce:
|
| Comment by Nerdyboy6057 [ 11/Dec/12 ] |
|
How are you deleting the world (are you deleting it in-game or through file deletion)? If you are deleting the file itself and not through the Delete button in-game, the world will still be listed until you reload the world list. This is possibly because the list is not live; it fetches the files when it is loaded and then is static. |
| Comment by Alex Campbell [ 02/Nov/12 ] |
|
This happens if you have the world open in a different Minecraft instance, with no visible error message. |
| Comment by [Mojang] Grum (Erik Broes) [ 31/Oct/12 ] |
|
We need some more information on how to reproduce this error. I'm unable to reproduce it myself |
| Comment by Mortvert (Mort Imert) [ 25/Oct/12 ] |
|
I had the same thing happen. |
| Comment by Selbram (Tory Clement) [ 25/Oct/12 ] |
|
Could not duplicate in 1.4.2 client single player. |