[MC-1628] Minecraft runs out of memory when you switch a lot between worlds Created: 01/Nov/12 Updated: 06/Sep/15 Resolved: 23/Jul/13 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.2, Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.5 |
| Fix Version/s: | Minecraft 1.6.2 |
| Type: | Bug | ||
| Reporter: | Jeffrey Kog | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | OSX, memory | ||
| Environment: |
Mac OS 10.8.2 |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Confirmation Status: | Unconfirmed | ||||||||||||||||
| Description |
|
After switching between worlds like 25 times, minecraft runs out of memory I created 2 new superflat worlds with the "Redstone Ready" template. What I expected to happen was...: What actually happened was...: Steps to Reproduce: |
| Comments |
| Comment by Kumasasa [ 04/Aug/13 ] |
|
@Dídac Garcia:
|
| Comment by Dídac García [ 04/Aug/13 ] |
|
I have the same problem. I changed 10 or 12 times between different worlds and Minecraft crashed. Mac OS X 10.7.5. Java 1.6. Minecraft 1.6.2. |
| Comment by Callum Watson [ 04/Aug/13 ] |
|
Contrary to Kumasasa's request, I installed the latest development version of java, java 8, and found all the performance problems vanish. The cpu is still fairly high but the RAM stays low, and my fps stuck to vsync even whilst loading worlds. |
| Comment by Markku [ 04/Aug/13 ] |
|
Callum, were those memory usage numbers observed in an operating system tool, or in the client itself? If former, it is normal (I can easily reach 1.7G usage with java's max parameter set for 1G). If latter, there would be a bug in the JVM itself (not obeying the max parameter). (The maximum parameter specifies the java's maximum internal 'heap' size, not the maximum RAM the JVM can request from the operating system.) Coming to think of it, as you have such a humble CPU (by modern standards), what is your system's total RAM amount? Also note that there is currently a bug that puts weaker CPU's to knees (and dual-core 1.3GHz would be counted as weak in this context), related to zombie's pathing ( |
| Comment by Kumasasa [ 04/Aug/13 ] |
|
Cannot confirm. |
| Comment by Kumasasa [ 04/Aug/13 ] |
|
Callum Watson, Please don't use early access versions of Java. |
| Comment by Callum Watson [ 04/Aug/13 ] |
|
Uploaded a forced crash |
| Comment by Callum Watson [ 04/Aug/13 ] |
|
RAM upon 1.6.2 startup: 240640k CPU usage upon startup: 20-50% (1.3Ghz dual core, javaw.exe usage) Old Usage using the 1.5.2 and lower launcher w/ 1.5.2: 10% on menu, 40% in-game Evidently the memory leak isn't fixed in 1.6.2 |
| Comment by Kumasasa [ 24/Jul/13 ] |
|
Ok. Fine. |
| Comment by A Y [ 24/Jul/13 ] |
|
I tested today with 1.6.2 and there is everything allright with the RAM now |
| Comment by Kumasasa [ 23/Jul/13 ] |
|
No answer, assuming fixed in 1.6.2. |
| Comment by Kumasasa [ 15/Jul/13 ] |
|
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If so, please force a crash by pressing F3 + C for 10 seconds while ingame short before the memory is exausted and attach the crash report here. |
| Comment by Austin [ 13/Jul/13 ] |
|
try doing it slower so you can switch more times |
| Comment by Jeffrey Kog [ 17/Mar/13 ] |
|
It did crash with that nice out of memory screen. I threw away the report, will try to reproduce it today and i will post the report here. Also, i am not using any texturepack. Just vanilla. |
| Comment by Kumasasa [ 17/Mar/13 ] |
|
As long as the memory doesn't go over some limits, the GC won't kick in. But: Did 1.5 run out of memory (with a crash) or did you just observe an increase in memory usage ? If the latter, that ticket can be resolved. Another question: Do you use texture packs ? If yes, this issue may be related to |
| Comment by Jeffrey Kog [ 17/Mar/13 ] |
|
But if all these additional resources are unneccesary, then the garbagecollector should get rid of them. Right? |
| Comment by Jeffrey Kog [ 17/Mar/13 ] |
|
I tested this again yesterday. The ram gain between world switches is smaller than it was before, but this is still an issue in the current version (1.5) |
| Comment by Markku [ 15/Mar/13 ] |
|
On 1.5 it still seems to be like I described for 1.4.7; starts around 700-800MB (total 'commit' reported by win7 tools), but quickly ramps upto around 1.7GB (with 1GB heap). After that, it seems go up and down a bit, but apparently very slowly up, average maybe 5-10MB per world load at most. At least I can not get it to leak so badly as described in the description, and I run out of new worlds to load. Thus, not an issue for me. (Java's heap seemed to working just fine, not even getting past 600MB at any time.) (I didn't check switching specifically between two superflats, though, but various flat worlds seemed to be easier on memory anyway.) This could be Mac (or perhaps even Mac LWJGL, or hardware drivers) specific issue, not reproducible on windows 7. |
| Comment by Tails [ 15/Mar/13 ] |
|
Is this still a concern in the current Minecraft version? 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 Kumasasa [ 19/Jan/13 ] |
|
Started minecraft with java -Xmx1g -Xms512M -cp Minecraft.exe net.minecraft.LauncherFrame leaving it running overnight, switched a lot of worlds (15 times, some single player, some multiplayer), memory for java.exe is now (according to taskmanager) oscillating around 1 GB . Used memory: 35% (325MB) of 910MB Allocated memory: 70% (643MB) |
| Comment by A Y [ 18/Jan/13 ] |
|
@[Mod] Kumasasa i read the numbers from the task manager (processes => javaw.exe) ... Normaly i also do not have problems with running out Memory, but these days i worked on a adventure map and had to copy my original world often to test new features but after 7-8 new world tests minecraft run out of Memory |
| Comment by Markku [ 18/Jan/13 ] |
|
I was able to get win7 throw its own out of memory warnings simply due to minecraft 1.4.7 idling long enough on the background (Edit |
| Comment by Kumasasa [ 18/Jan/13 ] |
|
@Alper Yetis: From where do you read the numbers and which parameters do you use for the JVM ? |
| Comment by A Y [ 18/Jan/13 ] |
|
Wow..... here a list of my increasing ram: |
| Comment by Stefan van der Velden [ 27/Dec/12 ] |
|
Another thing to note is that the mod Mystcraft is also affected by this, this means i cannot switch between ages much, which is really annoying as my resources are in the overworld but i am doing work in an age. Please fix this memory leak Mojang! |
| Comment by DarkWolff [ 27/Dec/12 ] |
|
I've noticed this recently in my 1.4.6 SMP world, however the problem happens to me when switching between the Overworld and the Nether. Even standing still my javaw.exe's memory steadily climbs, though eventually it will stop until walking around a bit. Going into and out of the nether in one trip usually increases my memory consumption enough the game gets really choppy. |
| Comment by Jeffrey Kog [ 03/Nov/12 ] |
|
Some new information about this bug. I created 2 new superflat worlds with the "Redstone Ready" template. |
| Comment by Talven81 [ 01/Nov/12 ] |
|
Even with limited block types, there can be memory leaks in other areas. All games suffer from memory leaks, the question is how severe is the leak. Minor leaks can usually be ignored while major leaks need to be fixed as it can become overbearing on the system. That was one of the reasons for pulling back on 1.4.1 and instead releasing 1.4.2. To make this bug report more complete, I would recommend the following:
|
| Comment by Jeffrey Kog [ 01/Nov/12 ] |
|
Yeah for me it's not too big of a problem that i have to restart minecraft after some switching, but it should not be necessary. Also it are just normal flat sandstone worlds with nothing special in them |
| Comment by Allan K [ 01/Nov/12 ] |
|
It's crazy, I know, but Minecraft does suffer from memory leaks. The best course of action you can take at present would be restarting the game after the 20th time you've switched maps. Or, assuming that you are trying to transfer something from Creative to Survival, take photos of whatever you've built so you don't have to swap the maps so much. I frankly think this will be a tough one to solve, as this (plus the other memory leaks) have not been resolved for a while now. |
| Comment by Talven81 [ 01/Nov/12 ] |
|
Sounds like a memory leak. This could happen due to loading worlds and all assets not being unloaded when leaving. |