java.lang.OutOfMemoryError

Installation and usage on Linux / Installation unter Linux
Post Reply
Feanor
Posts: 4
Joined: 18 Jan 2012 20:28

java.lang.OutOfMemoryError

Post by Feanor » 18 Jan 2012 20:46

Hallo,

habe ein Problem, wenn ich HD-Fluggelände lade. Der Dialog mit dem Ladebalken wird dann nicht richtig geschlossen und auf der Konsole sehe ich mehrfach den folgenden Fehler:

Code: Select all

java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:656)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:113)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:305)
	at org.jagatoo.util.nio.BufferUtils.createByteBuffer(BufferUtils.java:58)
	at org.xith3d.scenegraph.TextureImage2D.setImageData(TextureImage2D.java:512)
	at org.xith3d.scenegraph.TextureImage2D.setImageData(TextureImage2D.java:613)
	at org.xith3d.loaders.texture.Xith3DTextureFactory2D.createTextureImageImpl(Xith3DTextureFactory2D.java:69)
	at org.xith3d.loaders.texture.Xith3DTextureFactory2D.createTextureImageImpl(Xith3DTextureFactory2D.java:1)
	at org.jagatoo.loaders.textures.TextureFactory.createTextureImage(TextureFactory.java:100)
	at org.jagatoo.loaders.textures.TextureFactory.createTextureImage(TextureFactory.java:119)
	at org.jagatoo.loaders.textures.TextureFactory.createTextureImage(TextureFactory.java:137)
	at org.jagatoo.loaders.textures.TextureFactory.createTextureImage(TextureFactory.java:196)
	at org.jagatoo.loaders.textures.formats.TextureImageFormatLoaderImageIOImageInputStream.createTextureImage(TextureImageFormatLoaderImageIOImageInputStream.java:126)
	at org.jagatoo.loaders.textures.formats.TextureImageFormatLoaderImageIOImageInputStream.loadTextureImage(TextureImageFormatLoaderImageIOImageInputStream.java:252)
	at org.jagatoo.loaders.textures.AbstractTextureLoader.loadFromFallbackLoader(AbstractTextureLoader.java:390)
	at org.jagatoo.loaders.textures.AbstractTextureLoader.loadTextureFromStream(AbstractTextureLoader.java:542)
	at org.jagatoo.loaders.textures.AbstractTextureLoader.loadOrGetTexture(AbstractTextureLoader.java:723)
	at org.xith3d.loaders.texture.TextureLoader.getTexture(TextureLoader.java:258)
	at org.xith3d.loaders.texture.TextureLoader.getTexture(TextureLoader.java:281)
	at org.xith3d.loaders.texture.TextureLoader.getTexture(TextureLoader.java:297)
	at org.xith3d.loaders.texture.TextureLoader.getTexture(TextureLoader.java:389)
	at a.a.a.f.d.a(Unknown Source)
	at a.a.a.g.f.a(Unknown Source)
	at a.a.a.m.o.a(Unknown Source)
	at a.a.a.m.o.a(Unknown Source)
	at a.a.a.c.a.o.actionPerformed(Unknown Source)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
	at java.awt.Component.processMouseEvent(Component.java:6268)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6033)
	at java.awt.Container.processEvent(Container.java:2045)
	at java.awt.Component.dispatchEventImpl(Component.java:4629)
	at java.awt.Container.dispatchEventImpl(Container.java:2103)
	at java.awt.Component.dispatchEvent(Component.java:4455)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
	at java.awt.Container.dispatchEventImpl(Container.java:2089)
	at java.awt.Window.dispatchEventImpl(Window.java:2517)
	at java.awt.Component.dispatchEvent(Component.java:4455)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
	at java.awt.EventQueue$2.run(EventQueue.java:622)
	at java.awt.EventQueue$2.run(EventQueue.java:620)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
	at java.awt.Dialog$1.run(Dialog.java:1072)
	at java.awt.Dialog$3.run(Dialog.java:1126)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.Dialog.show(Dialog.java:1124)
	at java.awt.Component.show(Component.java:1551)
	at java.awt.Component.setVisible(Component.java:1503)
	at java.awt.Window.setVisible(Window.java:881)
	at java.awt.Dialog.setVisible(Dialog.java:1011)
	at a.a.a.m.h.b(Unknown Source)
	at a.a.a.m.s.actionPerformed(Unknown Source)
	at java.awt.MenuItem.processActionEvent(MenuItem.java:644)
	at java.awt.MenuItem.processEvent(MenuItem.java:603)
	at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:332)
	at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:320)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:652)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
	at java.awt.EventQueue$2.run(EventQueue.java:622)
	at java.awt.EventQueue$2.run(EventQueue.java:620)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Ich verwende Fedora 16 mit einem 64Bit Quadcore CPU und 4 GB RAM. Starten tue ich natürlich auch die 64Bit Version von HELI-X 4.0.1157.

Das Problem kann ich umgehen, wenn ich im Startscript die Zeile:

Code: Select all

$JAVAPATH/java -Xmx384m -Djava.library.path="$LIBS" -classpath "$CP" HELIX > files/log.txt
ändere in

Code: Select all

$JAVAPATH/java -Xmx1024m -Djava.library.path="$LIBS" -classpath "$CP" HELIX > files/log.txt
Das ist aber sicherlich nicht das eigentliche Problem. Ich denke hier ist irgendwo ein großes Speicherleck. In der letzten Version 3 war dieses Problem übrigens noch nicht.

Ich hoffe das Problem lässt sich beheben. Auf jeden Fall schon mal vielen Dank für die Bemühungen und generell für den tollen Simulator :)

User avatar
Michael
Posts: 1691
Joined: 25 May 2008 16:11
Location: Germany
Contact:

Re: java.lang.OutOfMemoryError

Post by Michael » 18 Jan 2012 23:12

Hallo,

das ist komisch. Was sich noch geöndert hat, ist, dass in der gleichen Zeile noch eine Option für den GarbageCollector ist (falls Du frisch installiert hast). Vielleicht kann man da experimentieren.

Michael

Feanor
Posts: 4
Joined: 18 Jan 2012 20:28

Re: java.lang.OutOfMemoryError

Post by Feanor » 19 Jan 2012 19:41

Welche Option meinst du?

Sonst ist da keine. Oder ist das Script anders, wenn man die 4er-Demo frisch installiert? Habe ja das Update auf 4 gemacht.

User avatar
Michael
Posts: 1691
Joined: 25 May 2008 16:11
Location: Germany
Contact:

Re: java.lang.OutOfMemoryError

Post by Michael » 19 Jan 2012 23:53

In HELI-X 4.0 ist noch eine Option für den Garbage-Collector drin. Ich dachte, es liegt daran, ost aber bei Dir dann nicht der Fall.

Vielelciht hast Du auch eine andere Java-Version. Nimmst Du das Java von Sun/Oracle?

Michael

Feanor
Posts: 4
Joined: 18 Jan 2012 20:28

Re: java.lang.OutOfMemoryError

Post by Feanor » 23 Jan 2012 19:42

Hm, zunächst war ich eigentlich davon ausgegangen, dass das Java verwendet wird, welches bei HELI-X dabei ist. Das scheint aber eh nur eine Windows-Version zu sein. Tatsächlich lief bei mir ein OpenJDK. Dachte schon, das wäre das Problem, aber auch mit der aktuellen Oracle JRE 1.6.0_30 habe ich das selbe Problem.

Feanor
Posts: 4
Joined: 18 Jan 2012 20:28

Re: java.lang.OutOfMemoryError

Post by Feanor » 03 Mar 2012 12:46

Kleines Update: Habe das gleiche Problem nun auch auf einem zweiten 64Bit-Rechner unter Windows 7. Mit Oracle JRE.

User avatar
Michael
Posts: 1691
Joined: 25 May 2008 16:11
Location: Germany
Contact:

Re: java.lang.OutOfMemoryError

Post by Michael » 07 Mar 2012 21:09

... Hast Du auch mal die 32-Bit Version probiert?

Michael

Post Reply