Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
cevkiv

[Solved] Severe Memory Leak in build 78.0 & 78.1

20 posts in this topic

Builds Affected: 78.0 & 78.1

Suggested Name: Severe Memory Leak

Suggested Category: Severe

Description: Memory usage constantly increases no matter how much memory the java process is allocated/supposed to use.  As of this writing TFC 78.1 Is using just under 6GB of my 8GB of RAM, and will continue to increase until it uses all available memory.  I have relaunched several times now, and tested this on both 78.0 and 78.1.  In the time it took me to write this, memory usage increased ~400 MB [edit: that's supposed to be a tilde before the 400].  This does not seem to ever cause a crash, just hogs more and more system resources until one is forced to manually terminate the process. [edit: in the time since posting this, memory usage has almost reached 7 GB of RAM.]

Have you deleted your config files and are still able to reproduce this bug?: Yes

0

Share this post


Link to post
Share on other sites

Upon further testing, the memory leak seems to only occur while a world is loaded.  I have tested this in Single Player, will attempt to test it with an actual server.  Upon exiting from the single player world to the main menu, memory usage ceases to climb, but remains steady at whatever high number I let it get up to ( currently 6,782,820 KB of RAM ).  Seems to occur no matter what I do, also.  Happens if I stand still, happens if I explore, happens if I don't build, happens if I do build.  Still have yet to experience a crash, although the game does become increasing nonresponsive as memory usage climbs, I'm assuming due to the severe number of page faults happening (over 6.8 million occured during that last testing period.)

 

I am running Windows 7 x64 Ultimate with latest updates.  Nothing fancy or special about anything.

0

Share this post


Link to post
Share on other sites

Server memory usage remains stable and low, as would be expected for Minecraft running a single mod.  Client memory usage, when connected to the server, continues to climb as it does when in Single Player, and ceases to climb when disconnected and back in the main menu.  Continues to climb again once reconnected, although at a slightly slower rate it seems.  So this seems to be something limited to the client-side, since the server seems unaffected.

0

Share this post


Link to post
Share on other sites

I've let Bioxx know and added this to the official bug list. Currently have no idea what is causing the leak.

0

Share this post


Link to post
Share on other sites

Thank you.  For what it's worth, I've played with all the visual settings, and nothing seems to help.

0

Share this post


Link to post
Share on other sites

This is something that dunk was trying to look into long before release however we've never been able to narrow it down and in my play sessions it never affected me. Of course, i also probably wasn't playing long enough. My hope is that with more people experiencing it, we'll be able to get to the bottom of it much faster.

0

Share this post


Link to post
Share on other sites

In f3, the usage is between 500 yo 700 mb, in task manager, java use over 5gb. I have not played a long time, just one minecraft day.

0

Share this post


Link to post
Share on other sites

This is really strange, I just ran VisualVM on my game to see what happens and my game ran perfectly for for 20 minutes straight. Java never uses over 1.6GB in task manager and as soon as it hit 500mb, it called the GC. You couldn't ask for better essentially. I'm trying it with a release build of 78.1 now to see if its any different.

0

Share this post


Link to post
Share on other sites

I've tested several times and I got the following behavior:

 

Test setup: TFC 78.1, enter a world in single player, pause the game, leave it in background, open top (I have a mac) and watch mem usage by java process.

Result: rapid climb to 3.3G (in approx 30 seconds), while holding a cpu core at 50-60%; after it hit 3.3G it started rising steadily with 1-2M per second, without ever stopping, under a 30% cpu load.

 

I repeated the test 10 times and the result was the same. I never did anything ingame, just paused and send the window to background.

 

Footnote: ingame the F3 display shows ram always being released properly and never climbs above 512M. I have a profile setting of -Xmx2G but this does not seem to influence what I see in the statistics.

0

Share this post


Link to post
Share on other sites

Ok so after a live test, mc seems to use more memory when with the release version, but only about 100MB. I launched up a game, and let it sit for 20minutes, and my memory never went up. It sat at 1.7GB the entire time. I also have 0 launch parameters and am using the vanilla launcher.

0

Share this post


Link to post
Share on other sites

I did it with multi mc, will check with vanilla launcher

0

Share this post


Link to post
Share on other sites

I was provided with a seed that reliably reproduced this so I'm investigating it further now.

0

Share this post


Link to post
Share on other sites

I'm using MultiMC, I'll try it with the vanilla launcher.  For what it's worth, I'm using Java Standard Edition Version 7 Update 45 (build 1.7.0_45-b18).  x64.

 

I've retried it with a clean install of the vanilla launcher, with nothing but Forge and TFC.  I'm having the exact same issue.  So it doesn't seem to be MultiMC doing it.

 

I'll try updating my video drivers, and see if that helps.  If it doesn't, I'll look up exactly what versions of what libraries Minecraft is using in the vanilla and MultiMC versions.  I'd try a 32bit version of java, but I need the 64 bit version for other software.

0

Share this post


Link to post
Share on other sites

I was provided with a seed that reliably reproduced this so I'm investigating it further now.

 

Is it seed-related?  Because when I first started the vanilla launcher, I got put in the middle of a huge ocean and was not having this problem.  When I retried with the seed from my MultiMC install, I had the exact same problem (which sucks 'cause it's an awesome seed.)

 

The seed I'm getting the error on is 850369642

 

I'll try other seeds and see if it's seed related.

 

Testing other seeds.  Hopefully I don't screw the numbers up copying them.

 

Memory leak seeds:

  • 850369642
  • -9005276861257820150
Unbugged Seeds:
  • 1309544743104517082
Edited by cevkiv
0

Share this post


Link to post
Share on other sites

I'll test it too, but with custom seed names! I'll edit the result.

 

To understand my testing, here is what I did.

 

  • Open minecraft, using multi mc with only TFC 78.1 installed.
  • Wait five minutes or until stable ram usage reading. (reading 1)
  • Create a new world in creative
  • Check ram usage on world generation and world loading (reading 2)
  • Do nothing (no new chunck loaded.
  • Wait 5 minutes and check the ram usage. (reading 3)

Result

 

  • bad
    • "Kittychanley" 2.01 / 2.35 / 5.85
    • "dunkleosteus" 1.98 / 2.19 / 4.00
    • "aliceingame" 2.00 / 2.20 / 4.45
  • good
    • "Bioxx" 1.88 / 2.27 / 2.45

First observations : on a leaky seed, you can see that it start after 1 or 2 minutes and the leak is constant. Using the task manager, you can almost pretict when the computer will run out of ram. On a good seed, the reading is almost always the same.

0

Share this post


Link to post
Share on other sites

Ok guys, i solved it. It was some badly written rendering for water plants, hence why some seeds didn't seem to have the problem, there weren't any water plants nearby. I'm uploading the new build as I type this.

1

Share this post


Link to post
Share on other sites

  • bad
    • "Kittychanley" 2.01 / 2.35 / 5.85
    • "dunkleosteus" 1.98 / 2.19 / 4.00
  • good
    • "Bioxx" 1.88 / 2.27 / 2.45

 

I always knew there was something shady about those two :)

1

Share this post


Link to post
Share on other sites

so much stable now, thanks bioxx.

0

Share this post


Link to post
Share on other sites