Out of Memory when Digging

Forum for bugs and technical problems.

Out of Memory when Digging

Postby Hans_Lemurson » Thu Feb 28, 2013 2:27 am

Whenever I engage in terrain flattening projects, my ambitions are frequently curtailed by Salem crashing with an "Out of Memory Exception".

The reason this happens is likely due to me being, as the error says, out of memory. However, the root cause appears to be that modification of the terrain causes the memory-footprint of Salem to irreversibly grow. Salem normally uses ~300 MB of RAM (I have 2GB), but when the last crash occurred, it's memory usage was at 1,000 MB. Not only that, but a graph of RAM usage over time showed there had been a marked increase in system memory demands which correlated with my cliff-removal project.

All in all, I seem to have dug up over 700MB of dirt.

I am using Ender's client, but I will quickly verify whether this memory leak occurs in the un-modded salem client as well.

Update: I am unable to play with an unmodded client, so cannot verify. The default high-resolution textures coupled with the JOGL update conspired to give me 1 Frame per Second. The default client used 500MB of RAM, for comparision.
Low FPS? Love Pixels? Try my new graphics pack! It's Pixelicious. :)
Compost Bin purity formula: Now doing science to earthworms
User avatar
Hans_Lemurson
 
Posts: 555
Joined: Thu Feb 07, 2013 8:04 am

Re: Out of Memory when Digging

Postby Mushibag » Thu Feb 28, 2013 4:41 am

I've always had that same problem, and I'm sure I'm not the only one. I usually just keep an eye on it, and reboot client once it gets too high, or before I do anything risky. It also happens if you port back and forth from Boston to homestead a lot. I think it racks up that memory usage each time it reloads the map.
User avatar
Mushibag
 
Posts: 1376
Joined: Wed Aug 01, 2012 1:22 am

Re: Out of Memory when Digging

Postby MagicManICT » Thu Feb 28, 2013 7:18 am

I seem to switch back and forth between both clients a good bit and haven't really paid attention with the original. It's been a known issue for a while with Ender's. I'll leave this here for a bit to see if someone will confirm this.

Hans_Lemurson wrote:Update: I am unable to play with an unmodded client, so cannot verify. The default high-resolution textures coupled with the JOGL update conspired to give me 1 Frame per Second. The default client used 500MB of RAM, for comparision.


Some tech information could be useful here for optimizing the graphics engine. You might want to follow up on this and post in the thread I have stickied at the top of the Bugs forum about the graphics update. I'm not sure what information loftar will find useful, though. Normally I'd suggest running the DirectX diagnostic tool (dxdiag.exe) and saving and posting the output, but I'm not sure how useful that will be for OpenGL.
I am a moderator. I moderate stuff. When I do, I write in this color.
JohnCarver wrote:anybody who argues to remove a mechanic that allows "yet another" way to summon somebody is really a carebear in disguise trying to save his own hide.
MagicManICT
 
Posts: 5088
Joined: Wed Aug 01, 2012 1:46 am

Re: Out of Memory when Digging

Postby Hans_Lemurson » Thu Feb 28, 2013 3:04 pm

RAM usage seems to rise by about 20MB per soil dug. Interestingly, I noticed that periodically the memory usage would reset, though I'm not sure of the time interval. I watched Java's RAM usage drop from 700MB back down to 300 when I was baking bricks after digging up some dirt for clay.

I've had a number of difficulties with my laptop's graphics card in the past, so I am quite familiar with it's specs (having had to look them up before) and know that it only supports OpenGL 1.4, and only basic very basic pixel-shading. How it still runs Salem now even after the "Shadow of the Pixels" update is a bit of a mystery to me, but I'm happy that it does (though annoyed at the FPS drop).

My graphics card is the Intel GMA 965, and the drivers are as up to date as possible.
Low FPS? Love Pixels? Try my new graphics pack! It's Pixelicious. :)
Compost Bin purity formula: Now doing science to earthworms
User avatar
Hans_Lemurson
 
Posts: 555
Joined: Thu Feb 07, 2013 8:04 am

Re: Out of Memory when Digging

Postby Randall » Thu Feb 28, 2013 3:24 pm

The reason Java memory usage goes back to normal might be due to the fact that garbage collector starts its work.
Randall
 
Posts: 64
Joined: Wed Jan 16, 2013 9:01 pm

Re: Out of Memory when Digging

Postby MagicManICT » Thu Feb 28, 2013 7:44 pm

Hans_Lemurson wrote:I've had a number of difficulties with my laptop's graphics card in the past, so I am quite familiar with it's specs (having had to look them up before) and know that it only supports OpenGL 1.4, and only basic very basic pixel-shading. How it still runs Salem now even after the "Shadow of the Pixels" update is a bit of a mystery to me, but I'm happy that it does (though annoyed at the FPS drop).

My graphics card is the Intel GMA 965, and the drivers are as up to date as possible.


It's quite possible it has a partial implementation of OGL 2.x, but because the card runs it poorly, it's not listed as "supported". Also, OpenGL does allow for some CPU emulation of commands if the GPU driver doesn't support them, which is why you can run it but drops to 1 FPS or lower.
I am a moderator. I moderate stuff. When I do, I write in this color.
JohnCarver wrote:anybody who argues to remove a mechanic that allows "yet another" way to summon somebody is really a carebear in disguise trying to save his own hide.
MagicManICT
 
Posts: 5088
Joined: Wed Aug 01, 2012 1:46 am

Re: Out of Memory when Digging

Postby Hans_Lemurson » Sat Mar 02, 2013 12:46 pm

I've worked out a system where I can safely dig up two full loads of dirt before needing to "take a break" until the memory gets deallocated. If the memory footprint of java ever exceeds 1GB, then it's crashy-time, but you still have about 650 MB of wiggle-room.

It would be nice if you could make the garbage collection happened more frequently.
Low FPS? Love Pixels? Try my new graphics pack! It's Pixelicious. :)
Compost Bin purity formula: Now doing science to earthworms
User avatar
Hans_Lemurson
 
Posts: 555
Joined: Thu Feb 07, 2013 8:04 am

Re: Out of Memory when Digging

Postby MagicManICT » Sat Mar 02, 2013 7:20 pm

I THINK you can manually run the garbage collector in Java if you have the console open. However, even though you invoke the collector, a chunk of memory may not be considered old enough or have been freed up to be collected, so it might not do you any good.

To have the console always open, open Java options (Java Control Panel in Windows) and in the Advanced tab, find the Java console section and make sure "Show console" is selected. When a Java app opens, the console will open in a separate window. The first thing it does is print out a list of commands you can use to find out various things on running apps. One of those is to run the garbage collector.
I am a moderator. I moderate stuff. When I do, I write in this color.
JohnCarver wrote:anybody who argues to remove a mechanic that allows "yet another" way to summon somebody is really a carebear in disguise trying to save his own hide.
MagicManICT
 
Posts: 5088
Joined: Wed Aug 01, 2012 1:46 am

Re: Out of Memory when Digging

Postby staxjax » Sat Mar 02, 2013 8:04 pm

Try using loftar's low memory client when digging. It is supposed to automatically run garbage collection more often.
Of all the things I've lost, I miss my mind the most - Ozzy Osbourne

Confirmed retards: Nimmeth, Claeyt, MycroSparks
User avatar
staxjax
 
Posts: 2845
Joined: Wed Aug 01, 2012 1:29 am

Re: Out of Memory when Digging

Postby Hans_Lemurson » Sat Mar 09, 2013 12:58 pm

I just did a test on a different computer from my Laptop which can run the Seatribe Client. I leveled terrain around my base for 2 hours without any crashing. Previously on that same computer, using Ender's Client I had experienced an Out of Memory error.

I think it's reasonable to conclude that this Out of Memory Error is a result of Ender's Client, rather than any coding for which Seatribe is responsible for.
Low FPS? Love Pixels? Try my new graphics pack! It's Pixelicious. :)
Compost Bin purity formula: Now doing science to earthworms
User avatar
Hans_Lemurson
 
Posts: 555
Joined: Thu Feb 07, 2013 8:04 am


Return to Bugs & Technicalities

Who is online

Users browsing this forum: No registered users and 0 guests