mojira.dev
MC-86925

Running out of memory when exiting

When I launch a world, at first memory usage is normal (18-25 %, 50~% allocated of 1011 MB).
If I exit the world and then go back, memory usage explodes, going to 80~% with 100% allocated.
When I try to exit a second time the game goes out of memory, freezes, and most of the time, crashes.

(This seems to happen only when exiting a specific save then going to any other save.)
EDIT : Also happens with other saves but less consistently.

Usually I have more than enough RAM with this 1 GB. That never happened before this snapshot.

I joined a forced crash log I did with the memory up to about 80% and a copy of the game output after one of the crashes.
I also put a game save for which the bug happens every time I log out and back in.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media]
migrated

This is NOT a lack of memory problem. There’s a memory leak or something. How can you explain that I only use 18% of my memory on a save and then 80 to 90 % when going back from the menu ?
There’s obviously a bug and this had NEVER happened before this particular snapshot.

kumasasa

Cannot confirm with your test world, neither in game nor when quitting.

migrated

Actually I was wrong. It also happens with other saves 😞
EDIT : It might be specific to Java 6... ? Have you tried to go in and out repeatedly ?

migrated

Confirmed twice on Java 8.0_40. This looks very like a memory leak of some sort.

migrated

Thanks @unknown for confirming!

It seems the memory usage jumps by about 600 MB each time I exit a save and load it again, eventually running out of memory even with 4 GB XmX… Bad memory leak indeed. Good luck @unknown! ^^

migrated

Can confirm as well..
Has happened most times I've exited a world.
Twice just instant crash, another time gave me a run out of memory screen to exit game or to title, but choosing an option just lagged out and crashed...

migrated

Memory seen increasing by steps each time I load a save.
Goes to the limit and crashes even with 4 GB XmX.
(See attached file)

Erik Broes

Fixed the initial cause of this issue but there are more 'strange things' going on. Will need more work but this shouldn't happen anymore.

migrated

Also getting this issue, especially when I leave the end. Even on first game start up, with no world switching or anything, if I travel to the end and then try to exit the game, I always get the out of memory message and the game freezes / crashes. Also had it a couple times while loading the end trying to check out the new changes.

migrated

Also having this issue

migrated

I also get huge dps drops randomly, even when I am using the normal amount of memory (20% for me).

migrated

I am experiencing this exact issue except it doesn't crash when exiting. As I open a world, leave it, open another etc. the memory allocated grows and reaches 100%, then the used memory ends up being constantly 95%+ with constant unplayable freezes when it hits 100%. If I then leave the world and try to join another it will freeze and crash with an out of memory error.

It seems that there is some kind of memory leak or similar problem that is triggered by leaving worlds or joining worlds (sitting in one world for hours doesn't give me any issues).

This is quite a problem for me as I like to switch briefly into a creative world to try stuff out before switching back to my main world. It only takes a few switches to crash the game.

Can this be reopened?

migrated

Erik Broes

Confirmed

Minecraft 15w34d

Minecraft 15w35a

Retrieved