Cannot upload "Java.lang.OutOfMemoryError"

Post Reply
kimujin
Posts: 2
Joined: Mon May 06, 2013 11:24 pm

Cannot upload "Java.lang.OutOfMemoryError"

Post by kimujin » Mon May 06, 2013 11:31 pm

Hello,

i used the wol-client "split & zip" feature to shrink the log (was >1 week and about 1 gb) , the result 411mb file looked good (did a short check with notepad++)

when i load the file it displays corretly in the client (timeranges and graphs) but when uploading the client tells me

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

Code: Select all

Processed 2250000 lines
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at org.apache.commons.collections.primitives.ArrayIntList.ensureCapacity(ArrayIntList.java:210)
	at org.apache.commons.collections.primitives.ArrayIntList.add(ArrayIntList.java:190)
	at org.apache.commons.collections.primitives.RandomAccessIntList.add(RandomAccessIntList.java:128)
	at com.wol3.client.data.EntryListWriter.save(EntryListWriter.java:142)
	at com.wol3.client.data.EntryListWriter.save(EntryListWriter.java:150)
	at com.wol3.client.data.EntryListWriter.initialize(EntryListWriter.java:101)
	at com.wol3.client.data.EntryListWriter.<init>(EntryListWriter.java:50)
	at com.wol3.client.data.EntryList.writeTo(EntryList.java:33)
	at com.wol3.client.data.EntryList.writeTo(EntryList.java:37)
	at com.wol3.client.data.BinaryCombatLog.writeTo(BinaryCombatLog.java:100)
	at com.wol3.client.data.BinaryCombatLog.writeCompressedTo(BinaryCombatLog.java:121)
	at com.wol3.client.data.BinaryCombatLog.writeCompressedTo(BinaryCombatLog.java:113)
	at com.wol3.client.forms.LogFileWindow.uploadReport(LogFileWindow.java:317)
	at com.wol3.client.forms.LogFileWindow.access$2(LogFileWindow.java:311)
	at com.wol3.client.forms.LogFileWindow$3.actionPerformed(LogFileWindow.java:229)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
is there a way to "safe" the file somehow? would be cool as our live-logger had a DC and forgot to switch on the combatlog after his dc and it was our primordius heroic firstkill :>
may be java 64 bit client?

Wytheron
Posts: 3
Joined: Mon May 13, 2013 11:24 pm

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by Wytheron » Mon May 13, 2013 11:39 pm

Hello,
the same here:

Code: Select all

Java Web Start 10.21.2.11
JRE-Version verwenden 1.7.0_21-b11 Java HotSpot(TM) 64-Bit Server VM
...
..
.
Match: digest selected JREDesc: JREDesc[version 1.6+, heap=134217728-419430400, args=-Xms128M -Xmx400M -XX:MaxPermSize=96m, href=null, sel=false, null, null], JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_21
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: 
    native platform is: Windows, amd64 [ x86_64, 64bit ]
    JavaFX runtime is: JavaFX 2.2.21 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

	Match: selecting maxHeap: 419430400
	Match: selecting InitHeap: 134217728
	Match: digesting vmargs: -Xms128M -Xmx400M -XX:MaxPermSize=96m
	Match: digested vmargs: [JVMParameters: isSecure: true, args: -Xmx400m -Xms128M -XX:MaxPermSize=96m]
	Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: -Xms128M -XX:MaxPermSize=96m]
	Match: digest LaunchDesc: http://media.worldoflogs.com/media/client/client-4.2.jnlp
	Match: digest properties: []
	Match: JVM args: [JVMParameters: isSecure: true, args: -Xms128M -XX:MaxPermSize=96m]
	Match: endTraversal ..
	Match: JVM args final: -Xmx400m -Xms128M -XX:MaxPermSize=96m -Xms128m
	Match: Running JREInfo Version    match: 1.7.0.21 == 1.7.0.21
	 Match: Running JVM args match: have:<-Xms128M -XX:MaxPermSize=96m -Djnlp.application.href=http://media.worldoflogs.com/media/client/client-4.2.jnlp -Xmx400m -Xms128m>  satisfy want:<-Xmx400m -Xms128M -XX:MaxPermSize=96m -Xms128m>
...
..
.
Processed 1875000 lines
After setting the upload range to 1.880.945 lines the console logs the following error:

Code: Select all

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapByteBuffer.<init>(Unknown Source)
	at java.nio.ByteBuffer.allocate(Unknown Source)
	at com.wol3.client.data.BinaryCombatLog.writeCompressedTo(BinaryCombatLog.java:116)
	at com.wol3.client.data.BinaryCombatLog.writeCompressedTo(BinaryCombatLog.java:113)
	at com.wol3.client.forms.LogFileWindow.uploadReport(LogFileWindow.java:317)
	at com.wol3.client.forms.LogFileWindow.access$2(LogFileWindow.java:311)
	at com.wol3.client.forms.LogFileWindow$3.actionPerformed(LogFileWindow.java:229)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
As I'm writing I realize that the console told me that 1.875.000 lines were processed....but the upload window tells me that my selected range contains 1.880.945 lines? :shock:
Image
How is that possible?

Anyways, I looked through the log but couldn't find any "bad data".
It's a pity JavaWS does not allow manual override of the VM's memory options. (-.-)

Can you help me/us, please?

Kind regards,
Wytheron

Wytheron
Posts: 3
Joined: Mon May 13, 2013 11:24 pm

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by Wytheron » Fri May 17, 2013 6:22 pm

No one's gonna say something about this issue?

Stingray
Posts: 13
Joined: Thu Dec 27, 2012 10:56 am

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by Stingray » Thu May 23, 2013 1:22 pm

You can fix this by saving the .jnlp file which launches the app (right-click on Client and save to a file), then modify the heap values in it. The default is 400M max. The line starting with "<j2se" is what needs modifying. This is what I use personally:

<j2se version="1.6+" initial-heap-size="512M" max-heap-size="6000M" java-vm-args="-Xms512M -Xmx6000M -XX:MaxPermSize=256m" />

That line changes, among other things, the max heap from 400M to 6000M (ie 6GB). Obviously, 6GB will only work if you're using 64-bit Java on a 64-bit OS with >6GB RAM. If you're on a 32-bit OS and/or using 32-bit Java, try something in the 1000M-1500M range for the max heap. (Just replace both of the 6000 numbers with 1000 or whatever)

Then run your modified .jnlp file.

Wytheron
Posts: 3
Joined: Mon May 13, 2013 11:24 pm

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by Wytheron » Thu May 23, 2013 11:40 pm

Now that's been useful! (^^)
Should have thought of that option myself.... (-.-)
Thank you very much Stingray!

Kind regards,
-Wytheron-

kimujin
Posts: 2
Joined: Mon May 06, 2013 11:24 pm

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by kimujin » Thu Jun 20, 2013 12:37 am

thank you very much, that solved the problem here too

Mammazpojke
Posts: 2
Joined: Thu Apr 14, 2011 10:50 pm

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by Mammazpojke » Fri Aug 09, 2013 1:19 am

Stingray wrote:You can fix this by saving the .jnlp file which launches the app (right-click on Client and save to a file), then modify the heap values in it. The default is 400M max. The line starting with "<j2se" is what needs modifying. This is what I use personally:

<j2se version="1.6+" initial-heap-size="512M" max-heap-size="6000M" java-vm-args="-Xms512M -Xmx6000M -XX:MaxPermSize=256m" />

That line changes, among other things, the max heap from 400M to 6000M (ie 6GB). Obviously, 6GB will only work if you're using 64-bit Java on a 64-bit OS with >6GB RAM. If you're on a 32-bit OS and/or using 32-bit Java, try something in the 1000M-1500M range for the max heap. (Just replace both of the 6000 numbers with 1000 or whatever)

Then run your modified .jnlp file.
How do I do this? Please help me :)

HeinzM
Posts: 3
Joined: Tue Aug 06, 2013 11:23 am

Re: Cannot upload "Java.lang.OutOfMemoryError"

Post by HeinzM » Fri Aug 09, 2013 10:35 pm

Edit the file you start with notepad. Adjust the line mentioned above, save it and start it.

Post Reply