hello.
I am using 3ds max and I export a model of a hotel room with the .obj format.
when I load to scene using jmeconverter it occurs a problem with the textures. without textures the model seems very good, but if I load textures it gives me "java.lang.OutOfMemoryError: Direct buffer memory" and so on…
and then the program is closed.
I spent a lot of time on it and I realize that it gives me that error if my textures' number over 30. how can I get rid of this error.
thanks.
The default java memory heap size is 64mb, it looks like you are running over this, which is causing the error. Use the java vm argument "-Xmx512m" to specify and increase the maximum size of the jvm memory available. (in this case 512mb).
can you explain how can I do ? I will be thankful.
or give me some keyword for research.
doesn't his answer both explain what to do and provide keywords?
MrCoder said:
doesn't his answer both explain what to do and provide keywords?
yes. I have never heard about it so it seemed not enough(sorry). I find how to increase that memory but the problem is continuing. :S
Yes, the error is related to "direct buffer memory" which is natively allocated and quite different from heap space. The limit is set through JVM parameters as such:
-XX:MaxDirectMemorySize=1024M
how can I use this stuff?
I write this on the command line I got only a manual.
is this something wrong with me ?
how can I realize I am done? because my problem is not solved.
thanks for helping.
hello.
I realize that the error message contain
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 com.jme.util.geom.BufferUtils.createByteBuffer(BufferUtils.java:814)…
may these "(Unknown Source)" be the reason. may be, I am lack of some jar files ?is this possible? ( just a chance :S )
If you are using eclipse, you can edit your eclipse.ini
it could look like this:
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
H:ProgrammerJavajdk1.6.0_07bin
-vmargs
-Xms256m
-Xmx1024m
now insert the -XX:MaxDirectMemorySize=1024M argument after the XXMaxPermSize argument.
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-XX:MaxDirectMemorySize=1024M
-vm
H:ProgrammerJavajdk1.6.0_07bin
-vmargs
-Xms256m
-Xmx1024m
But how are you launching the app?
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-XX:MaxDirectMemorySize=1024M
-framework
pluginsorg.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m
I am using eclipse. I change it and it look like this. does it matter mine is a little different than yours.
(still problematic :S )
furthermore,I got these warning a lot
21.Ağu.2008 11:06:25 com.jme.util.resource.ResourceLocatorTool locateResource
WARNING: Unable to locate: /C:/Program Files/Java/workspace/ilk/2.jpg
21.Ağu.2008 11:06:25 com.jme.util.resource.ResourceLocatorTool locateResource
WARNING: Unable to locate: /C:/Program Files/Java/workspace/ilk/27.jpg
21.Ağu.2008 11:06:25 com.jme.util.resource.ResourceLocatorTool locateResource
WARNING: Unable to locate: /C:/Program Files/Java/workspace/ilk/33.jpg
21.Ağu.2008 11:06:25 com.jme.util.resource.ResourceLocatorTool locateResource
WARNING: Unable to locate: /C:/Program Files/Java/workspace/ilk/60.jpg
21.Ağu.2008 11:06:25 com.jme.util.TextureManager loadImage
I think that these can be the couse of error, how can I fix these.(these textures are shown in the screen).
If you are running eclipse you are probably running through the quick launches, the launch options can be edited from the run/debug dialog
open run dialog.
The run dialog with direct buffer size argument, just ignore the Djava.library.path argument
It is more than likely that your’s looks different, no worries…
thanks a lot. it solved the problem.
Cool