liuweireign / tectonicus

Automatically exported from code.google.com/p/tectonicus
0 stars 0 forks source link

Repeatable out of memory errors #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Windows 7 Professional 64-bit, all updates applied, 6G RAM, 736G free drive 
space, Java 64-bit build 1.6.0_35-b10.  Tectonicus 2.14, Minecraft 1.3.2 
(though the same issue started while I was using Minecraft 1.2.5.)  
2. Erase all previous Tectonicus output.
3. Use either of the the myconfig.xml files attached.  (myconfig2 is cleaner, I 
think.)
4. Use this command line:  
     java -Xms2048m -Xmx4096m -jar Tectonicus_v2.14.jar config=myconfig2.xml
5. Uninstalling all Java versions and re-installing only the latest version 6 
Java does not help.
6. Referencing a modded minecraft.jar and an unmodded one makes no difference.

What is the expected output? What do you see instead? Please attach a full
log file.

In the past, when I had Minecraft 1.2.5, the Tectonicus would generate about 
14G of files and a usable map from about 32,000 tiles (if memory serves).  
During that time it started crashing during rendering, randomly between 3000 
and 10000 tiles with this error message:

=======================================================================
java.lang.OutOfMemoryError: Direct buffer memory
        at java.nio.Bits.reserveMemory(Unknown Source)
        at java.nio.DirectByteBuffer.<init>(Unknown Source)
        at java.nio.ByteBuffer.allocateDirect(Unknown Source)
        at org.lwjgl.BufferUtils.createByteBuffer(BufferUtils.java:60)
        at org.lwjgl.BufferUtils.createFloatBuffer(BufferUtils.java:110)
        at tectonicus.rasteriser.lwjgl.LwjglMesh.realloc(LwjglMesh.java:250)
        at tectonicus.rasteriser.lwjgl.LwjglMesh.addVertex(LwjglMesh.java:91)
        at tectonicus.rasteriser.MeshUtil.addQuad(MeshUtil.java:110)
        at tectonicus.blockTypes.Water.addEdgeGeometry(Water.java:161)
        at tectonicus.blockTypes.Water.addInteriorGeometry(Water.java:85)
        at tectonicus.Chunk.createGeometry(Chunk.java:151)
        at tectonicus.world.World.draw(World.java:535)
        at tectonicus.world.World.draw(World.java:482)
        at tectonicus.TileRenderer.renderBaseTiles(TileRenderer.java:676)
        at tectonicus.TileRenderer.output(TileRenderer.java:321)
        at tectonicus.TectonicusApp.run(TectonicusApp.java:952)
        at tectonicus.TectonicusApp.main(TectonicusApp.java:1212)
=======================================================================

What version of the product are you using? What is your operating system
and Java version?

See above.

Please provide any additional information below.

The only think I can think of that's changed during this time is my video card. 
 I was using an nVidia 8800GTS, and now I have an nVidia GTX 560 Ti.

Thanks.

Original issue reported on code.google.com by steveme...@gmail.com on 15 Sep 2012 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
Tectonicus 2.14 and the myconfig.xml file does work properly on a Mac mini with 
4G/OS 10.7.4/Java 1.6._35.  It takes a loooong time and brings the Mac to its 
knees, but it runs to completion and produces a correct map.

I've been doing more research on the proper format for the myconfig.xml file.  
There are multiple sources of information, mainly on or accessible via the 
Minecraft wiki, which unfortunately conflict with each other.  I've cleaned it 
up a lot.  I've attached the latest file that is working on the Mac.  It's 
called myconfig-mac.xml.  I've converted it back to use my PC pathnames, and 
that's testing now.

This last is probably a non-issue since Tectonicus 2.14 isn't officially 
compatible with Minecraft 1.3.x.  However, if I try to use biome colors, 
Tectonicus generates an error that it can't de-obfuscate minecraft.jar.  This 
is true with a plain, vanilla minecraft.jar.

Thanks!

Original comment by steveme...@gmail.com on 19 Sep 2012 at 4:28

Attachments:

GoogleCodeExporter commented 9 years ago
Update with the PC test.  The same error occurred after tile 11944 of 121926.  
XML and log are attached.

Original comment by steveme...@gmail.com on 19 Sep 2012 at 5:25

Attachments:

GoogleCodeExporter commented 9 years ago
I should have mentioned that this last Windows 7 run was with an empty output 
directory.  No cache from previous runs was used.

Original comment by steveme...@gmail.com on 19 Sep 2012 at 6:25

GoogleCodeExporter commented 9 years ago
I was able to reproduce this frustrating issue as well, and a search online 
brought me here.

I also think that I figured out how to solve the problem.  When running 
tectonicus without the -xms or -xmx memory switches, the out of memory issues 
disappeared.  I recommend running tectonicus without these switches.

I'm guessing that tectonicus calculates its memory requirements based on how 
much physical RAM the host machine possesses instead of how much tectonicus is 
allocated via the JVM.  If so then this ought to be fixed.

Original comment by chojun2...@gmail.com on 14 Nov 2012 at 7:03

GoogleCodeExporter commented 9 years ago
I am running into this issue as well, however removing the Xmx/Xmx parameters 
didn't help. It occurs roughly every 5k tiles (thats using ~3.5G memory, system 
as 4G total).

Original comment by Andrewx...@gmail.com on 20 Sep 2013 at 2:42

GoogleCodeExporter commented 9 years ago
Reproduced on my machine as well, running windows 8.1 64bits with 8gb of ram

Original comment by Vinnishka@gmail.com on 22 Sep 2013 at 9:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Reproduced on my machine as well, running windows 8.1 64bits with 16gb of ram

Original comment by s6a9d6...@gmail.com on 12 Nov 2013 at 10:31

GoogleCodeExporter commented 9 years ago
For anyone experiencing out of memory errors, please post your config file and 
log file so we can get an idea of what might be causing the problem.

Original comment by skoeven on 12 Nov 2013 at 11:28

GoogleCodeExporter commented 9 years ago
Log file and config file attached, I'm not passing any special options to the 
JVM.

From my reading it sounds like the JVM isn't garbage-collecting direct byte 
buffers in a timely fashion, so even if you aren't leaking them they have a 
tendency to build up, and that's problematic because the JVM can't detect the 
nearly-out-of-native-memory condition to run a GC cycle. You might need to try 
and force the JVM to GC your LWJGL objects.

Original comment by JamesMPi...@gmail.com on 21 Jan 2014 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
Also, for people having this problem, messing with the -XX:MaxDirectMemorySize 
parameter for the JVM might help.

Original comment by JamesMPi...@gmail.com on 21 Jan 2014 at 9:54

GoogleCodeExporter commented 9 years ago
Tectonicus is being moved over to GitHub here: 
https://github.com/tectonicus/tectonicus

I have imported this issue into the new GitHub project issue tracker: 
https://github.com/tectonicus/tectonicus/issues/16

Original comment by skoeven on 28 Aug 2014 at 3:58